[MLton] Bug report
Matthew Fluet
fluet@cs.cornell.edu
Sat, 4 Sep 2004 08:48:30 -0400 (EDT)
> The attached causes the compiler typechecker to through an exception (see
> below). I know there is a problem with the program (a value restriction issue)
> but I generally expect a friendlier error message :). If you need more info
> let me know.
The bug is already fixed in the latest experimental MLton release (which
should be followed up by a stable release in a month or so). The error
message now directly referes to the inability to generalize type
variables:
[fluet@tiger temp 9]% ~/mlton/mlton-20040819/build/bin/mlton s.cm
Error: queue.sml 1.19:
Variable type in structure disagrees with signature.
variable: foldl
unable to generalize: 'b, 'a
signature: (('a * 'b) -> 'b)
-> ('b
-> ({back: int ref,
count: int ref,
front: int ref,
v: 'a option array ref}
-> 'b))
Error: queue.sml 1.19:
Variable type in structure disagrees with signature.
variable: foldr
unable to generalize: 'b, 'a
signature: (('a * 'b) -> 'b)
-> ('b
-> ({back: int ref,
count: int ref,
front: int ref,
v: 'a option array ref}
-> 'b))
compilation aborted: parseAndElaborate reported errors