#2985: Bogus superclass dictionary with equality constraints
-------------------------------+--------------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 6.10.2
Component: Compiler | Version: 6.10.1
Severity: normal | Keywords:
Difficulty: Unknown | Testcase:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
-------------------------------+--------------------------------------------
{{{
{-# LANGUAGE TypeFamilies, UndecidableInstances #-}
{-# OPTIONS -fglasgow-exts -Wnot #-}
module Main where
instance (Num a, Num b, a ~ b) => Num (a,b) where
x * _ = x
test1 = (1,1) * (2,2)
main = print test1
}}}
Running this program produces `<<loop>>`. Reason is that the `Num (a,b)`
dictionary gets an `Eq` superclass dictionary that is essentially bottom.
I'm not sure why, but it's a bad bug.
See http://article.gmane.org/gmane.comp.lang.haskell.general/16796
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2985>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs