[GHC] #12366: Use TypeOperators for pattern synonyms?

GHC ghc-devs at haskell.org
Tue Jul 5 18:25:17 UTC 2016


#12366: Use TypeOperators for pattern synonyms?
-------------------------------------+-------------------------------------
        Reporter:  dubiousjim        |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  low               |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
  (Parser)                           |
      Resolution:                    |             Keywords:
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 goldfire):

 Unfortunately, I don't think this is possible. The type-level namespace
 and the term-level namespace are organized differently: `|>` in a type is
 indeed like a capitalized word, but `|>` in a term is like a lowercase
 word. The problem is, as I understand it, that the parser needs to be able
 to know where the constructors/pattern synonyms are in a pattern. Is `C
 (|>)` binding the variable `|>` or are we matching against a nullary
 pattern synonym `|>`? It's impossible to tell.

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


More information about the ghc-tickets mailing list