git.iko.soy/effects-benchmarks
on master help sign in
Remove vestigial organs
commitd7b7815ba045788e897638d665c9ae2754992ee8 authorPatrick Thomson <patrickt@github.com> dateMon 6 May 2019, 13:28 (7 years ago) parent33f4e05
4 files changed+6−23
effects-benchmarks.cabal+4−4 instances/FSStateful.hs → instances/Freer/Stateful.hs+1−1 instances/MTLStateful.hs → instances/MTL/Stateful.hs+1−1 instances/PStateful.hs−17
effects-benchmarks.cabal+4−4
@@ -44,7 +44,7 @@ library instances-for-exteff
4444library instances-for-mtl
4545 import: shared
4646 hs-source-dirs: instances
47− exposed-modules: MTLStateful
47+ exposed-modules: MTL.Stateful
4848 , MTL.StatefulExcept
4949 , MTL.HTTP
5050 build-depends: mtl ^>= 2.2.2
@@ -60,7 +60,7 @@ library instances-for-fused-effects
6060library instances-for-freer-simple
6161 import: shared
6262 hs-source-dirs: instances
63− exposed-modules: FSStateful
63+ exposed-modules: Freer.Stateful
6464 , Freer.StatefulExcept
6565 , Freer.HTTP
6666 build-depends: freer-simple ^>= 1.2.1
@@ -89,9 +89,9 @@ benchmark effects-benchmarks
8989 , weigh
9090 , polysemy
9191 main-is: Main.hs
92− mixins: benchmark-signatures (Bench.Countdown as MTL.Countdown, Bench.HTTP as MTL.HTTPM) requires (Bench.Signature.Stateful as MTLStateful, Bench.Signature.StatefulExcept as MTL.StatefulExcept, Bench.Signature.HTTP as MTL.HTTP)
92+ mixins: benchmark-signatures (Bench.Countdown as MTL.Countdown, Bench.HTTP as MTL.HTTPM) requires (Bench.Signature.Stateful as MTL.Stateful, Bench.Signature.StatefulExcept as MTL.StatefulExcept, Bench.Signature.HTTP as MTL.HTTP)
9393 , benchmark-signatures (Bench.Countdown as Fused.Countdown, Bench.HTTP as Fused.HTTPM) requires (Bench.Signature.Stateful as Fused.Stateful, Bench.Signature.StatefulExcept as Fused.StatefulExcept, Bench.Signature.HTTP as Fused.HTTP)
94− , benchmark-signatures (Bench.Countdown as Simple.Countdown, Bench.HTTP as Simple.HTTPM) requires (Bench.Signature.Stateful as FSStateful, Bench.Signature.StatefulExcept as Freer.StatefulExcept, Bench.Signature.HTTP as Freer.HTTP)
94+ , benchmark-signatures (Bench.Countdown as Simple.Countdown, Bench.HTTP as Simple.HTTPM) requires (Bench.Signature.Stateful as Freer.Stateful, Bench.Signature.StatefulExcept as Freer.StatefulExcept, Bench.Signature.HTTP as Freer.HTTP)
9595 , benchmark-signatures (Bench.Countdown as Shallow.Countdown, Bench.HTTP as Shallow.HTTPM) requires (Bench.Signature.Stateful as Shallow.Stateful, Bench.Signature.StatefulExcept as Shallow.StatefulExcept, Bench.Signature.HTTP as Shallow.HTTP)
9696 , benchmark-signatures (Bench.Countdown as Poly.Countdown, Bench.HTTP as Poly.HTTPM) requires (Bench.Signature.Stateful as Poly.Stateful, Bench.Signature.StatefulExcept as Poly.StatefulExcept, Bench.Signature.HTTP as Poly.HTTP)
9797 , benchmark-signatures (Bench.Countdown as ExtEff.Countdown, Bench.HTTP as ExtEff.HTTPM) requires (Bench.Signature.Stateful as ExtEff.Stateful, Bench.Signature.StatefulExcept as ExtEff.StatefulExcept, Bench.Signature.HTTP as ExtEff.HTTP)
instances/FSStateful.hs → instances/Freer/Stateful.hsrenamed+1−1
@@ -1,6 +1,6 @@
11{-# LANGUAGE TypeApplications, DataKinds #-}
22
3−module FSStateful where
3+module Freer.Stateful where
44
55import Control.Monad.Freer
66import Control.Monad.Freer.State as State
instances/MTLStateful.hs → instances/MTL/Stateful.hsrenamed+1−1
@@ -1,4 +1,4 @@
1−module MTLStateful where
1+module MTL.Stateful where
22
33import qualified Control.Monad.State.Strict as MTL
44import Data.Tuple
instances/PStateful.hsdeleted−17
@@ -1,17 +0,0 @@
1−{-# LANGUAGE TypeApplications, DataKinds #-}
2−
3−module PStateful where
4−
5−import Polysemy
6−import Polysemy.State as State
7−
8−type StateM = Sem '[State Int]
9−
10−get :: StateM Int
11−get = State.get
12−
13−put :: Int -> StateM ()
14−put = State.put
15−
16−runStateful :: Int -> StateM a -> (Int, a)
17−runStateful n x = run $ State.runState n x