some more tests for evaluation in the abstract syntax
This commit is contained in:
1 parent
8f2fb82750
commit
401dfc28d6
3 files changed
+38
No files matched your search
@@ -0,0 +1,17 @@
|
|||||||
|
abstract lambda = {
|
||||||
|
|
||||||
|
fun f1 : Int -> Int ;
|
||||||
|
def f1 = (\x -> x) ;
|
||||||
|
|
||||||
|
fun f2 : Int ;
|
||||||
|
def f2 = f1 1 ;
|
||||||
|
|
||||||
|
cat D ;
|
||||||
|
data D1 : D ;
|
||||||
|
D2 : D ;
|
||||||
|
|
||||||
|
fun d : D -> Int -> Int ;
|
||||||
|
def d D1 = \x -> x ;
|
||||||
|
d D2 = \x -> 2 ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
i testsuite/paraphrase/lambda.gf
|
||||||
|
|
||||||
|
pt -compute f1
|
||||||
|
pt -compute f2
|
||||||
|
|
||||||
|
pt -compute d D1
|
||||||
|
pt -compute d D2
|
||||||
|
pt -compute d D1 1
|
||||||
|
pt -compute d D2 1
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
\v0 -> v0␍
|
||||||
|
␍
|
||||||
|
1␍
|
||||||
|
␍
|
||||||
|
\v0 -> v0␍
|
||||||
|
␍
|
||||||
|
\v0 -> 2␍
|
||||||
|
␍
|
||||||
|
1␍
|
||||||
|
␍
|
||||||
|
2␍
|
||||||
|
␍
|
||||||
Reference in new issue
Block a user