Dear Fellow Bug Chasers,
ghc-2.05 (with some patches applied ;-)) does not digest the following
program:
> module Test ( module Test )
> where
>
> import List
>
> class Sequence s where
> fromList :: [a] -> s a
> toList :: s a -> [a]
> instance Sequence [] where
> fromList = id
> toList = id
>
> idlist :: [a] -> [a]
> idlist = toList . (fromList :: [b] -> [b])
The compiler complains:
> ghc -c Test.lhs
Test.lhs:14: A type signature is more polymorphic than the inferred type
Some type variables in the inferred type can't be forall'd, namely:
`tauI'
Possible cause: the RHS mentions something subject to the
monomorphism restriction
In an expression with a type signature:
`fromList :: _forall_ [b] => [b] -> [b]'
Compilation had errors
Ralf