I'm constantly surprised hearing from so many people about their space
problems. I cannot remember having space problems with my programs. I
don't know what everybody else is doing wrong :-)
At least two common cases.
Extracting compact data structures from large files. The contents of
On Friday 07 January 2005 12:03, Ketil Malde wrote:
Naive use of foldl. I tend to think the default foldl should be
strict (ie. replaced by foldl') -- are there important cases where it
needs to be lazy?
Hi,
One simple example would be,
reverse = foldl (flip (:)) []
J.A.
Jorge Adriano Aires [EMAIL PROTECTED] writes:
Naive use of foldl. I tend to think the default foldl should be
strict (ie. replaced by foldl') -- are there important cases where it
needs to be lazy?
Hi,
One simple example would be,
reverse = foldl (flip (:)) []
No, it would work with
On Friday 07 January 2005 12:03, Ketil Malde wrote:
Naive use of foldl. I tend to think the default foldl should be
strict (ie. replaced by foldl') -- are there important cases where it
needs to be lazy?
Hi,
One simple example would be,
reverse = foldl (flip (:)) []
A better example
No, it would work with strict foldl too. In fact in the absence
of optimization it would work better (uses less time and space).
The optimization required is inlining and strictness analysis.
Is this also true if your just going to use the first few elements after
reversing it?
A function
Jorge Adriano Aires [EMAIL PROTECTED] writes:
No, it would work with strict foldl too. In fact in the absence
of optimization it would work better (uses less time and space).
The optimization required is inlining and strictness analysis.
Is this also true if your just going to use the first
On Sunday 09 January 2005 21:30, Marcin 'Qrczak' Kowalczyk wrote:
Jorge Adriano Aires [EMAIL PROTECTED] writes:
No, it would work with strict foldl too. In fact in the absence
of optimization it would work better (uses less time and space).
The optimization required is inlining and
(+) is
usually strict on both arguments (although in principle it does not
have to be true because of overloading, which implies that a compiler
can only optimize particular specializations of sum, not generic sum).
Since you mention it, there was some talk about this in the #haskell channel,
Many thanks to everyone for the very helpful answers to my queries!
- Benjamin
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
| * As far as I can determine, there is no way to check pattern matches
for
| exhaustiveness. Coming from OCaml, this feels like losing a
significant
| safety net! How do people program so as not to be getting dynamic
match
| failures all the time?
GHC has -fwarn-incomplete-patterns and
[EMAIL PROTECTED] writes:
I'm constantly surprised hearing from so many people about their space
problems. I cannot remember having space problems with my programs. I
don't know what everybody else is doing wrong :-)
At least two common cases.
Extracting compact data structures from large
Benjamin Pierce wrote:
OK, I'm taking the plunge and using Haskell in a course I'm teaching this
semester. To get ready, I've been doing quite a bit of Haskell programming
myself, and this has raised a few questions...
* What are the relative advantages of Hugs and GHC, beyond the obvious (Hugs
On Thu, Jan 06, 2005 at 09:11:13AM -0800, Benjamin Pierce wrote:
* As far as I can determine, there is no way to check pattern matches for
exhaustiveness. Coming from OCaml, this feels like losing a significant
safety net! How do people program so as not to be getting dynamic match
On Thu, 6 Jan 2005, Benjamin Pierce wrote:
* What are the relative advantages of Hugs and GHC, beyond the obvious (Hugs
is smaller and easier for people not named Simon to modify, while GHC is a
real compiler and has the most up-to-date hacks to the type checker)? Do
people generally
Benjamin Pierce [EMAIL PROTECTED] writes:
* What are the relative advantages of Hugs and GHC, beyond the obvious (Hugs
is smaller and easier for people not named Simon to modify, while GHC is a
real compiler and has the most up-to-date hacks to the type checker)? Do
people generally
Benjamin Pierce wrote:
* What are the relative advantages of Hugs and GHC, beyond the obvious (Hugs
is smaller and easier for people not named Simon to modify, while GHC is a
real compiler and has the most up-to-date hacks to the type checker)? Do
people generally use one or the other
On Thu, 6 Jan 2005, Greg Buchholz wrote:
As one data point, I don't think SOEGraphics works with GHC or
recent versions of Hugs (http://www.haskell.org/soe/graphics.htm).
I had trouble with this recently, and a friend of a friend suggested I use
the latest GHC from CVS, and import
17 matches
Mail list logo