about summary refs log tree commit diff stats
path: root/070text.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-01-19 18:46:39 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-01-19 18:46:39 -0800
commitbb33c5e89993338f6e554210e87b27a5220ead98 (patch)
tree59cab2622fa19c0aa0f625c989145dfa59d2b1dc /070text.mu
parent5002169370c854b6f532b420225b80e7ef18d6ad (diff)
downloadmu-bb33c5e89993338f6e554210e87b27a5220ead98.tar.gz
2573 - check product type of 'new'
I realize that my current doesn't allow nesting a:b:c linear type syntax
inside a dilated property. So you can't currently say:

  (recipe address:number)

Need to fix that at some point. Non-trivial since linear syntax is
oblivious to dilated syntax. I should probably make the dilated syntax
more fundamental and introduce it at an earlier layer.
Diffstat (limited to '070text.mu')
-rw-r--r--070text.mu4
1 files changed, 2 insertions, 2 deletions
diff --git a/070text.mu b/070text.mu
index 930b4587..37acdfd5 100644
--- a/070text.mu
+++ b/070text.mu
@@ -1080,7 +1080,7 @@ recipe split s:address:array:character, delim:character -> result:address:array:
   {
     empty?:boolean <- equal len, 0
     break-unless empty?
-    result <- new location:type, 0
+    result <- new {(address array character): type}, 0
     reply
   }
   # count #pieces we need room for
@@ -1095,7 +1095,7 @@ recipe split s:address:array:character, delim:character -> result:address:array:
     loop
   }
   # allocate space
-  result <- new location:type, count
+  result <- new {(address array character): type}, count
   # repeatedly copy slices start..end until delimiter into result[curr-result]
   curr-result:number <- copy 0
   start:number <- copy 0