
I propose (comment:31) to report an error for a Given insoluble (e.g. `Int ~ Bool`) only if * there is an enclosing pattern match * that binds some equalities
Otherwise silently ignore Given insolubles. That will resolve all the complaints here, I think.
It's possible that we should warn; but it'd have to be not in `-Wall` because in some cases (like the instance one above) you can't "fix" the
#12466: Typechecker regression: Inaccessible code in a type expected by the context -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: bug | Status: new Priority: highest | Milestone: 8.2.1 Component: Compiler (Type | Version: 8.1 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by dfeuer): Replying to [comment:34 simonpj]: program to avoid the warning. So for now I'm inclined just to silently ignore.
OK? Patch in preparation.
Simon
Can you give an example or two of code that will still produce an error? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12466#comment:35 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler