I'm encountering an unexpected (and presumably buggy) type error when
compiling the MLton sources with Poly/ML r883. I am able to compile the
MLton sources with Poly/ML 5.2.1 (and also MLton and SML/NJ), so I'm
fairly certain that the code is type correct. Unfortunately, the set of
sharing constraints with the AST related signatures is fairly complex, and
I haven't had any luck trimming things down to a simpler example.
You can recreate the bug with the following commands. The
"polyml-mlton-extra.tgz" includes the set of derived files that aren't in
the source distribution; it avoids the need to have MLton installed to
reproduce the bug.
$ wget http://mlton.org/pages/TemporaryUpload/attachments/polyml-mlton-extra.tgz
$ svn co svn://mlton.org/mlton/trunk mlton
$ cd mlton
$ tar -xzf ../polyml-mlton-extra.tgz
$ cd mlton
$ ( echo 'use "mlton-polyml.use";' ) | poly
Poly/ML 5.3 Release candidate 1
...
val it = () : unit
Error- in 'ast/ast-modules.fun', line 14.
Structure does not match signature in sub-structure Longvid.
Signature: val toLongcon: Longvid.t -> Longcon.t
Structure: val toLongcon: Longvid.t -> Longvid.t
Reason:
Can't match Longvid.L.node (*Created from applying functor AstAtoms*) to
Longcon.L.node (*Created from applying functor AstAtoms*)
(Different type constructors)
Found near AstCore(AstAtoms(S))
Error- in 'ast/ast-modules.fun', line 14.
Structure does not match signature in sub-structure Type.
Signature: constructor Con: Longtycon.t * Type.t vector -> Type.node
Structure: constructor Con: Longcon.t * Type.t vector -> Type.node
Reason:
Can't match Longcon.L.node (*Created from applying functor AstAtoms*) to
Longtycon.T.node (*Created from applying functor AstAtoms*)
(Different type constructors)
Found near AstCore(AstAtoms(S))
...
Exception- Fail "Static Errors" raised
Exception- Fail "Static Errors" raised
I hope that is enough to help make progress.
_______________________________________________
polyml mailing list
[email protected]
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml