[GHC] #13848: Unexpected order of variable quantification with GADT constructor
GHC
ghc-devs at haskell.org
Wed Jun 28 16:04:30 UTC 2017
#13848: Unexpected order of variable quantification with GADT constructor
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 8.0.1
checker) | Keywords:
Resolution: | TypeApplications
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by RyanGlScott):
OK, I think I'm starting to see the picture more clearly. However, some of
the details are still hazy to me. In particular, `tcConDecl` is far from
the only place that uses `buildDataCon` to construct a `DataCon`. However,
as far as I can tell, `tcConDecl` is the //only// place that knows exactly
what order the user wrote the constructor's type variables in.
This is important because we might write a GADT to an interface file and
read it back in
[http://git.haskell.org/ghc.git/blob/78c80c250021ccb7a84afaabebe0d69f9b9372ee:/compiler/iface/MkIface.hs#l1544
tyConToIfaceDecl], which also uses `buildDataCon`. However, we've lost the
order of the type variables used in the wrapper type by that point, since
`IfaceData` doesn't store the wrapper type!
This suggests to me that we need to beef up `IfaceData` to accommodate
this change. Should we be storing the wrapper type as a field of
`IfaceData` as well? Or am I barking up the wrong tree?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13848#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list