[MLton-commit] r6075
Matthew Fluet
fluet at mlton.org
Fri Oct 19 15:17:24 PDT 2007
Change DirectExp.raisee to use argument record that matches the
PrimExp.Raise constructor argument. (All other DirectExp forms of
PrimExp constructors follow this convention.)
----------------------------------------------------------------------
U mlton/trunk/mlton/defunctorize/defunctorize.fun
U mlton/trunk/mlton/xml/implement-exceptions.fun
U mlton/trunk/mlton/xml/xml-tree.fun
U mlton/trunk/mlton/xml/xml-tree.sig
----------------------------------------------------------------------
Modified: mlton/trunk/mlton/defunctorize/defunctorize.fun
===================================================================
--- mlton/trunk/mlton/defunctorize/defunctorize.fun 2007-10-19 10:37:40 UTC (rev 6074)
+++ mlton/trunk/mlton/defunctorize/defunctorize.fun 2007-10-19 22:17:22 UTC (rev 6075)
@@ -128,7 +128,7 @@
fun raiseExn (f, mayWrap) =
let
val e = Var.newNoname ()
- val exp = Xexp.raisee (f e, {extend = true}, caseType)
+ val exp = Xexp.raisee {exn = f e, extend = true, ty = caseType}
val exp =
fn () =>
if let
@@ -1050,7 +1050,7 @@
ty = ty}
end
- | Raise e => Xexp.raisee (#1 (loopExp e), {extend = true}, ty)
+ | Raise e => Xexp.raisee {exn = #1 (loopExp e), extend = true, ty = ty}
| Record r =>
(* The components of the record have to be evaluated left to
* right as they appeared in the source program, but then
Modified: mlton/trunk/mlton/xml/implement-exceptions.fun
===================================================================
--- mlton/trunk/mlton/xml/implement-exceptions.fun 2007-10-19 10:37:40 UTC (rev 6074)
+++ mlton/trunk/mlton/xml/implement-exceptions.fun 2007-10-19 22:17:22 UTC (rev 6075)
@@ -170,13 +170,13 @@
open Dexp
val exp =
if not extend
- then raisee (varExp (exn, Type.exn),
- {extend = false}, ty)
+ then raisee {exn = varExp (exn, Type.exn),
+ extend = false, ty = ty}
else
extract
(VarExp.var exn, ty, fn tup =>
raisee
- (makeExn
+ {exn = makeExn
{exn = select {tuple = tup,
offset = 1,
ty = sumType},
@@ -191,8 +191,8 @@
ty = extraType})),
ty = seType},
ty = extraType}},
- {extend = false},
- ty))
+ extend = false,
+ ty = ty})
in
vall {exp = exp, var = x}
end
Modified: mlton/trunk/mlton/xml/xml-tree.fun
===================================================================
--- mlton/trunk/mlton/xml/xml-tree.fun 2007-10-19 10:37:40 UTC (rev 6074)
+++ mlton/trunk/mlton/xml/xml-tree.fun 2007-10-19 22:17:22 UTC (rev 6075)
@@ -682,8 +682,8 @@
(default, fn (e, r) => (toExp e, r)))},
ty))
- fun raisee (exn: t, {extend: bool}, t: Type.t): t =
- convert (exn, fn (x, _) => (Raise {exn = x, extend = extend}, t))
+ fun raisee {exn: t, extend: bool, ty: Type.t}: t =
+ convert (exn, fn (x, _) => (Raise {exn = x, extend = extend}, ty))
fun handlee {try, catch, handler, ty} =
simple (Handle {try = toExp try,
@@ -745,12 +745,12 @@
targs = Vector.new0 (),
args = Vector.new1 (string s),
ty = Type.unit},
- raisee (primApp {prim = Prim.bogus,
- targs = Vector.new1 Type.exn,
- args = Vector.new0 (),
- ty = Type.exn},
- {extend = false},
- ty)))
+ raisee {exn = primApp {prim = Prim.bogus,
+ targs = Vector.new1 Type.exn,
+ args = Vector.new0 (),
+ ty = Type.exn},
+ extend = false,
+ ty = ty}))
fun seq (es, make) =
fn k => convertsGen (es, fn xts =>
Modified: mlton/trunk/mlton/xml/xml-tree.sig
===================================================================
--- mlton/trunk/mlton/xml/xml-tree.sig 2007-10-19 10:37:40 UTC (rev 6074)
+++ mlton/trunk/mlton/xml/xml-tree.sig 2007-10-19 22:17:22 UTC (rev 6075)
@@ -216,7 +216,7 @@
prim: Type.t Prim.t,
targs: Type.t vector,
ty: Type.t} -> t
- val raisee: t * {extend: bool} * Type.t -> t
+ val raisee: {exn: t, extend: bool, ty: Type.t} -> t
val reff: t -> t
val select: {tuple: t, offset: int, ty: Type.t} -> t
val seq: t vector * (t vector -> t) -> t
More information about the MLton-commit
mailing list