#5516: Universally quantified GADT context leads to overlapping instance
---------------------------------+------------------------------------------
Reporter: andersk | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.3 | Keywords:
Testcase: | Blockedby:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: GHC rejects valid program
---------------------------------+------------------------------------------
Comment(by batterseapower):
FYI Simon pointed out that my example from 2893 wasn't actually making use
of the GADT-carried dictionary. Instead, it was just using the top level
instance decl.
The story is that GHC can infer polymorphic evidence but not make use of
it, even with this sort of GADT trick. If you explicitly scrutinise the
polymorphic GADT at a monomorphic type GHC *can* make use of the evidence,
however.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5516#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs