about summary refs log tree commit diff stats
path: root/chessboard.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 /chessboard.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 'chessboard.mu')
-rw-r--r--chessboard.mu2
1 files changed, 1 insertions, 1 deletions
diff --git a/chessboard.mu b/chessboard.mu
index 3347e253..f1bd8853 100644
--- a/chessboard.mu
+++ b/chessboard.mu
@@ -116,7 +116,7 @@ recipe new-board initial-position:address:array:character -> board:address:array
   correct-length?:boolean <- equal len, 64
   assert correct-length?, [chessboard had incorrect size]
   # board is an array of pointers to files; file is an array of characters
-  board <- new location:type, 8
+  board <- new {(address array character): type}, 8
   col:number <- copy 0
   {
     done?:boolean <- equal col, 8