[GHC] #11977: ghc doesn't agree with its own inferred pattern type

GHC ghc-devs at haskell.org
Tue May 24 08:47:05 UTC 2016


#11977: ghc doesn't agree with its own inferred pattern type
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.1
      Resolution:                    |             Keywords:
                                     |  PatternSynonyms
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 Simon Peyton Jones <simonpj@…>):

 In [changeset:"03d8960388d64f5d5c9617dd0e21555e9e987e26/ghc"
 03d89603/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="03d8960388d64f5d5c9617dd0e21555e9e987e26"
 Don't split the arg types in a PatSyn signature

 This patch fixes Trac #11977, and #12108, rather satisfactorily
 maily by deleting code!

   pattern P :: Eq a => a -> a -> Int

 The idea is simply /not/ to split the bit after the '=>' into the
 pattern argument types, but to keep the (a->a->Int) part
 un-decomposed, in the patsig_body_ty field of a TcPatSynInfo.

 There is one awkward wrinkle, which is that we can't split the
 implicitly-bound type variables into existential and universal until
 we know which types are arguments and which are part of the result.
 So we postpone the decision until we have the declaration in hand.
 See TcPatSyn Note [The pattern-synonym signature splitting rule]
 }}}

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


More information about the ghc-tickets mailing list