
#12949: Pattern coverage mistake -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: gkaracha Type: bug | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: | PatternMatchWarnings Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect | Unknown/Multiple error/warning at compile-time | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by gkaracha): Replying to [comment:1 dfeuer]:
Note that everything works as expected if I pass in the `Boolly` values explicitly. Perhaps the pattern coverage checker is confusing `knownBool` called at different types?
Indeed you are right, this is not a bug in the type constraints that the checker generates but the term constraints. I expected the `knownBool`s to be already desugared to `(knownBool $dKnownBool_a)` and `(knownBool $dKnownBool_b)` since they are overloaded but I was mistaken. Hence, it now (wrongly) generates `{knownBool ~ Falsey, knownBool ~ Truey}` which is of course unsatisfiable. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12949#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler