[Haskell-cafe] Newbie vs. laziness

Alex Queiroz asandroq at gmail.com
Tue Mar 20 10:04:45 EDT 2007


Hallo,

On 3/20/07, Jules Bean <jules at jellybean.co.uk> wrote:
>
> What $! does is force its arguments into WHNF before applying the
> function. WHNF means, roughly, either a lambda or a constructor at the
> top-level.
>

     I think I got it now.

>
> However that's a bit clumsy. What kind of error are you seeing when you
> say 'it crashes'?
>

     I must fetch all rows of the result, otherwise the database will
be in an inconsistent state and all subsequent queries crash the
application. Fetching all rows automatically finishes the previous
statement, so I must evaluate the spine of the list.

Cheers,
-- 
-alex
http://www.ventonegro.org/


More information about the Haskell-Cafe mailing list