diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-01-19 18:46:39 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-01-19 18:46:39 -0800 |
commit | bb33c5e89993338f6e554210e87b27a5220ead98 (patch) | |
tree | 59cab2622fa19c0aa0f625c989145dfa59d2b1dc /070text.mu | |
parent | 5002169370c854b6f532b420225b80e7ef18d6ad (diff) | |
download | mu-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.mu | 4 |
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 |