[GHC] #11224: Program doesn't preserve semantics after pattern synonym inlining.

GHC ghc-devs at haskell.org
Mon Dec 14 22:25:31 UTC 2015


#11224: Program doesn't preserve semantics after pattern synonym inlining.
-------------------------------------+-------------------------------------
        Reporter:  anton.dubovik     |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  7.10.2
      Resolution:                    |             Keywords:
Operating System:  Windows           |         Architecture:  x86_64
 Type of failure:  Incorrect result  |  (amd64)
  at runtime                         |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by mpickering):

 I'm a bit out of my depth here but an immediate problem is that it's not
 possible to write down the correct type signature for `PRead`.

 I think it should be `pattern PRead :: Read a => a -> String` which GHC
 rejects because the required constraints mention the existentially
 quantified `a`.

 It is even more baffling though that with this type signature that GHC
 still fails to typecheck the code, it only typechecks with the inferred
 type. I'm doing a bit more investigating now but I think only Richard or
 Simon will be able to give a better account.

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


More information about the ghc-tickets mailing list