Bogus superclass dictionary with equality constraints
{-# 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
Trac metadata
Trac field | Value |
---|---|
Version | 6.10.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |