[Haskell-cafe] Performance of StateT and best practices for debugging

Bardur Arantsson spam at scientician.net
Fri Aug 8 04:31:49 UTC 2014


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.

Regards,




More information about the Haskell-Cafe mailing list