GADT forall does not round-trip on ghc-8.6 #242

Open
opened 2019-06-21 12:10:37 +02:00 by lspitzner · 2 comments
lspitzner commented 2019-06-21 12:10:37 +02:00 (Migrated from github.com)
data StupidExistential a where
  StupidExistential :: forall a . StupidExistential a

turns into

data StupidExistential a where
  StupidExistential :: a StupidExistential a

(and interestingly into this in the next step, although that really does not matter:)

data StupidExistential a where
  StupidExistential ::a StupidExistential a

This is a bug in ghc-exactprint, confirmed on ghc-exactprint-5.8 and ghc-exactprint-0.6, confirmed on ghc-8.6.5. Does not occur on earlier ghc versions.

Will open an issue on ghc-exactprint. See https://github.com/alanz/ghc-exactprint/issues/79.

Might want a work-around in the meantime.

~~~~.hs data StupidExistential a where StupidExistential :: forall a . StupidExistential a ~~~~ turns into ~~~~.hs data StupidExistential a where StupidExistential :: a StupidExistential a ~~~~ (and interestingly into this in the next step, although that really does not matter:) ~~~~.hs data StupidExistential a where StupidExistential ::a StupidExistential a ~~~~ This is a bug in ghc-exactprint, confirmed on ghc-exactprint-5.8 and ghc-exactprint-0.6, confirmed on ghc-8.6.5. Does _not_ occur on earlier ghc versions. ~~Will open an issue on ghc-exactprint.~~ See https://github.com/alanz/ghc-exactprint/issues/79. Might want a work-around in the meantime.
tfausak commented 2019-06-24 04:25:00 +02:00 (Migrated from github.com)

The space thing was reported earlier in #217.

The space thing was reported earlier in #217.
lspitzner commented 2019-06-24 10:11:21 +02:00 (Migrated from github.com)

(This is a bit worse though, because removing forall can break the code.)

(This is a bit worse though, because removing `forall` can break the code.)
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: hexagoxel/brittany#242
There is no content yet.