[GHC] #12025: Order of constraints forced (in pattern synonyms, type classes in comments)

GHC ghc-devs at haskell.org
Mon May 9 18:59:15 UTC 2016


#12025: Order of constraints forced (in pattern synonyms, type classes in comments)
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.1
  checker)                           |             Keywords:
      Resolution:                    |  TypeApplications PatternSynonyms
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  11513, 10928      |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Iceland_jack):

 Thanks for your responses.

 Replying to [comment:5 simonpj]:
 > We could do the same for pattern synonyms, so that
 > {{{
 > pattern X' :: () => forall xxx.  A [xxx]
 > }}}
 > means precisely
 > {{{
 > pattern X' :: forall t. () => forall xxx. (t ~ [xxx]) => A t
 > }}}

 That sounds like a step in the right direction Simon but would this make
 the current meaning of

 {{{#!hs
 pattern X' :: () => forall xxx.  A [xxx]
 }}}

 inexpressible (a pattern that only matches `A [xxx]`)?

 I want to be aware of the trade-offs, I don't have use for it personally

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


More information about the ghc-tickets mailing list