17 Mar 2010 19:50
[C--] Bug in Lua-ML
Michael Ekstrand <ekstrand <at> cs.umn.edu>
2010-03-17 18:50:38 GMT
2010-03-17 18:50:38 GMT
I have found today a small bug in Lua-ML -- the record Project function
attempts to project the value as both the key and the value, rather than
correctly projecting the key for the first element of the resulting
list. I have pasted below a patch which fixes this.
Posting here was the only feedback mechanism I could locate on the C--
projects page; if there is another venue that would be better for
reporting Lua-ML bugs, please let me know.
Thanks,
- Michael
Index: luavalue.nw
===================================================================
--- luavalue.nw.orig 2005-05-13 18:28:40.000000000 -0500
+++ luavalue.nw 2010-03-17 09:53:03.000000000 -0500
<at> <at> -470,7 +470,7 <at> <at>
let projectRecord ty v = match v with
| Table t ->
let rec addpairs (k, v) =
- (string.project v, ty.project v) ::
+ (string.project k, ty.project v) ::
try addpairs (Luahash.next t k) with Not_found -> [] in
(try addpairs (Luahash.first t) with Not_found -> [])
| _ -> raise (Projection (v, "table (as record)"))
_______________________________________________
Cminusminus mailing list
Cminusminus <at> eecs.harvard.edu
https://lists.eecs.harvard.edu/mailman/listinfo/cminusminus
(Continue reading)
RSS Feed