Re: cvs commit: nhc98/src/libraries/base/Data Tree.hs

4 Feb
2004
4 Feb
'04
4:39 p.m.
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.
7824
Age (days ago)
7824
Last active (days ago)
0 comments
1 participants
participants (1)
-
Ross Paterson