[GHC] #14363: :type hangs on coerce

GHC ghc-devs at haskell.org
Wed Oct 18 02:45:25 UTC 2017


#14363: :type hangs on coerce
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.1
      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 goldfire):

 Yes, `anyRewritableTyVar` needs to become role-aware. It should pass a
 role to the predicate function, I think.

 But I'm not sure why the "occurs check" failure in the original post is
 correct. IIUC, we're trying to check `coerce :: (a -> b) -> (f a -> f b)`.
 In other words, we want to prove `Coercible (a -> b) (f a -> f b)`, which
 decomposes to `Coercible a (f a)` and `Coercible b (f b)`. These aren't
 insoluble, and I don't think we should report an occurs-check problem.

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


More information about the ghc-tickets mailing list