[GHC] #10828: TH could do a better job of representing GADTs
GHC
ghc-devs at haskell.org
Tue Nov 10 11:40:47 UTC 2015
#10828: TH could do a better job of representing GADTs
-------------------------------------+-------------------------------------
Reporter: spinda | Owner: jstolarek
Type: feature request | Status: new
Priority: normal | Milestone: 8.0.1
Component: Template Haskell | Version: 7.10.2
Resolution: | Keywords:
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 jstolarek):
My proposal would be to add the following constructor to `Con` data type:
{{{#!hs
| GadtC Name [StrictType] [Type]
}}}
where the last field stores list of constructor indices. Once we have
this new constructor I would modify `DsMera` and `Convert` accordingly.
Most importantly, GADT declarations would be now translated to use this
new constructor instead of encoding that uses `ForallC` and `NormalC`.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10828#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list