Re: cvs commit: nhc98/src/libraries/base/Data Tree.hs
Ross Paterson <[email protected]> Wed, 4 Feb 2004 16:39:30 +0000
| Newsgroups | gmane.comp.lang.haskell.cvs.libraries,gmane.comp.lang.haskell.nhc.bugs |
|---|---|
| Message-ID | <[email protected]> |
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.