mirror of
https://github.com/sayo-hs/heftia.git
synced 2024-11-26 23:05:04 +03:00
[fix] Adjusted the order of NonDet+Except results in SemanticsZoo example with the order in semantics-zoo.md.
This commit is contained in:
parent
c7d0b45fef
commit
f5482eab47
@ -33,10 +33,10 @@ $ cabal run exe:SemanticsZoo
|
||||
( runThrow . evalState . runCatch $ action ) = Right True
|
||||
|
||||
# NonDet + Except
|
||||
( runThrow . runNonDet . runCatch . runChooseH $ action1 ) = Right [True,False]
|
||||
( runNonDet . runThrow . runCatch . runChooseH $ action1 ) = [Right True,Right False]
|
||||
( runThrow . runNonDet . runCatch . runChooseH $ action2 ) = Right [False,True]
|
||||
( runThrow . runNonDet . runCatch . runChooseH $ action1 ) = Right [True,False]
|
||||
( runNonDet . runThrow . runCatch . runChooseH $ action2 ) = [Right False,Right True]
|
||||
( runThrow . runNonDet . runCatch . runChooseH $ action2 ) = Right [False,True]
|
||||
|
||||
# NonDet + Writer
|
||||
( runNonDet . runTell . elaborateWriter . runChooseH $ action ) = [(3,(3,True)),(4,(4,False))]
|
||||
|
@ -52,14 +52,14 @@ nonDetPlusExcept = do
|
||||
String ->
|
||||
IO ()
|
||||
testAllPattern action name = do
|
||||
putStr $ "( runThrow . runNonDet . runCatch . runChooseH $ " <> name <> " ) = "
|
||||
print . runPure $
|
||||
runThrow @() . runNonDet @[] . runCatch @() . runChooseH $ action
|
||||
|
||||
putStr $ "( runNonDet . runThrow . runCatch . runChooseH $ " <> name <> " ) = "
|
||||
print . runPure $
|
||||
runNonDet @[] . runThrow @() . runCatch @() . runChooseH $ action
|
||||
|
||||
putStr $ "( runThrow . runNonDet . runCatch . runChooseH $ " <> name <> " ) = "
|
||||
print . runPure $
|
||||
runThrow @() . runNonDet @[] . runCatch @() . runChooseH $ action
|
||||
|
||||
testAllPattern action1 "action1"
|
||||
testAllPattern action2 "action2"
|
||||
|
||||
@ -99,10 +99,10 @@ main = do
|
||||
( runThrow . evalState . runCatch $ action ) = Right True
|
||||
|
||||
# NonDet + Except
|
||||
( runThrow . runNonDet . runCatch . runChooseH $ action1 ) = Right [True,False]
|
||||
( runNonDet . runThrow . runCatch . runChooseH $ action1 ) = [Right True,Right False]
|
||||
( runThrow . runNonDet . runCatch . runChooseH $ action2 ) = Right [False,True]
|
||||
( runThrow . runNonDet . runCatch . runChooseH $ action1 ) = Right [True,False]
|
||||
( runNonDet . runThrow . runCatch . runChooseH $ action2 ) = [Right False,Right True]
|
||||
( runThrow . runNonDet . runCatch . runChooseH $ action2 ) = Right [False,True]
|
||||
|
||||
# NonDet + Writer
|
||||
( runNonDet . runTell . elaborateWriter . runChooseH $ action ) = [(3,(3,True)),(4,(4,False))]
|
||||
|
Loading…
Reference in New Issue
Block a user