[MLton] cvs commit: -sequence-unit true now causes an error, not a warning
Stephen Weeks
sweeks@mlton.org
Tue, 17 Feb 2004 18:19:03 -0800
sweeks 04/02/17 18:19:02
Modified: mlton/elaborate elaborate-core.fun
Log:
MAIL -sequence-unit true now causes an error, not a warning
Revision Changes Path
1.87 +7 -7 mlton/mlton/elaborate/elaborate-core.fun
Index: elaborate-core.fun
===================================================================
RCS file: /cvsroot/mlton/mlton/mlton/elaborate/elaborate-core.fun,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -r1.86 -r1.87
--- elaborate-core.fun 17 Feb 2004 17:38:09 -0000 1.86
+++ elaborate-core.fun 18 Feb 2004 02:19:02 -0000 1.87
@@ -2155,28 +2155,28 @@
then ()
else
Vector.foreachi
- (es', fn (i, e) =>
+ (es', fn (i, e') =>
if i = last
then ()
else
let
- fun error _ =
+ fun error (l, _) =
let
val e = Vector.sub (es, i)
open Layout
in
- Control.warning
+ Control.error
(Aexp.region e,
str "sequence expression not of type unit",
- seq [str "in: ",
- approximate (Aexp.layout e)])
+ align [seq [str "type: ", l],
+ seq [str "in: ",
+ approximate (Aexp.layout e)]])
end
in
- Type.unify (Cexp.ty e, Type.unit,
+ Type.unify (Cexp.ty e', Type.unit,
{error = error,
preError = preError})
end)
-
in
Cexp.make (Cexp.Seq es', Cexp.ty (Vector.sub (es', last)))
end