
#10338: GHC Forgets Constraints -------------------------------------+------------------------------------- Reporter: crockeea | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 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 dfeuer): If you're not using overlapping instances, then you can solve the problem by imposing {{{#!hs class (Functor t, Num r) => T t r where }}} In that context, the only (hypothetical) downside is that you don't have the option of hiding the constraint. I don't know if that's a real concern. If you are using overlapping instances, ~~you've dug yourself into a hole and I don't have much sympathy for you~~ the `ScopedTypeVariables` work- around doesn't seem too onerous. It would be interesting to see if this can be reproduced using code that makes sense ''without'' `OverlappingInstances`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10338#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler