Hi everyone,

today I stumbled upon some strange behaviour of PolyML 5.5.1 (the
x86-linux version shipped with Isabelle). The behaviour also occurred
with revision 1874 from the SVN (Sourceforge has problems at the moment,
so I didn't test the most current version).

------------------------------------------------------
# ./poly
Poly/ML 5.5.1 Release
> fun f xs = (xs : ''a) val _ = (fn x => f x);
Exception- Subscript unexpectedly raised while compiling

Exception- Subscript unexpectedly raised while compiling
------------------------------------------------------

But:
------------------------------------------------------
# ./poly
Poly/ML 5.5.1 Release
> fun f xs = (xs : ''a); val _ = (fn x => f x);
val f = fn: ''a -> ''a
------------------------------------------------------

But:
------------------------------------------------------
# ./poly
Poly/ML 5.5.1 Release
> let fun f xs = (xs : ''a); val _ = (fn x => f x) in () end;
Exception- Subscript unexpectedly raised while compiling

Exception- Subscript unexpectedly raised while compiling
------------------------------------------------------

So the error vanishes, if I add a semicolon before the "val", except
when I am in a "let" block. Moreover, the error seems to depend on the
equality type and the dummy pattern.

Best regards,
  Lars
_______________________________________________
polyml mailing list
[email protected]
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

Reply via email to