On Wed, Feb 04, 2004 at 02:51:18AM -0800, Malcolm Wallace wrote:
> malcolm     2004/02/04 02:51:18 PST
> 
>   Modified files:
>     src/libraries/base/Data Tree.hs 
>   Log:
>   Exclude functions 'unfoldTreeM' and 'unfoldForestM' in nhc98.
>   For some unknown reason they result in a type inference error:
>   "No default for Prelude.Monad"

Curious bug (in nhc98) -- it seems you need mutual recursion to trigger it,
as in:

        mapM_1 :: Monad m => (a -> m b) -> [a] -> m ()
        mapM_1 f [] = return ()
        mapM_1 f (x:xs) = f x >> mapM_2 f xs

        mapM_2 :: Monad m => (a -> m b) -> [a] -> m ()
        mapM_2 f [] = return ()
        mapM_2 f (x:xs) = f x >> mapM_1 f xs

Delete either signature and it goes away.
_______________________________________________
Cvs-libraries mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-libraries

Reply via email to