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
> > [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
>
>
> [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
[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 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:
>
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
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
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
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]
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
10 matches
Mail list logo