projects
/
scheme.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Formulate destructors properly
[scheme.git]
/
tests.scm
diff --git
a/tests.scm
b/tests.scm
index 398793059e48cdd4b4523cf09fa5fc4b43359b3f..30d23f61ed6375c786574a1d18056eb0278b398a 100644
(file)
--- a/
tests.scm
+++ b/
tests.scm
@@
-43,6
+43,15
@@
(let ((str (read-file "/tmp/test-output.txt")))
(test str output)))
(let ((str (read-file "/tmp/test-output.txt")))
(test str output)))
+(test (data-tors '(data A
+ (foo Int Bool)
+ (bar Bool)))
+ '((foo . (abs Int (abs Bool A)))
+ (foo~0 . (abs A Int))
+ (foo~1 . (abs A Bool))
+ (bar . (abs Bool A))
+ (bar~0 . (abs A Bool))))
+
(test-types (typecheck '((lambda (x) (+ ((lambda (y) (x y 3)) 5) 2))))
'(abs (abs Int (abs Int Int)) Int))
(test-types (typecheck '((lambda (x) (+ ((lambda (y) (x y 3)) 5) 2))))
'(abs (abs Int (abs Int Int)) Int))