Dear Simon, dear Sigbjorn, dear X,
the good news: installing 2.05 posed no problems on our solaris boxes.
Some bad news: I noticed that ghc's error detection improved from
version to version. 2.03 swallowed the screen with warnings about
incomplete pattern matches ;-). That's good, but 2.05 goes over the top
as it refuses to digest the following program. [Actually, it's a boiled
down version of a larger one.] Needless to say that both `hugs' and
2.04 accept it.
===============================================================================
> module Sequ ( module Sequ, SeqView(..) )
> where
>
> import Prelude hiding ( foldr )
> data SeqView t a = Null
> | Cons a (t a)
> class Sequence s where
> empty :: s a
> (<|) :: a -> s a -> s a
> front :: s a -> SeqView s a
> foldr :: (a -> b -> b) -> b -> s a -> b
> member :: (Eq a) => a -> s a -> Bool
Default methods.
> foldr (*) e s = case front s of
> Null -> e
> Cons a s -> a * foldr (*) e s
> member a = foldr (\b r -> a==b || r) False
===============================================================================
> ghc -c Sequ.lhs
Sequ.lhs:21: Mismatched contexts
When matching the contexts of the signatures for `foldr' and `member'
(the signature contexts in a mutually recursive group should all be identical)
Compilation had errors
Note that `member' and `foldr' are not in a mutually recursive group.
Ralf