[GHC] #14292: Coercing between constraints of newtypes

GHC ghc-devs at haskell.org
Wed Sep 27 18:55:38 UTC 2017


#14292: Coercing between constraints of newtypes
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.1
      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):

 Ryan is, as usual, spot on. The need for `-XIncoherentInstances` in Ryan's
 example was a deliberate design choice to discourage non-nominally roled
 classes. And the extension name is accurate: you're using instances in a
 fundamentally incoherent (but still type-safe) way.

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


More information about the ghc-tickets mailing list