aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/test/test/luxc/generator/case.lux
diff options
context:
space:
mode:
authorEduardo Julian2017-10-05 00:39:10 -0400
committerEduardo Julian2017-10-05 00:39:10 -0400
commit9a22dc032da2ab1f65d8a7f63b7f5f94e80dd40b (patch)
tree1e7a4aad73af3bc4daa18ddd4158080ace67a84d /new-luxc/test/test/luxc/generator/case.lux
parent54815ade282ff4feb81d7d557188bde8111db376 (diff)
- Simplified "eval".
Diffstat (limited to '')
-rw-r--r--new-luxc/test/test/luxc/generator/case.lux16
1 files changed, 9 insertions, 7 deletions
diff --git a/new-luxc/test/test/luxc/generator/case.lux b/new-luxc/test/test/luxc/generator/case.lux
index 9e6dbf928..9fec0d501 100644
--- a/new-luxc/test/test/luxc/generator/case.lux
+++ b/new-luxc/test/test/luxc/generator/case.lux
@@ -79,10 +79,11 @@
($_ seq
(test "Can generate pattern-matching."
(|> (do Monad<Lux>
- [runtime-bytecode @runtime;generate]
- (@eval;eval (@;generate valueS
- (#ls;AltP (#ls;SeqP path (#ls;ExecP (#ls;Bool true)))
- (#ls;SeqP (#ls;BindP +0) (#ls;ExecP (#ls;Bool false)))))))
+ [runtime-bytecode @runtime;generate
+ sampleI (@;generate valueS
+ (#ls;AltP (#ls;SeqP path (#ls;ExecP (#ls;Bool true)))
+ (#ls;SeqP (#ls;BindP +0) (#ls;ExecP (#ls;Bool false)))))]
+ (@eval;eval sampleI))
(macro;run (init-compiler []))
(case> (#R;Success valueG)
(:! Bool valueG)
@@ -91,9 +92,10 @@
false)))
(test "Can bind values."
(|> (do Monad<Lux>
- [runtime-bytecode @runtime;generate]
- (@eval;eval (@;generate (#ls;Nat to-bind)
- (#ls;SeqP (#ls;BindP +1) (#ls;ExecP (#ls;Variable 1))))))
+ [runtime-bytecode @runtime;generate
+ sampleI (@;generate (#ls;Nat to-bind)
+ (#ls;SeqP (#ls;BindP +1) (#ls;ExecP (#ls;Variable 1))))]
+ (@eval;eval sampleI))
(macro;run (init-compiler []))
(case> (#R;Success valueG)
(n.= to-bind (:! Nat valueG))