Poly/ML doesn't seem to parse strexps with a signature ascription. IOW, the following productions do not seem to be accepted by Poly/ML:
strexp ::= strexp : sigexp strexp :> sigexp
See Figure 6 on page 13 in the Definition.
I can see that at least a part of the bug is located in the PARSE_DEC.ML file around line 2133.
I encountered this bug while attempting to compile my generics library [1] with Poly/ML. Some of the generics make essential use of the following form of sealing [e.g. at bottom of #2]:
functor WithXXX (...) = let structure Result = struct ... end in Result :> XXX where type (...) t = (...) Result.t end
If I comment out the ascription, Poly/ML seems to compile the code correctly.
-Vesa Karvonen
[1] http://mlton.org/cgi-bin/viewsvn.cgi/mltonlib/trunk/com/ssh/generic/unstable... [2] http://mlton.org/cgi-bin/viewsvn.cgi/mltonlib/trunk/com/ssh/generic/unstable...