[MLton-commit] r5604

Vesa Karvonen vesak at mlton.org
Sun Jun 10 03:28:29 PDT 2007


Introduced a ``TopLevel'' module for the convenience of unempowered SML
implementations.

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

U   mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.cm
U   mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb
U   mltonlib/trunk/com/ssh/extended-basis/unstable/public/export/infixes.sml
A   mltonlib/trunk/com/ssh/extended-basis/unstable/public/export/open-top-level.sml
U   mltonlib/trunk/com/ssh/extended-basis/unstable/public/export/top-level.sml

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

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.cm
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.cm	2007-06-09 15:44:57 UTC (rev 5603)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.cm	2007-06-10 10:28:28 UTC (rev 5604)
@@ -10,3 +10,4 @@
    detail/ml/smlnj/unsealed.cm
    public/export/common.sml
    public/export/smlnj.sml
+   public/export/top-level.sml

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb	2007-06-09 15:44:57 UTC (rev 5603)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb	2007-06-10 10:28:28 UTC (rev 5604)
@@ -290,6 +290,7 @@
          public/export/$(SML_COMPILER).sml
          public/export/common.sml
          public/export/top-level.sml
+         public/export/open-top-level.sml
          public/export/infixes.sml
       end
    end

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/export/infixes.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/export/infixes.sml	2007-06-09 15:44:57 UTC (rev 5603)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/export/infixes.sml	2007-06-10 10:28:28 UTC (rev 5604)
@@ -1,4 +1,4 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+(* Copyright (C) 2006-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.
@@ -39,6 +39,8 @@
  *    Monadic   Monadic operators
  *    Ticked    Ticked operators
  *    Misc      Uncategorized
+ *
+ * See also: <top-level.sml>
  *)
 
 (* ************************************************************************** *)

Added: mltonlib/trunk/com/ssh/extended-basis/unstable/public/export/open-top-level.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/export/open-top-level.sml	2007-06-09 15:44:57 UTC (rev 5603)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/export/open-top-level.sml	2007-06-10 10:28:28 UTC (rev 5604)
@@ -0,0 +1,9 @@
+(* Copyright (C) 2006-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.
+ *)
+
+(** == Top-Level Bindings == *)
+
+open TopLevel


Property changes on: mltonlib/trunk/com/ssh/extended-basis/unstable/public/export/open-top-level.sml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/export/top-level.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/export/top-level.sml	2007-06-09 15:44:57 UTC (rev 5603)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/export/top-level.sml	2007-06-10 10:28:28 UTC (rev 5604)
@@ -4,82 +4,89 @@
  * See the LICENSE file or http://mlton.org/License for details.
  *)
 
-(** == Top-Level Bindings == *)
+(**
+ * Structure defining bindings intended to be available at the top-level.
+ * This structure exists for the benefit of Standard ML implementations
+ * that do not support introducing new top-level bindings.
+ *
+ * See also: <infixes.sml>
+ *)
+structure TopLevel = struct
+   (** == Basic == *)
 
-(** === Basic === *)
+   val eq = Basic.eq
+   val notEq = Basic.notEq
+   val fail = Basic.fail
+   val failing = Basic.failing
+   val raising = Basic.raising
+   val recur = Basic.recur
+   val repeat = Basic.repeat
+   val undefined = Basic.undefined
 
-val eq = Basic.eq
-val notEq = Basic.notEq
-val fail = Basic.fail
-val failing = Basic.failing
-val raising = Basic.raising
-val recur = Basic.recur
-val repeat = Basic.repeat
-val undefined = Basic.undefined
+   (** == Exn == *)
 
-(** === Exn === *)
+   val finally = Exn.finally
+   val try = Exn.try
 
-val finally = Exn.finally
-val try = Exn.try
+   (** == Fn == *)
 
-(** === Fn === *)
+   val const = Fn.const
+   val curry = Fn.curry
+   val flip = Fn.flip
+   val id = Fn.id
+   val pass = Fn.pass
+   val seal = Fn.seal
+   val uncurry = Fn.uncurry
 
-val const = Fn.const
-val curry = Fn.curry
-val flip = Fn.flip
-val id = Fn.id
-val pass = Fn.pass
-val seal = Fn.seal
-val uncurry = Fn.uncurry
+   val op /> = Fn./>
+   val op </ = Fn.</
+   val op <\ = Fn.<\
+   val op >| = Fn.>|
+   val op \> = Fn.\>
+   val op |< = Fn.|<
 
-val op /> = Fn./>
-val op </ = Fn.</
-val op <\ = Fn.<\
-val op >| = Fn.>|
-val op \> = Fn.\>
-val op |< = Fn.|<
+   (** == Fold == *)
 
-(** === Fold === *)
+   val $ = Fold.$
 
-val $ = Fold.$
+   (** == Lazy == *)
 
-(** === Lazy === *)
+   type 'a lazy = 'a Lazy.t
+   val delay = Lazy.delay
+   val eager = Lazy.eager
+   val force = Lazy.force
+   val lazy = Lazy.lazy
+   val memo = Lazy.memo
 
-type 'a lazy = 'a Lazy.t
-val delay = Lazy.delay
-val eager = Lazy.eager
-val force = Lazy.force
-val lazy = Lazy.lazy
-val memo = Lazy.memo
+   (** == Option == *)
 
-(** === Option === *)
+   val isNone = Option.isNone
 
-val isNone = Option.isNone
+   (** == Product == *)
 
-(** === Product === *)
+   datatype product = datatype Product.product
 
-datatype product = datatype Product.product
+   (** == Ref == *)
 
-(** === Ref === *)
+   val op :=: = Ref.:=:
 
-val op :=: = Ref.:=:
+   (** == Sum == *)
 
-(** === Sum === *)
+   datatype sum = datatype Sum.sum
 
-datatype sum = datatype Sum.sum
+   (** == TextIO == *)
 
-(** === TextIO === *)
+   val println = TextIO.println
 
-val println = TextIO.println
+   (** == UnPr == *)
 
-(** === UnPr === *)
+   val negate = UnPr.negate
 
-val negate = UnPr.negate
+   val op andAlso = UnPr.andAlso
+   val op orElse = UnPr.orElse
 
-val op andAlso = UnPr.andAlso
-val op orElse = UnPr.orElse
+   (** == Void == *)
 
-(** === Void === *)
-
-type void = Void.t
-val void = Void.void
+   type void = Void.t
+   val void = Void.void
+end




More information about the MLton-commit mailing list