
#9117: Coercible constraint solver misses one -------------------------------------+------------------------------------ Reporter: goldfire | Owner: nomeata Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by nomeata): Is this subsumed by #8555? Do we want a general “instance” {{{Coercible f g => Coercion (f a) (g a)}}}? Wouldn’t that run into a dead end in situations like {{{ newtype Foo1 a = Foo1 (a,()) newtype Foo2 a = Foo2 (a,()) coerce :: Foo1 () -> Foo2 () }}} which might simplify this to {{{Coercible Foo1 Foo2}}} if that happens to happen before the newtype-unwrapping instance? So while it surely is possible to add that to the solver somehow, e.g. as a final thing to try, I’m not sure about all the implications. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9117#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler