about summary refs log tree commit diff stats
path: root/068random.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-09-17 10:30:24 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-09-17 10:30:24 -0700
commit51b0936fc78814134c2e90256fda6e048ba5244e (patch)
treeb8bd8321e982be64e5d40972c69da61d93f74b3d /068random.mu
parent7a84094adbf7570e0b9716d8f469458b901efec8 (diff)
downloadmu-51b0936fc78814134c2e90256fda6e048ba5244e.tar.gz
3386
Diffstat (limited to '068random.mu')
-rw-r--r--068random.mu14
1 files changed, 7 insertions, 7 deletions
diff --git a/068random.mu b/068random.mu
index 321d0c45..22f186e1 100644
--- a/068random.mu
+++ b/068random.mu
@@ -1,4 +1,4 @@
-def random generator:address:stream:num -> result:num, fail?:boolean, generator:address:stream:num [
+def random generator:address:stream:num -> result:num, fail?:bool, generator:address:stream:num [
   local-scope
   load-ingredients
   {
@@ -17,7 +17,7 @@ def assume-random-numbers -> result:address:stream:num [
   # compute result-len, space to allocate in result
   result-len:num <- copy 0
   {
-    _, arg-received?:boolean <- next-ingredient
+    _, arg-received?:bool <- next-ingredient
     break-unless arg-received?
     result-len <- add result-len, 1
     loop
@@ -26,7 +26,7 @@ def assume-random-numbers -> result:address:stream:num [
   result-data:address:array:num <- new number:type, result-len
   idx:num <- copy 0
   {
-    curr:num, arg-received?:boolean <- next-ingredient
+    curr:num, arg-received?:bool <- next-ingredient
     break-unless arg-received?
     *result-data <- put-index *result-data, idx, curr
     idx <- add idx, 1
@@ -38,10 +38,10 @@ def assume-random-numbers -> result:address:stream:num [
 scenario random-numbers-in-scenario [
   local-scope
   source:address:stream:num <- assume-random-numbers 34, 35, 37
-  1:num/raw, 2:boolean/raw <- random source
-  3:num/raw, 4:boolean/raw <- random source
-  5:num/raw, 6:boolean/raw <- random source
-  7:num/raw, 8:boolean/raw <- random source
+  1:num/raw, 2:bool/raw <- random source
+  3:num/raw, 4:bool/raw <- random source
+  5:num/raw, 6:bool/raw <- random source
+  7:num/raw, 8:bool/raw <- random source
   memory-should-contain [
     1 <- 34
     2 <- 0  # everything went well