[MLton-commit] r6050

Vesa Karvonen vesak at mlton.org
Thu Sep 27 01:36:27 PDT 2007


To reduce recompilation with SML/NJ.
----------------------------------------------------------------------

U   mltonlib/trunk/com/ssh/generic/unstable/Test-smlnj.sh
U   mltonlib/trunk/com/ssh/generic/unstable/detail/generic.sml
A   mltonlib/trunk/com/ssh/generic/unstable/test/generic.sml
U   mltonlib/trunk/com/ssh/generic/unstable/test/utils.fun
U   mltonlib/trunk/com/ssh/generic/unstable/test.cm

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

Modified: mltonlib/trunk/com/ssh/generic/unstable/Test-smlnj.sh
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/Test-smlnj.sh	2007-09-23 13:32:02 UTC (rev 6049)
+++ mltonlib/trunk/com/ssh/generic/unstable/Test-smlnj.sh	2007-09-27 08:36:26 UTC (rev 6050)
@@ -13,14 +13,5 @@
 time \
 echo '' | \
 sml -m test.cm \
-    $eb/public/export/{open-top-level.sml,infixes.sml}   \
-    test/utils.fun                                       \
-    with/reg-basis-exns.sml                              \
-    with/data-rec-info.sml                               \
-    with/some.sml                                        \
-    with/pickle.sml                                      \
-    with/seq.sml                                         \
-    with/reduce.sml                                      \
-    with/transform.sml                                   \
-    with/close-pretty-with-extra.sml                     \
-    $(find test/ -name '*.sml')
+    $eb/public/export/{open-top-level.sml,infixes.sml}  \
+    $(find test/ -name '*.sml' -a -not -name 'generic.sml')

Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/generic.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/generic.sml	2007-09-23 13:32:02 UTC (rev 6049)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/generic.sml	2007-09-27 08:36:26 UTC (rev 6050)
@@ -4,6 +4,8 @@
  * See the LICENSE file or http://mlton.org/License for details.
  *)
 
+(* This whole file is a SML/NJ workaround. *)
+
 signature Generic = sig structure Open : OPEN_CASES end
 structure Generic : Generic = struct
    structure Open = RootGeneric

Added: mltonlib/trunk/com/ssh/generic/unstable/test/generic.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/test/generic.sml	2007-09-23 13:32:02 UTC (rev 6049)
+++ mltonlib/trunk/com/ssh/generic/unstable/test/generic.sml	2007-09-27 08:36:26 UTC (rev 6050)
@@ -0,0 +1,62 @@
+(* Copyright (C) 2007 SSH Communications Security, Helsinki, Finland
+ *
+ * This code is released under the MLton license, a BSD-style license.
+ * See the LICENSE file or http://mlton.org/License for details.
+ *)
+
+(* This whole file is a SML/NJ workaround. *)
+
+signature Generic = sig include Generic DATA_REC_INFO end
+structure Generic : Generic = struct
+   structure Open = WithDataRecInfo (Generic)
+   open Generic Open
+end
+
+signature Generic = sig include Generic SOME end
+structure Generic : Generic = struct
+   structure Open = WithSome
+     (open Generic
+      structure TypeInfoRep = Open.Rep)
+   open Generic Open
+end
+
+signature Generic = sig include Generic PICKLE end
+structure Generic : Generic = struct
+   structure Open = WithPickle
+     (open Generic
+      structure DataRecInfoRep = Open.Rep and EqRep = Open.Rep
+            and HashRep = Open.Rep and SomeRep = Open.Rep
+            and TypeHashRep = Open.Rep and TypeInfoRep = Open.Rep)
+   open Generic Open
+end
+
+signature Generic = sig include Generic SEQ end
+structure Generic : Generic = struct
+   structure Open = WithSeq
+     (open Generic
+      structure HashRep = Open.Rep)
+   open Generic Open
+end
+
+signature Generic = sig include Generic REDUCE end
+structure Generic : Generic = struct
+   structure Open = WithReduce (Generic)
+   open Generic Open
+end
+
+signature Generic = sig include Generic TRANSFORM end
+structure Generic : Generic = struct
+   structure Open = WithTransform
+     (open Generic
+      structure HashRep = Open.Rep)
+   open Generic Open
+end
+
+structure Generic = struct
+   structure Rep = ClosePrettyWithExtra
+     (open Generic
+      structure PrettyRep = Open.Rep)
+   open Generic Rep
+end
+
+local structure ? = RegBasisExns (Generic) open ? in end


Property changes on: mltonlib/trunk/com/ssh/generic/unstable/test/generic.sml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: mltonlib/trunk/com/ssh/generic/unstable/test/utils.fun
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/test/utils.fun	2007-09-23 13:32:02 UTC (rev 6049)
+++ mltonlib/trunk/com/ssh/generic/unstable/test/utils.fun	2007-09-27 08:36:26 UTC (rev 6050)
@@ -62,6 +62,11 @@
    datatype 'a t = LF | BR of 'a t * 'a * 'a t
    val t : 'a Rep.t -> 'a t Rep.t
 end = struct
+   (* <--- SML/NJ workaround *)
+   open TopLevel
+   infix +`
+   (* SML/NJ workaround --> *)
+
    datatype 'a t = LF | BR of 'a t * 'a * 'a t
    local
       val cLF = C "LF"
@@ -98,6 +103,11 @@
    val t' : t Rep.t UnOp.t
    val t : t Rep.t
 end = struct
+   (* <--- SML/NJ workaround *)
+   open TopLevel
+   infix +`
+   (* SML/NJ workaround --> *)
+
    structure Id = Id
 
    datatype 't f =

Modified: mltonlib/trunk/com/ssh/generic/unstable/test.cm
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/test.cm	2007-09-23 13:32:02 UTC (rev 6049)
+++ mltonlib/trunk/com/ssh/generic/unstable/test.cm	2007-09-27 08:36:26 UTC (rev 6050)
@@ -9,8 +9,11 @@
    library(../../prettier/unstable/lib.cm)
    library(../../unit-test/unstable/lib-with-default.cm)
    library(lib.cm)
+   source(-)
 is
    ../../extended-basis/unstable/basis.cm
    ../../prettier/unstable/lib.cm
    ../../unit-test/unstable/lib-with-default.cm
    lib.cm
+   test/generic.sml
+   test/utils.fun




More information about the MLton-commit mailing list