[GHC] #11028: Refactor ConDecl

GHC ghc-devs at haskell.org
Mon Dec 7 09:07:19 UTC 2015


#11028: Refactor ConDecl
-------------------------------------+-------------------------------------
        Reporter:  simonpj           |                Owner:  alanz
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:  8.0.1
       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:  #11155            |  Differential Rev(s):  Phab:D1558
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 The old one is clearly wrong when we have
 {{{
   cml_true, cml_false :: !Label
 }}}
 We could fix it to provide ''both'' a prefix signature ''and'' list the
 fields; and that is presumably what the old version was supposed to do.
 And the new form which looks like
 {{{
   CmmCondBranch :: -> CmmNode O C
     cml_true, cml_false :: !Label
     ...etc...
 }}}
 does look very weird.  `CmmCondBranch :: -> CmmNode O C` just isn't
 Haskell.

 Why not just print it out in the source syntax form:
 {{{
   CmmCondBranch :: { cml_true, cml_false :: ! Label
                    , ...etc...
                    } -> CmmNode O C
 }}}
 Admittedly that's more work, because it's not what Haddock does right now.
 But it would make more sense to users wouldn't it?

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


More information about the ghc-tickets mailing list