strict Haskell dialect

Creighton Hogg wchogg at
Wed Feb 1 10:42:45 EST 2006

On Wed, 1 Feb 2006, Bulat Ziganshin wrote:

> Hello John,
> Wednesday, February 01, 2006, 6:48:48 AM, you wrote:
> >> On the other hand, if pattern bindings were strict by default, I bet
> >> there would be a lot fewer accidental space leaks.
> JM> I don't think this is true. I think there would just be a whole lot of a
> JM> different type of space leak. Lazy by default is more in the spirit of
> JM> haskell.
> i had one idea, what is somewhat corresponding to his discussion:
> make a strict Haskell dialect. implement it by translating all
> expressions of form "f x" into "f $! x" and then going to the standard
> (lazy) haskell translator. the same for data fields - add to all field
> definitions "!" in translation process. then add to this strict
> Haskell language ability to _explicitly_ specify lazy fields and lazy
> evaluation, for example using this "~" sign
> what it will give? ability to use Haskell as powerful strict language,
> what is especially interesting for "real-world" programmers. i have
> found myself permanently fighting against the lazyness once i starting to
> optimize my programs. for the newcomers, it just will reduce learning
> path - they don't need to know anything about lazyness
> another interesting application of such a language is to make strict
> and lazy versions of data structures just by compiling the same module
> in the strict and lazy Haskell modes

I apologize in advance if I say something silly, but 
wouldn't such a language transformation be a use for 
Template Haskell?  Superficially, it seems like you should 
be able to do that.

More information about the Haskell-prime mailing list