[GHC] #11028: Refactor ConDecl

GHC ghc-devs at haskell.org
Thu Nov 26 16:21:06 UTC 2015


#11028: Refactor ConDecl
-------------------------------------+-------------------------------------
        Reporter:  simonpj           |                Owner:  alanz
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              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 simonpj):

 Bother.

 I guess that to typecheck a GADT decl we'll need a function with a type
 like this:
 {{{
 tcGadtSigType :: LHsSigType Name -> TcM ([StrictnessMark], [FieldLabel],
 [Type], Type)
 }}}
 or something like that.  It takes a GADT data constructor type signature,
 like
 {{{
 C :: { x :: !Int, y:: Bool } -> T Int
 }}}
 and returns the typechecked pieces.

 Once you've got that, you can use the very same function during kind
 checking.  Just call it and discard the result.

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


More information about the ghc-tickets mailing list