From bb33c5e89993338f6e554210e87b27a5220ead98 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 19 Jan 2016 18:46:39 -0800 Subject: 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. --- 070text.mu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '070text.mu') 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 -- cgit 1.4.1-2-gfad0