summaryrefslogtreecommitdiff
path: root/testsuite/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/runtime')
-rw-r--r--testsuite/runtime/eval/lazy.gf15
-rw-r--r--testsuite/runtime/eval/lazy.gfs2
-rw-r--r--testsuite/runtime/eval/lazy.gfs.gold2
3 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/runtime/eval/lazy.gf b/testsuite/runtime/eval/lazy.gf
new file mode 100644
index 000000000..51e230b3c
--- /dev/null
+++ b/testsuite/runtime/eval/lazy.gf
@@ -0,0 +1,15 @@
+abstract lazy = {
+
+cat Nat ;
+data zero : Nat ;
+ succ : Nat -> Nat ;
+
+fun infinity : Nat ;
+def infinity = succ infinity ;
+
+fun min : Nat -> Nat -> Nat ;
+def min zero _ = zero ;
+ min _ zero = zero ;
+ min (succ x) (succ y) = succ (min x y) ;
+
+} \ No newline at end of file
diff --git a/testsuite/runtime/eval/lazy.gfs b/testsuite/runtime/eval/lazy.gfs
new file mode 100644
index 000000000..b05e3a4b0
--- /dev/null
+++ b/testsuite/runtime/eval/lazy.gfs
@@ -0,0 +1,2 @@
+i -src testsuite/runtime/eval/lazy.gf
+pt -compute min infinity (succ (succ (succ zero))) \ No newline at end of file
diff --git a/testsuite/runtime/eval/lazy.gfs.gold b/testsuite/runtime/eval/lazy.gfs.gold
new file mode 100644
index 000000000..6b97546b4
--- /dev/null
+++ b/testsuite/runtime/eval/lazy.gfs.gold
@@ -0,0 +1,2 @@
+succ (succ (succ zero))
+