[GHC] #14316: Precedence of type-level operators

GHC ghc-devs at haskell.org
Wed Oct 4 14:52:25 UTC 2017


#14316: Precedence of type-level operators
-------------------------------------+-------------------------------------
           Reporter:  lspitzner      |             Owner:  (none)
               Type:  feature        |            Status:  new
  request                            |
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.2.1
           Keywords:  precedence     |  Operating System:  Unknown/Multiple
  TypeOperators DataKinds            |
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 `a ': b ~ c ': d` seems to be parsed as `a ': (b ~ (c ': d))`. This is
 kind of unfortunate; It seems to me that (~) having a lower precedence
 would make more sense, i.e. have it parse as `(a ': b) ~ (c ': d)`.

 What //are// the precedences of (~) and XDataKind-lifted operators? The
 userguide mentions precedences when discussing TypeOperators, but not in
 combination with DataKinds, or the type-equality-constraint.

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


More information about the ghc-tickets mailing list