Hi Lars,
Thanks for reporting this. It looks as though the front-end is generating incorrect code and the error is coming from the intermediate code processor. I think I know what is going wrong but I need to pin-point the actual place. Once I've done that it should be easy to fix.

Best regards,
David

On 14/02/2014 13:35, Lars Noschinski wrote:
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

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

Reply via email to