[GHC] #8581: Add support for explicitly-bidirectional pattern synonyms

GHC ghc-devs at haskell.org
Mon Aug 25 13:13:06 UTC 2014


#8581: Add support for explicitly-bidirectional pattern synonyms
-------------------------------------+-------------------------------------
              Reporter:  cactus      |            Owner:
                  Type:  feature     |           Status:  new
  request                            |        Milestone:  7.10.1
              Priority:  normal      |          Version:
             Component:  Compiler    |         Keywords:
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Unknown
  Unknown/Multiple                   |       Blocked By:  5144
       Type of failure:              |  Related Tickets:
  None/Unknown                       |
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by cactus):

 Hmm. Implementation-wise, there's no reason why `P`-as-an-expression and
 `P`-as-a-pattern  has to have the same constraints -- in fact, they could
 even have completely different types... But we check that they do have the
 same type so that they behave more like a real constructor. The reason `CE
 := CP + CR` at the moment is that this is how a GADT constructor is typed.

 So, ummm, how far do we want to let pattern synonym types wander from
 regular constructor types? That is the question here.

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


More information about the ghc-tickets mailing list