Skip to content

Respect "respectful" for where keyword in module header#245

Merged
brandonchinn178 merged 5 commits intomainfrom
respectful-module-where
Nov 8, 2022
Merged

Respect "respectful" for where keyword in module header#245
brandonchinn178 merged 5 commits intomainfrom
respectful-module-where

Conversation

@brandonchinn178
Copy link
Copy Markdown
Collaborator

@brandonchinn178 brandonchinn178 commented Oct 29, 2022

Resolves #167
Blocked by #244

@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 29, 2022

👋 @brandonchinn178
Thank you for raising your pull request.
Please make sure you have followed our contributing guidelines in DEVELOPER.md. We will review it as soon as possible!

Reviewer: Please verify the following things have been done, if applicable.

  • A file has been added to changelog.d/
  • "Configuration > Available options" section in README.md has been updated
  • "Configuration > Specifying configuration" section in README.md has been updated
  • fourmolu.yaml updated to stay in sync with config in README.md
  • Tests have been added

@brandonchinn178 brandonchinn178 force-pushed the respectful-module-where branch 3 times, most recently from 85f9558 to 7cb799f Compare October 30, 2022 07:02
@brandonchinn178 brandonchinn178 marked this pull request as ready for review October 30, 2022 07:02
-- [AnnModule, AnnWhere] or [AnnSignature, AnnWhere]
[AddEpAnn _ moduleLoc, AddEpAnn AnnWhere whereLoc] ->
(epaLocationRealSrcSpan moduleLoc, epaLocationRealSrcSpan whereLoc)
anns -> error $ "Module had unexpected annotations: " ++ showSDocUnsafe (ppr anns)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's just too long since I've contributed any significant code, but do we generally use error? I assumed the main monad stack had some facility for raising pure errors.

Copy link
Copy Markdown
Collaborator Author

@brandonchinn178 brandonchinn178 Nov 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For impure errors? Not that I can tell. There's an existing use of error already, at least:

Nothing -> error "AST differs, yet no changes have been introduced"

Co-authored-by: George Thomas <georgefsthomas@gmail.com>
@brandonchinn178 brandonchinn178 merged commit 45256f1 into main Nov 8, 2022
@brandonchinn178 brandonchinn178 deleted the respectful-module-where branch November 8, 2022 00:39
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.

Put 'where' on same line as ')' in a multiline module export list

2 participants