[Shootout-list] Regexmatch woes with Haskell

Brent Fulgham bfulg@pacbell.net
Tue, 8 Mar 2005 10:10:09 -0800 (PST)


--- Einar Karttunen <ekarttun@cs.helsinki.fi> wrote:

> Implementing regexmatch correctly in Haskell seems
> quite problematic. 
[ ... ]
> The GHC optimizer looks at that and generates
> code for "print x" - as the thing inside the loop is
> not used for anything and has no side-effects. 

I've had this issue bounching around in my head for 
some time.  I don't intend for the benchmarks to
become
confounding, arcane messes just to require the
language to perform the right number of steps.

I wonder if it would be better to allow the compiler
to perform any optimizations it wants, and just use
much larger input files?

-Brent