
#12787: Weird type constraint with undecidable instances -------------------------------------+------------------------------------- Reporter: nome | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler (Type | Version: 8.0.1 checker) | Keywords: Resolution: invalid | UndecidableInstances Operating System: Linux | Architecture: x86_64 Type of failure: GHC rejects | (amd64) valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by nome): * status: new => closed * resolution: => invalid Comment: After some more head banging and scratching, I'm heading towards the conclusion that I simply can't use the context of an instance declaration to put a restriction on the types it applies to. It looks like it should be possible in principle, but if that's not how the language works, there's little point in arguing. Unlike the minimal example, the extended one given above doesn't work in Hugs either. I'm still not entirely sure about all of this stuff, particularly the overlapping instances bit, but it appears that the bug was really in my interpretation. Sorry for the noise... I've never met a language that's both so beautiful and so liable to tying knots into my brain. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12787#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler