[GHC] #10431: EqualityConstraints extension?

GHC ghc-devs at haskell.org
Sat May 6 23:50:23 UTC 2017


#10431: EqualityConstraints extension?
-------------------------------------+-------------------------------------
        Reporter:  adamgundry        |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:  8.4.1
       Component:  Compiler (Type    |              Version:  7.11
  checker)                           |
      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 AntC):

 However this gets resolved, please doco which extensions enable the `(~)`
 syntax. Currently at 8.0.1:

 * Section 10.14.1 'Equality Constraints' tells how to use `(~)`, but not
 how to enable it.
 * Section 10.8.3.3 'Relaxed rules for instance contexts' mentions -XGADTs
 or -XTypeFamilies, as an aside.\\I'd call that a less than obvious place
 to look.

 It's not too bad: if you use `(~)` without either of those switched on,
 GHC's error message is very clear.

 (See this post https://mail.haskell.org/pipermail/glasgow-haskell-
 users/2017-April/026521.html.)

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


More information about the ghc-tickets mailing list