[Haskell-beginners] deep seq and bang patterns

Brandon Allbery allbery.b at gmail.com
Tue Dec 25 15:39:29 CET 2012


On Tue, Dec 25, 2012 at 7:20 AM, Emmanuel Touzery <etouzery at gmail.com>wrote:

> to be clear: I definitely have strict evaluation now. It works. And it
> helped me to fix my bug (it's fixed now).
>
> But I think that to actually get strict evaluation I needed BOTH bang
> patterns AND deep seq, at that same time... Which seems strange to me, I
> would think that either would suffice.
>

Bang patterns / seq only evaluate to the first constructor; deepseq
evaluates all the way down.  It's not that surprising that you would need
both, depending on what exactly you're doing.

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20121225/8d7fc7cd/attachment.htm>


More information about the Beginners mailing list