Skip to content

Indentation level is missing for deriving keyword #1154

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

Closed
issue-dispenser opened this issue Feb 12, 2016 · 4 comments · Fixed by #1276
Closed

Indentation level is missing for deriving keyword #1154

issue-dispenser opened this issue Feb 12, 2016 · 4 comments · Fixed by #1276

Comments

@issue-dispenser
Copy link
Contributor

As defined here:

data  Maybe a  =  Nothing | Just a
  deriving (Eq, Ord)

There's no indentation level that will result in the deriving being 2 spaces. It'll only do this:

data  Maybe a  =  Nothing | Just a
               deriving (Eq, Ord)
@gracjan
Copy link
Contributor

gracjan commented Feb 13, 2016

Can you add a test case for this?

issue-dispenser added a commit to issue-dispenser/haskell-mode that referenced this issue Feb 16, 2016
Adds the test above another similar (failing) test. haskell#1154
issue-dispenser added a commit to issue-dispenser/haskell-mode that referenced this issue Feb 16, 2016
Adds the test above another similar (failing) test. haskell#1154
@issue-dispenser
Copy link
Contributor Author

Is the hindent test 55a correct behaviour? From what I can tell, it seems like deriving on a new line should be indented like where is instead of aligned to an equals.

I guess some may disagree though.

@gracjan
Copy link
Contributor

gracjan commented Feb 17, 2016

Looks good to me, can you also add tests covering #1046?

@gracjan gracjan changed the title deriving missing indentation level Indentation level is missing for deriving keyword Mar 5, 2016
@gracjan
Copy link
Contributor

gracjan commented Mar 5, 2016

Note that deriving can be on its own line, too:

deriving instance XYZ a b

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 a pull request may close this issue.

2 participants