Re: mapM/concatMapMy

2000-10-18 Thread Sengan Baring-Gould
Actually I think I figured it out: (>>=) (f c) (\x -> (>>=) (mapM f cs) (\xs -> return (x:xs))) -> (>>=) _(f c)_ (\x -> (>>=) (mapM f cs) (\xs -> return (x:xs))) -> (>>=) (MN c1) (\x -> (>>=) (mapM f cs) (\xs -> return (x:xs))) -> (\(MN c1) \fc2 -> MN $ \s0 -> let (r1,io1,s1) = c1 s0

Re: mapM/concatMapMy

2000-10-18 Thread Sengan Baring-Gould
> > [EMAIL PROTECTED] (Sengan Baring-Gould) wrote: > > > > > mapM seems to be a memory hog (and thus also concatMapM). > > > In the following eg: > > > > > > > main = mapM print ([1..102400] :: [Integer]) > > > > > > memory usage climbs to 1.6M with ghc and needs -K20M > > > > As a guess: sinc

Re: mapM/concatMapMy

2000-10-18 Thread Sengan Baring-Gould
> > > [EMAIL PROTECTED] (Sengan Baring-Gould) wrote: > > > mapM seems to be a memory hog (and thus also concatMapM). > > In the following eg: > > > > > main = mapM print ([1..102400] :: [Integer]) > > > > memory usage climbs to 1.6M with ghc and needs -K20M > > As a guess: since 'mapM print

Re: mapM/concatMapM

2000-10-18 Thread Joe English
[EMAIL PROTECTED] (Sengan Baring-Gould) wrote: > mapM seems to be a memory hog (and thus also concatMapM). > In the following eg: > > > main = mapM print ([1..102400] :: [Integer]) > > memory usage climbs to 1.6M with ghc and needs -K20M As a guess: since 'mapM print ([1..102400] :: [Integer]

mapM/concatMapM

2000-10-18 Thread Sengan Baring-Gould
mapM seems to be a memory hog (and thus also concatMapM). In the following eg: > main = mapM print ([1..102400] :: [Integer]) memory usage climbs to 1.6M with ghc and needs -K20M, whereas with > main = print ([1..102400] :: [Integer]) memory usage is only 1300 bytes. I instrumented mapM: >

RE: Num class

2000-10-18 Thread Mark P Jones
Hi Koen, | If Show were not a super class of Num, the following program | would generate an error: | | main = print 42 | | If Eq were not a super class, the following program would | not work: | | main = print (if 42 == 42 then "koe" else "apa") | | These programs are all fixed by inserti

Re: Num class

2000-10-18 Thread Marcin 'Qrczak' Kowalczyk
Wed, 18 Oct 2000 12:57:56 +0200 (MET DST), Koen Claessen <[EMAIL PROTECTED]> pisze: > The defaulting mechanism works as follows: If there is an unresolved > overloading error on a type variable a, which has as an *only* > constraint (Num a), then we take a to be the suitable default. This is not

Re: pronunciation of >>=

2000-10-18 Thread Lars Lundgren
On Wed, 18 Oct 2000, Scott Turner wrote: > Is there a common way to pronounce ">>=" in discussions or when teaching? > I've learned all my Haskell from printed/visual documents. How about 'bind'? and ">>" => 'then'. /Lars L ___ Haskell mailing list

pronunciation of >>=

2000-10-18 Thread Scott Turner
Is there a common way to pronounce ">>=" in discussions or when teaching? I've learned all my Haskell from printed/visual documents. -- Scott Turner [EMAIL PROTECTED] http://www.ma.ultranet.com/~pkturner ___ Haskell mailing list [EMAIL PROTECTED]

Num class

2000-10-18 Thread Koen Claessen
Hi all, For years I have wondered why the Num class has the Eq class and the Show class as super classes. Because of this, I cannot make functions an instance of Num (becuase they are not in Eq or Show). Or a datatype respresenting an infinite amount of digits (because Eq would not make any sens