@@ -1,3 +1,4 @@
|
||||
{-# LANGUAGE OverloadedLists #-}
|
||||
module Gyehoek.Test.CPS.Syntax (root) where
|
||||
|
||||
import Test.Tasty (TestTree, testGroup)
|
||||
@@ -13,8 +14,20 @@ import Gyehoek.Test.Sexp (equivto)
|
||||
root :: IO TestTree
|
||||
root = pure . testGroup "cps syntax" $
|
||||
[ qqTree
|
||||
, freeTree
|
||||
]
|
||||
|
||||
freeTree :: TestTree
|
||||
freeTree = testCase "free" do
|
||||
Sut.free [cps|
|
||||
(letrec ((x (lambda (r k1) (continue k1 y)))
|
||||
(y (lambda (r k2) (continue k2 x))))
|
||||
(continue x y k3))|] @=? ["k3"]
|
||||
Sut.free' [cps|
|
||||
(letrec ((x (lambda (r k1) (continue k1 y)))
|
||||
(y (lambda (r k2) (continue k2 x))))
|
||||
(continue x y k3))|] @=? ["k3"]
|
||||
|
||||
qqTree :: TestTree
|
||||
qqTree = testGroup "parser"
|
||||
[ testCase "lambda" do
|
||||
|
||||
Reference in New Issue
Block a user