#3497: Template Haskell support for GADTs
------------------------------+---------------------------------------------
  Reporter:  simonpj          |          Owner:                  
      Type:  feature request  |         Status:  closed          
  Priority:  normal           |      Milestone:  7.0.1           
 Component:  Compiler         |        Version:  6.10.4          
Resolution:  fixed            |       Keywords:                  
  Testcase:                   |      Blockedby:                  
Difficulty:  Unknown          |             Os:  Unknown/Multiple
  Blocking:                   |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown     |  
------------------------------+---------------------------------------------
Changes (by simonpj):

  * status:  new => closed
  * resolution:  => fixed


Comment:

 OK this is done:
  * For reifying instances see #1480
  * For GADTs, TH syntax is now expressive enough to reify GADTs, albeit
 slightly oddly.  A GADT
 {{{
 data Con = NormalC Name [StrictType]          -- ^ @C Int a@
          | RecC Name [VarStrictType]          -- ^ @C { v :: Int, w :: a
 }@
          | InfixC StrictType Name StrictType  -- ^ @Int :+ a@
          | ForallC [TyVarBndr] Cxt Con        -- ^ @forall a. Eq a => C
 [a]@
 }}}
 The `ForallC` form of constructor can express GADTs because the `Cxt` can
 include equality constraints.

 Simon

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3497#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to