[Haskell-cafe] Performance of StateT and best practices for debugging
John Lato
jwlato at gmail.com
Fri Aug 8 06:56:43 UTC 2014
On Thu, Aug 7, 2014 at 9:31 PM, Bardur Arantsson <spam at scientician.net>
wrote:
> On 2014-08-07 19:57, Kyle Hanson wrote:
> > Hello,
> >
> > Here is the "makeBucket" function that is referenced (it is the same in
> > both state and nonstate):
> >
> >
> https://github.com/hansonkd/StrappedTemplates/blob/321a88168d54943fc217553c873f188797c0d4f5/examples/big_example.hs#L24
> >
>
> Just a shot in the dark, but I notice that you're using "modify" and not
> "modify'" which was added in a recent version of transformers.
>
> Strict.StateT is not always "strict enough" and you may need to use
> modify'.
>
> At any rate, it's worth a shot, I think.
>
Good point. I think that even modify' will not be strict enough without
adding strictness to RenderState as well.
John L.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140807/ce617687/attachment.html>
More information about the Haskell-Cafe
mailing list