[GHC] #14386: GHC doesn't allow Coercion between partly-saturated type constructors

GHC ghc-devs at haskell.org
Wed Oct 25 01:50:38 UTC 2017


#14386: GHC doesn't allow Coercion between partly-saturated type constructors
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.3
      Resolution:                    |             Keywords:  roles
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 Iceland_jack):

 I wondered because we allow

 {{{#!hs
 import Data.Type.Coercion

 newtype USD = USD Int

 wit :: Coercion (Either USD) (Either Int)
 wit = Coercion
 }}}

 I don't understand Core enough to get the difference, but (prima facie) it
 doesn't seem wrong to allow `Coercion (Op (Op cat)) cat`.

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


More information about the ghc-tickets mailing list