[GHC] #13537: Adding underscore (m :: _) to pattern variable makes it fail

GHC ghc-devs at haskell.org
Fri Apr 7 10:40:04 UTC 2017


#13537: Adding underscore (m :: _) to pattern variable makes it fail
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.0.1
  checker)                           |
      Resolution:  invalid           |             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):

 > To be clear, this is also expected?

 Yes, but for an entirely different reason.  The local binding `g' = g` is
 not generalised, because with `GADTs` on (which you presumably have) we
 have `MonoLocalBinds` on too.  So `g'` is no generalised; and hence it's
 rejected as an argumen to `MkT`.  If you gave `g'` a type signature you'd
 be fine.

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


More information about the ghc-tickets mailing list