David,
David,
Using recent sources, the following caused an internal error as
described in the comment. The problem persists when I update to the
very latest (rev. 866).
fun present (eq : ('a * 'a) -> bool) (x: 'a) : 'a list -> bool = (
let fun test (h :: t) = eq(x,h) orelse test t
| test [] = false
in
test
end
);
fun insert (eq:'a * 'a -> bool) (lst : 'a list) (what : 'a) = (
if present eq what lst
then lst
else (what :: lst)
);
(* following cut down extract from a test script fails with:
Exception- InternalError: Equality for function raised while compiling
*)
[ (insert (op =) []), (insert (op =) [1]) ];
Regards,
Rob.
_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml