|
| <prev next> |
instance not found: msg#00000lang.haskell.glasgow.bugs
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
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Next by Date: | class not used, error not detected, Wolfgang Jeltsch |
|---|---|
| Next by Thread: | RE: instance not found, Simon Peyton-Jones |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |