On Thu, Feb 16, 2012 at 5:03 PM, Alex Mason <axm...@gmail.com> wrote:
> Of course, that makes sense. Do we already have a way to specify that a field 
> should be lazy? I can imagine programs where we don't want this behaviour, 
> and people would need an escape hatch (or their programs might run slower, or 
> even not terminate). I know we've got lazy patterns with ~, do we have data 
> Foo = Foo ~Int | Bar ~Double

This optimization would only apply for strict fields (otherwise it
would be unsound.) There's already a NOUNPACK pragma in HEAD that lets
you turn the optimization off. I think NOUNPACK was added both to
support this feature and so one could turn off the effect of
`-funbox-strict-fields` selectively.

-- Johan

_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to