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

Don't let comments escape from empty export lists #1013

Merged
merged 1 commit into from
Apr 24, 2023

Conversation

amesgen
Copy link
Member

@amesgen amesgen commented Apr 23, 2023

Closes #906, see #933 (comment) for more context. The main advantage of this PR to #933 is that it is much more minimal, bu it is still relatively ad-hoc.

There is a similar issue in other cases, e.g. also with this PR (or also with #933), comments "escape" here:

data Foo = Foo {
  -- foo
  }

foo = [
  -- foo
  ]

foo = (
  -- foo
  )

See 54dfe3e for an approach to call encloseLocated "automatically" via an overlapping instance, which e.g. "catches" the comment in the first case in the example above. The other two would probably need ad-hoc handling in p_rdrName.

@github-actions
Copy link

github-actions bot commented Apr 24, 2023

@github-actions github-actions bot temporarily deployed to pull request April 24, 2023 00:38 Inactive
@mrkkrp mrkkrp force-pushed the amesgen/issue-906-enclose-located branch from 3d91cd8 to 5f70b3d Compare April 24, 2023 09:54
@github-actions github-actions bot temporarily deployed to pull request April 24, 2023 10:13 Inactive
@mrkkrp mrkkrp merged commit db1ebbb into master Apr 24, 2023
@mrkkrp mrkkrp deleted the amesgen/issue-906-enclose-located branch April 24, 2023 11:54
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.

Comment in empty export list moved out
2 participants