[MLton-commit] r6669

Vesa Karvonen vesak at mlton.org
Sun Jul 6 06:07:25 PDT 2008


Using top-level symbols for generics.
----------------------------------------------------------------------

U   mltonlib/trunk/org/mlton/vesak/math3d/unstable/detail/mk-plane.fun
U   mltonlib/trunk/org/mlton/vesak/math3d/unstable/detail/mk-quat.fun
U   mltonlib/trunk/org/mlton/vesak/math3d/unstable/detail/mk-rbt.fun
U   mltonlib/trunk/org/mlton/vesak/math3d/unstable/detail/mk-rot.fun
U   mltonlib/trunk/org/mlton/vesak/math3d/unstable/detail/ml/common.sml

----------------------------------------------------------------------

Modified: mltonlib/trunk/org/mlton/vesak/math3d/unstable/detail/mk-plane.fun
===================================================================
--- mltonlib/trunk/org/mlton/vesak/math3d/unstable/detail/mk-plane.fun	2008-07-05 15:05:01 UTC (rev 6668)
+++ mltonlib/trunk/org/mlton/vesak/math3d/unstable/detail/mk-plane.fun	2008-07-06 13:07:15 UTC (rev 6669)
@@ -8,13 +8,10 @@
    open Arg open RBT open Vec open Scalar open Math
 
    datatype t = PLANE of {n : Vec.t, d : Scalar.t}
-   val t = let
-      open Generic
-   in
-      data' (C1'"PLANE" (record (R'"n" Vec.t *` R'"d" Scalar.t)))
-            (fn (PLANE {n=n, d=d}) => (n & d),
-             fn (n & d) => (PLANE {n=n, d=d}))
-   end
+   val t =
+       data' (C1'"PLANE" (record (R'"n" Vec.t *` R'"d" Scalar.t)))
+             (fn (PLANE {n=n, d=d}) => (n & d),
+              fn (n & d) => (PLANE {n=n, d=d}))
 
    fun out (PLANE r) = r
    val normal = #n o out

Modified: mltonlib/trunk/org/mlton/vesak/math3d/unstable/detail/mk-quat.fun
===================================================================
--- mltonlib/trunk/org/mlton/vesak/math3d/unstable/detail/mk-quat.fun	2008-07-05 15:05:01 UTC (rev 6668)
+++ mltonlib/trunk/org/mlton/vesak/math3d/unstable/detail/mk-quat.fun	2008-07-06 13:07:15 UTC (rev 6669)
@@ -10,13 +10,10 @@
    datatype t = QUAT of {s : Scalar.t, v : Vec.t}
    fun out (QUAT r) = r
 
-   val t = let
-      open Generic
-   in
-      data' (C1'"QUAT" (record (R'"s" Scalar.t *` R'"v" Vec.t)))
-            (fn QUAT {s=s, v=v} => s & v,
-             fn s & v => QUAT {s=s, v=v})
-   end
+   val t =
+       data' (C1'"QUAT" (record (R'"s" Scalar.t *` R'"v" Vec.t)))
+             (fn QUAT {s=s, v=v} => s & v,
+              fn s & v => QUAT {s=s, v=v})
 
    val scalar = #s o out
    val vec = #v o out

Modified: mltonlib/trunk/org/mlton/vesak/math3d/unstable/detail/mk-rbt.fun
===================================================================
--- mltonlib/trunk/org/mlton/vesak/math3d/unstable/detail/mk-rbt.fun	2008-07-05 15:05:01 UTC (rev 6668)
+++ mltonlib/trunk/org/mlton/vesak/math3d/unstable/detail/mk-rbt.fun	2008-07-06 13:07:15 UTC (rev 6669)
@@ -10,13 +10,10 @@
    datatype t = RBT of {r : Rot.t, t : Vec.t}
    fun out (RBT r) = r
 
-   val t = let
-      open Generic
-   in
-      data' (C1'"RBT" (record (R'"r" Rot.t *` R'"t" Vec.t)))
-            (fn (RBT {r=r, t=t}) => (r & t),
-             fn (r & t) => (RBT {r=r, t=t}))
-   end
+   val t =
+       data' (C1'"RBT" (record (R'"r" Rot.t *` R'"t" Vec.t)))
+             (fn (RBT {r=r, t=t}) => (r & t),
+              fn (r & t) => (RBT {r=r, t=t}))
 
    val identity = RBT {r = Rot.identity, t = zero}
 

Modified: mltonlib/trunk/org/mlton/vesak/math3d/unstable/detail/mk-rot.fun
===================================================================
--- mltonlib/trunk/org/mlton/vesak/math3d/unstable/detail/mk-rot.fun	2008-07-05 15:05:01 UTC (rev 6668)
+++ mltonlib/trunk/org/mlton/vesak/math3d/unstable/detail/mk-rot.fun	2008-07-06 13:07:15 UTC (rev 6669)
@@ -9,7 +9,7 @@
 
    datatype t = ROT of Quat.t
    fun out (ROT q) = q
-   val t = let open Generic in data' (C1'"ROT" Quat.t) (out, ROT) end
+   val t = data' (C1'"ROT" Quat.t) (out, ROT)
 
    val identity = ROT one
 

Modified: mltonlib/trunk/org/mlton/vesak/math3d/unstable/detail/ml/common.sml
===================================================================
--- mltonlib/trunk/org/mlton/vesak/math3d/unstable/detail/ml/common.sml	2008-07-05 15:05:01 UTC (rev 6668)
+++ mltonlib/trunk/org/mlton/vesak/math3d/unstable/detail/ml/common.sml	2008-07-06 13:07:15 UTC (rev 6669)
@@ -5,7 +5,6 @@
  *)
 
 local
-   open Generic
    val x = L"x" val y = L"y" val z = L"z" val w = L"w"
 in
    structure SeqXY =




More information about the MLton-commit mailing list