Haskell Platform Proposal: add transformers and revise the mtl
package to depend on it
Ross Paterson
ross at soi.city.ac.uk
Fri Sep 17 06:36:54 EDT 2010
On Thu, Sep 16, 2010 at 11:10:37AM +0200, Johan Tibell wrote:
> I would like to know if this additional abstraction has a noticeable
> performance cost. Does anyone know of a benchmark that could be used to test
> this? Perhaps one involving State.
With mtl-1, the following
incr1 :: State Int ()
incr1 = do
n <- get
put $! n+1
incr2 :: StateT Int Identity ()
incr2 = do
n <- get
put $! n+1
generate the same Core code (except for casts).
More information about the Libraries
mailing list