Skip to content

haskell-indentation should line up function arguments #813

@ElectricCoffee

Description

@ElectricCoffee

Emacs will consistently do this: ( = the other indent point(s))

myFunction = maybe arg1
□            arg2
□            arg3

Instead of doing this:

myFunction = maybe arg1
□            □     arg2
□            □     arg3

When putting arguments on a line of their own, this could lead to some edge cases where the code gets evaluated wrong due to the indentation level not being correct

As an example:

foo = do maybe arg1
         arg2

Would be interpreted as foo = do { maybe arg1; arg2 }

While

foo = do maybe arg1
               arg2

Would be interpreted as foo = do { maybe arg1 arg2 }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions