Proposal: module namespaces.

2001-02-26 Thread Malcolm Wallace
This is an annoucement of a new mailing list, and a proposal for three things: * An extended mechanism for module namespaces in Haskell. * A "standard" namespace for new libraries, common across all systems. * A social process for adding new libraries to the "standard" set. A formatted

Re: foldl, tail recursion, and strictness (was: stack overflow)

2001-02-26 Thread George Russell
I know it's complete heresy to say so, but I use laziness very little in Haskell, while I probably pay quite a lot for it in CPU time and memory, because of all those thunks which have to be stored. However I prefer Haskell's type classes, syntax and purity to, say, Standard ML. So I wonder whet

Re: foldl, tail recursion, and strictness (was: stack overflow)

2001-02-26 Thread Ketil Malde
"C.Reinke" <[EMAIL PROTECTED]> writes: > So foldl is indeed tail recursive, but this doesn't help if its > operator isn't strict because the tail recursion only builds up the > expression to be evaluated. Making strictness explicit by defining a > variant of foldl that evaluates its accumulator a

recip for Ratio

2001-02-26 Thread Scott Turner
In the Haskell 98 Library Report, recip is defined for the Ratio type as: recip (x:%y) = if x < 0 then (-y) :% (-x) else y :% x Is it intentional that recip (0 % 1) is not an error? Everywhere else the denominator is forced to be positive. Infinity can be a useful number, if the type

foldl, tail recursion, and strictness (was: stack overflow)

2001-02-26 Thread C.Reinke
"Julian Assange" <[EMAIL PROTECTED]>: > .. > | When used with a 170k input file, makemap suffers from a stack > | overflow. foldl should be tail recursive. What's the score? "Simon Peyton-Jones" <[EMAIL PROTECTED]>: > Consider > foldl (+) 0 [x1,x2,x3,x4,... > > This rewrites to > >

Tree handling

2001-02-26 Thread Martin Gustafsson
Hello   I'm a haskell newbie that tries to create a tree with arbitary numbers of childs. I create the data structure but i can't do anything on it can someone please help me with a small function that sums the values of the leafs, so i don´t loose my hair so fast.   The datastructure looks

Lectureships in Nottingham

2001-02-26 Thread Graham Hutton
Dear all, We are currently advertising for new lecturers in Nottingham. There are no particular research areas specified for these positions, but applications in the area of the Languages and Programming research group (http://www.cs.nott.ac.uk/Research/lap/) would be most welcome. The closing

RE: stack overflow

2001-02-26 Thread Simon Peyton-Jones
Consider foldl (+) 0 [x1,x2,x3,x4,... This rewrites to foldl (+) (0 + x1) [x2,x3,x4,...] ==> foldl (+) (0 + x1 + x2) [x3,x4,...] ==> foldl (+) (0 + x1 + x2 +x3) [x4,...] And so on. So we build up a giant chain of thunks. Finally we evaluate the giant chain, and that bu