Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix indentation inconsistencies #129

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

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