Skip to content

Conversation

@GHGibonus
Copy link

resolves #128 . The proposed fix removes some code that I tried to manually test. The code was probably intended to do what my pull request does (but didn't work).

I manually tested the following cases:

  • Indentation on union types:
    type Bool
        = False
        | True
  • The pipping operator:
    f x =
        tail x
            |> drop 5
            |> reverse
  • The PR do not change the indentation behavior for certain operators:
    cathello x =
        x
        ++ "hello"
        ++ " world"
  • Various if else expressions:
    if x > 10 then
        True
    else if x < 5 then
        False
    else
        True
    if x > 10
    then True
    else False
    if x > 10
    then True else False
    No situations seemed problematic, apart from nested if else with various levels of indentations. The same behavior showed in master.

This should make it possible to indent correctly for union types and
chaining operators such as pipes or concatenations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Autoindent inconsistencies

1 participant