polysemy/test/HigherOrderSpec.hs
Sandy Maguire a20994abab
Fix broken higher order effects (#58)
* Fix a serious bug in interpretH and friends

* Spec to prove reader works now
2019-05-23 03:49:26 -04:00

17 lines
355 B
Haskell

module HigherOrderSpec where
import Polysemy
import Polysemy.Reader
import Test.Hspec
spec :: Spec
spec = describe "Reader local" $ do
it "should nest with itself" $ do
let foo = run . runReader "hello" $ do
local (++ " world") $ do
local (++ "!") $ do
ask
foo `shouldBe` "hello world!"