[GHC] #15123: mg_arg_tys in MatchGroup should be a PostTc field

GHC ghc-devs at haskell.org
Sat May 5 19:52:29 UTC 2018


#15123: mg_arg_tys in MatchGroup should be a PostTc field
-------------------------------------+-------------------------------------
        Reporter:  mpickering        |                Owner:  (none)
            Type:  task              |               Status:  closed
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.2.2
      Resolution:  fixed             |             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:                    |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):

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


Comment:

 This was done in c3823cba2147c74b2c727b5458b9e95350496988. The definition
 of `MatchGroup` is
 [http://git.haskell.org/ghc.git/blob/cb1ee7e10e50b11b4a24e56b425e8f3485d298d5:/compiler/hsSyn/HsExpr.hs#l1577
 now]:

 {{{#!hs
 data MatchGroup p body
   = MG { mg_ext     :: XMG p body
        , mg_alts    :: Located [LMatch p body]
        , mg_origin  :: Origin }
   | XMatchGroup (XXMatchGroup p body)

 data MatchGroupTc
   = MatchGroupTc
        { mg_arg_tys :: [Type]
        , mg_res_ty  :: Type
        } deriving Data

 type instance XMG         GhcPs b = NoExt
 type instance XMG         GhcRn b = NoExt
 type instance XMG         GhcTc b = MatchGroupTc
 }}}

 In particular, the extension point is no longer awkwardly nested
 underneath the `[]` type constructor.

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


More information about the ghc-tickets mailing list