Michael Ekstrand | 17 Mar 19:50 2010
Picon

[C--] Bug in Lua-ML

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)

Norman Ramsey | 24 Mar 04:45 2010
Picon

Re: [C--] Bug in Lua-ML

 > 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.

No, this is great; thanks.  I see rather to my embarrassment that this
bug was fixed in January in CVS revision 1.42, but evidently not
somewhere else.  It could be that our nightly build is no longer
running.

Can you tell me where and when you got the offending version of
Lua-ML?

Norman
_______________________________________________
Cminusminus mailing list
Cminusminus <at> eecs.harvard.edu
https://lists.eecs.harvard.edu/mailman/listinfo/cminusminus

Michael Ekstrand | 24 Mar 15:25 2010
Picon

Re: [C--] Bug in Lua-ML

On 03/23/2010 10:45 PM, Norman Ramsey wrote:
> Can you tell me where and when you got the offending version of
> Lua-ML?

I initially got it from GODI last fall sometime; to my knowledge, the
GODI package is still out of date.  When I discovered the problem last
week, I first upgraded my local GODI tree to use the latest dated
release from the web site as of Mar. 16 or 17 (lua-ml-20071127.tar.gz),
found that the bug was still there, and created the patch.

- Michael

--

-- 
Michael Ekstrand <ekstrand <at> cs.umn.edu>
Ph.D student, Computer Science -- University of Minnesota
GroupLens Research: http://www.grouplens.org
Confused by odd attachments? See http://www.elehack.net/resources/gpg
window manager, n: a program for arranging multiple Emacs frames

_______________________________________________
Cminusminus mailing list
Cminusminus <at> eecs.harvard.edu
https://lists.eecs.harvard.edu/mailman/listinfo/cminusminus


Gmane