pass continuations as arguments, use normal stack
build / build (push) Successful in 28s

This commit is contained in:
2026-08-24 23:41:52 -06:00
parent 796b967686
commit 87baed9efc
13 changed files with 158 additions and 136 deletions
+7 -4
View File
@@ -4,10 +4,11 @@ import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit
import qualified Gyehoek.CPS.Stackify as Sut
import Gyehoek.Stack.VM as Stk
import Data.List (List)
import Gyehoek.CPS.Syntax (cps)
import Gyehoek.CPS.Syntax qualified as CPS
import Gyehoek.GenSym (runGenSym)
import Effectful
import Gyehoek.Prelude
test_stackify =
@@ -19,9 +20,11 @@ test_stackify =
]
evalsTo :: List Obj -> Sut.Exp -> Assertion
evalsTo rs e =
Stk.eval e' @?= rs
where e' = runPureEff . runGenSym $ Sut.stackifyExp "main" e
evalsTo rs e = Stk.eval e' @?= rs
where
e' = e & CPS.MkLambda [] "_ktail"
& CPS.MkProgram
& Sut.stackifyProgram & runGenSym & runPureEff
trivialReturn = testGroup "trivial return"
[ testCase "return int" do