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

Use located in GADT #932

Merged
merged 1 commit into from
Nov 8, 2022
Merged

Use located in GADT #932

merged 1 commit into from
Nov 8, 2022

Conversation

brandonchinn178
Copy link
Collaborator

Is there a particular reason why p_hsType was being called on unLoc quantifiedType instead of using the located combinator? It seems like it was initially implemented when GADT args + result type were separate, so there wasn't a single HsType object representing the entire type to be located, but now that we have quantifiedType, it seems better to be consistent between function signatures + GADT constructors.

brandonchinn178 added a commit to fourmolu/fourmolu that referenced this pull request Nov 6, 2022
Copy link
Member

@amesgen amesgen left a comment

Choose a reason for hiding this comment

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

Nice, the use of unLoc here just seems to be a historical oversight 👍

Just for reference what the inconsistency fixed by this PR is concretely:

InputOutput before this PROutput with this PR
foo ::
  A -> B
foo ::
  A -> B
foo ::
  A -> B
data Foo where
  Foo :: 
    A -> B
data Foo where
  Foo :: 
    A ->
    B
data Foo where
  Foo :: 
    A -> B

@mrkkrp mrkkrp force-pushed the gadt-cleanup branch 2 times, most recently from 569e790 to daaa6c5 Compare November 8, 2022 18:34
@mrkkrp
Copy link
Member

mrkkrp commented Nov 8, 2022

I can't figure out why CI is not working on this PR 🤔

@brandonchinn178
Copy link
Collaborator Author

Do you have CI enabled for PRs originating from forks?

@mrkkrp mrkkrp merged commit 1e68677 into tweag:master Nov 8, 2022
@brandonchinn178 brandonchinn178 deleted the gadt-cleanup branch November 8, 2022 19:30
@mrkkrp
Copy link
Member

mrkkrp commented Nov 8, 2022

No, that would be unsafe. I vaguely remember that it should work if I force-push on your PR (which I did). Anyway, it worked magically when I pushed origin/gadt-cleanup, even though the branch of the PR itself remained unchanged 🤔

I also granted you write access. Use it wisely and don't change the indentation step, please.

@brandonchinn178
Copy link
Collaborator Author

Ah sure; Fourmolu uses GitHub Actions, which lets you click a button to manually approve running a workflow. Not sure how buildkite does it.

Use it wisely and don't change the indentation step, please.

Ha. Even though I work on Fourmolu, I actually prefer 2-space indentation. Ironic

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.

3 participants