[GHC] #9288: Type class overlapping instances check doesn't understand type equality
GHC
ghc-devs at haskell.org
Thu Jul 10 17:04:27 UTC 2014
#9288: Type class overlapping instances check doesn't understand type equality
------------------------------------------------+--------------------------
Reporter: ezyang | Owner:
Type: bug | Status: new
Priority: low | Milestone:
Component: Compiler (Type checker) | Version: 7.9
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: GHC accepts invalid program | Unknown/Multiple
Test Case: | Difficulty:
Blocking: | Unknown
| Blocked By:
| Related Tickets:
------------------------------------------------+--------------------------
Comment (by aavogt):
A simpler example where ghc-7.8.2 doesn't detect overlapping instances
until they are used
{{{
{-# LANGUAGE FlexibleInstances #-}
class C a where c :: a
instance C a where c = undefined
instance C Int where c = 2
-- ghc doesn't complain about overlapping instances
-- unless you uncomment c1
-- c1 = c :: Int
c2 = c :: Double
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9288#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list