[GHC] #10902: Refactor type families in Template Haskell
GHC
ghc-devs at haskell.org
Mon Nov 30 01:20:07 UTC 2015
#10902: Refactor type families in Template Haskell
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner: johnleo
Type: task | Status: new
Priority: normal | Milestone: 8.0.1
Component: Template Haskell | Version: 7.11
Resolution: | Keywords: newcomer
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 johnleo):
Proposal:
In `ghc/libraries/template-haskell/Language/Haskell/TH/Syntax.hs` create a
new data type:
{{{#!hs
data TypeFamilyBase = TypeFamilyBase Name [TyVarBndr] FamilyResultSig
(Maybe InjectivityAnn)
}}}
In `data Dec` in the same file replace the definitions of
`OpenTypeFamilyD` and `ClosedTypeFamilyD` with the following:
{{{#!hs
| OpenTypeFamilyD TypeFamilyBase
| ClosedTypeFamilyD TypeFamilyBase [TySynEqn]
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10902#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list