mirror of
https://github.com/polysemy-research/polysemy.git
synced 2024-12-12 13:06:18 +03:00
a20994abab
* Fix a serious bug in interpretH and friends * Spec to prove reader works now
17 lines
355 B
Haskell
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!"
|
|
|