just try to compile it with
ghc -fallow-overlapping-instances -Wall --make Main.hs
or inseart sth. like this at the first line:
{-# OPTIONS -fglasgow-exts -fffi -fallow-undecidable-instances
-fallow-overlapping-instances #-}
- marc
Am Montag, 29. August 2005 05:25 schrieb Juan Carlos Arev
David Menendez wrote:
Juan Carlos Arevalo Baeza writes:
The way Haskell type classes
work, the overlap is determined without looking at the context, so "Show
a" will overlap with every possible instance for Show, including Show
Int, which is predefined.
Ah. :-P Bummer.
I'm not sure
Juan Carlos Arevalo Baeza writes:
>(BCC'ing the GHC bugs list)
>
>It seems like there's something very funky going on with GHC (6.4)
> and automatically deriving instances. Consider this code:
>
> ---8<--
> 1: class MyClass a
> 2:
> 3:instance MyClass
(BCC'ing the GHC bugs list)
It seems like there's something very funky going on with GHC (6.4)
and automatically deriving instances. Consider this code:
---8<--
1: class MyClass a
2:
3:instance MyClass a => Show a
4:
5:newtype Type1 = Type1 { unType1 ::