
#13766: Confusing "redundant pattern match" in 8.0, no warning at all in 8.2 -------------------------------------+------------------------------------- Reporter: edsko | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 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: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * cc: mpickering (added) Comment: Hoo boy, that's pretty scary. To make it worse, because of this bug you can write blatantly nonsensical things like this: {{{#!hs {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -Wall -Woverlapping-patterns #-} module T where class C a where c :: a instance (a ~ Bool, a ~ Int) => C a where c = 42 + True }}} And it'll compile on GHC 8.2.1-rc2 with no warnings. (I haven't found a way to actually //use// that bogus `c` definition, but still.) The commit that caused this behavior is adb565aa74582969bbcc3b411d6d518b1c76c3cf (Don't return empty initial uncovered set for an unsat context). Matthew, do you know what is going on here? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13766#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler