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

GHC ghc-devs at haskell.org
Fri Dec 18 20:01:34 UTC 2015


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

Comment (by mpickering):

 OK, I'm coming back to this ticket 16 months later with a much better
 understanding of the conversation.

 Gergo's last comment (:19) is informative. I still think that this
 restriction should be removed in line with what Simon suggests (`CE =>
 CP`).

 I can't add much to Gergo's worries about the implementation but

 1. I hope this two stage type checking could be simplified, it's something
 I want to eventually look at.
 2. One obvious stop-gap solution would be allow a user to provide a
 separate type signature for the builder. This gets around the whole "not
 being able to infer the type" problem.

 This ticket is probably a long way out of cache by now Simon but do you
 have any thoughts about my first bullet point? do you think it would be
 possible to refactor the pattern synonym type checking so the type of the
 builder can be inferred?

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


More information about the ghc-tickets mailing list