> (+) 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 chann
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 a
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 t
> 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 functi
> 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 bet
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 w
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.
___
>> 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 conte
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
L.S.,
Olaf <[EMAIL PROTECTED]> wrote:
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 I do disagree with
people recommending strictness annotations (seq etc).
On Fri, Jan 07, 2005 at 08:49:32AM -0500, Paul Hudak wrote:
> I taught our FP class this fall using Hugs, but in the end wish that I
> had used GHC. There are lots of little reasons for this, but a big one
> was a problem with unpredictable space utilization. I don't have the
> examples at my
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
[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
> * 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 for everything,
| * 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 -f
On Thu, Jan 06, 2005 at 09:11:13AM -0800, Benjamin Pierce wrote:
> * I wrote a little program for generating Sierpinkski Carpets, and was
> astonished to find that it runs out of heap under Hugs (with standard
> settings -- raising the heap size with -h leads to a happier result).
This is an a
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 Gra
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 othe
On Thu, 6 Jan 2005, 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
failures all the time?
Where not
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 general
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 general
On Thu, 6 Jan 2005, David Roundy wrote:
> 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
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
>
23 matches
Mail list logo