[GHC] #11028: Refactor ConDecl
GHC
ghc-devs at haskell.org
Wed Nov 25 09:43:21 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 alanz):
`tcConDecl` returns a `DataCon`.
For `ConDeclGADT`, should I bring in a function
{{{#!hs
gadtDeclDetails :: LHsSigType name -> HsConDeclDetails name
gadtDeclDetails (HsIB {hsib_body = lbody_ty}) = details
where
(tvs, cxt, tau) = splitLHsSigmaTy lbody_ty
details -- See Note [Sorting out the result type]
= case tau of
L _ (HsFunTy (L l (HsRecTy flds)) res_ty)
-> RecCon (L l flds)
_other -> PrefixCon []
}}}
and then proceed with the process as it is now? Should there be a call to
`tcHsSigType`?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11028#comment:18>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list