[GHC] #11213: Incorrect reported pattern synonym signature

GHC ghc-devs at haskell.org
Tue Apr 12 15:23:10 UTC 2016


#11213: Incorrect reported pattern synonym signature
-------------------------------------+-------------------------------------
        Reporter:  mpickering        |                Owner:
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:  8.0.1
       Component:  Compiler (Type    |              Version:  7.10.3
  checker)                           |             Keywords:
      Resolution:  fixed             |  PatternSynonyms
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D1896
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by bgamari):

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


@@ -1,1 +1,1 @@
- {{{
+ {{{#!hs

New description:

 {{{#!hs
 data T where
   MkT :: (Show b) => b -> T

 --pattern ExNumPat :: () => Show b => b -> T
 pattern ExNumPat x = MkT x
 }}}

 GHC reports that `ExNumPat` is missing a signature (correctly) but it
 reports the wrong type. The correct type is the one commented out.

 {{{
 pstest.hs:12:1: warning:
     Top-level binding with no type signature:
       ExNumPat :: forall b. Show b => b -> T
 }}}

--

Comment:

 This was merged to `ghc-8.0` as f75e098a0e3f7c81cad92e6b52f6c00a6491152d.

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


More information about the ghc-tickets mailing list