Ralf Hinze writes:
>
> >
> > 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]'
>
>
thanks - improved in 2.06. For now, make the list argument explicit:
idlist :: [a] -> [a]
idlist ls = toList ((fromList :: [b] -> [b]) ls)
--Sigbjorn