[add] the Issue 12 Semantics Test to README.md.

This commit is contained in:
Yamada Ryo 2024-09-09 16:32:37 +09:00
parent 03a43f09a6
commit 08f5cfe6a8
No known key found for this signature in database
GPG Key ID: AAE3C7A542B02DBF

View File

@ -99,6 +99,10 @@ $ cabal run exe:SemanticsZoo
( runNonDet . runTell . elaborateWriter . runChooseH $ action ) = [(3,(3,True)),(4,(4,False))] ( runNonDet . runTell . elaborateWriter . runChooseH $ action ) = [(3,(3,True)),(4,(4,False))]
( runTell . runNonDet . elaborateWriter . runChooseH $ action ) = (6,[(3,True),(4,False)]) ( runTell . runNonDet . elaborateWriter . runChooseH $ action ) = (6,[(3,True),(4,False)])
# https://github.com/hasura/eff/issues/12
interpret SomeEff then runCatch : ( runThrow . runCatch . runSomeEff $ action ) = Right "caught"
runCatch then interpret SomeEff : ( runThrow . runSomeEff . runCatch $ action ) = Left "not caught"
[Note] All other permutations will cause type errors. [Note] All other permutations will cause type errors.
$ $
``` ```