instance not found
Wolfgang Jeltsch
wolfgang at jeltsch.net
Mon Sep 1 00:08:20 EDT 2003
Hello,
I have the following code:
class C a where
f :: a -> Int
instance C (a,b) where
f = const 2
instance C ((a,b),c) where
f = const 3
If I load this code into ghci with switches -fglasgow-exts and
-fallow-overlapping-instances and enter f (1,2), I get this message:
<interactive>:1:
No instance for (C (t, t1))
arising from use of `f' at <interactive>:1
In the definition of `it': f (1, 2)
I cannot see why f (1,2) shouldn't be acceptable, so I suppose it's a bug. Am
I missing something?
I'm using GHC 5.04.3.
Wolfgang
More information about the Glasgow-haskell-bugs
mailing list