git.iko.soy/effects-benchmarks
on master help sign in
22 lines 524 B history raw
1module ExtEff.Bench
2 ( countDownBench,
3 countDownExcBench,
4 httpBench,
5 )
6where
8import Control.Eff
9import Control.Eff.Exception
10import Control.Eff.State.Strict
11import ExtEff.HTTP
12import ExtEff.Stateful
13import ExtEff.StatefulExcept
15countDownBench :: Int -> (Int, Int)
16countDownBench start = run . runState start $ countDownPut
18countDownExcBench :: Int -> Either String (Int, Int)
19countDownExcBench start = run . runError . runState start $ countDownExc
21httpBench :: Int -> IO Int
22httpBench n = runHttp (doHTTP n)