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

#15123: mg_arg_tys in MatchGroup should be a PostTc field -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: task | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.2.2 Keywords: newcomer | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- It appears that `mg_arg_tys` is only populated after typechecking but the type does not indicate this. Instead of {{{ mg_arg_tys :: [PostTc p Type] }}} the type should be {{{ mg_arg_tys :: PostTc p [Type] }}} All that needs doing is modifying this type in compiler/HsSyn/HsExpr.hs and then fixing the resulting compiler errors. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15123 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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... 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
participants (1)
-
GHC