[GHC] #11341: Reifying a GADT doesn't tell you the correct return type

GHC ghc-devs at haskell.org
Sun Jan 3 12:26:22 UTC 2016


#11341: Reifying a GADT doesn't tell you the correct return type
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Template Haskell  |              Version:  8.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect result  |  Unknown/Multiple
  at runtime                         |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 Replying to [comment:2 jstolarek]:
 > In this setting I don't think it is a good idea to store indices inside
 `GadtC`. This would duplicate information already stored inside the
 constructor and make it possible to create inconsistent data constructors.

 That's a good point I hadn't thought of. We definitely don't want users to
 be able to splice in type indices that don't match up with the actual
 return type. I suppose the real type indices can always be found out
 through something like `expand` in `th-desugar`.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11341#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list