
17 Nov
2009
17 Nov
'09
9:56 p.m.
On Tue, Nov 17, 2009 at 6:33 PM, Edward Kmett
I gather from the discussion that State is no longer separate from StateT, along with Reader, Writer, RWS, Error, mutatis mutandis to obviate the need for both a base monad and transformer.
Every time this comes up I grow paranoid that there is some sort of general overhead to evaluating an expression of type "StateT s Identity a" vs "State s a". So I finally benchmarked it using the example code listed in Control.Monad.State, and found no difference whatsoever. Here's the source: http://hpaste.org/fastcgi/hpaste.fcgi/view?id=12259#a12259 I guess parsec is the odd one out, where there is a difference. Or I was measuring something else back when I had parsec benchmarks set up. Antoine