-XStrict: Why some binders are not made strict?

Brandon Allbery allbery.b at gmail.com
Tue Dec 8 01:43:06 UTC 2015


On Mon, Dec 7, 2015 at 8:40 PM, Ömer Sinan Ağacan <omeragacan at gmail.com>
wrote:

> With -XStrict 'x', 'xs', 'y' and 'ys' don't become strict. I'm wondering
> about
> the motivation behind this, I found this interesting. I always thought
> -XStrict
> gives me this guarantee: If I'm using an already-defined variable(bound by
> a
> let or pattern matching) in an expression, I can be sure that the variable
> won't be bottom in that expression, because it would be `seq`d before the
> expression is evaluated.
>

Aren't those already guaranteed to be strict because of pattern matching?
Try it again with irrefutable patterns.

-- 
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://mail.haskell.org/pipermail/ghc-devs/attachments/20151207/758937ff/attachment.html>


More information about the ghc-devs mailing list