
#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: 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 simonpj): Gah! How has this bug survived so long? I see this {{{ Inert set: [G] co1: a ~R# f b Work item: [B] co2: b ~R# f a }}} We can't rewrite the work item `co2` with the inert `co1`, because the role of f's argument is Nominal, sot`co1` can't rewrite it. So we add `co2` to the inert set. Alas we then kick out `co1` becuase it has a free `b`, thinking that it might be rewritten by `co2`. But of course it can't and we get an infinite loop instead. Sigh! What's wrong? I think that `anyRewritableTyVar` needs to beecome role- aware. Richard do you agree? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14363#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler