[MLton-commit] r5443

Stephen Weeks sweeks at mlton.org
Sun Mar 18 06:40:53 PST 2007


Exported some basic stuff that should have been exported (ref, bool, etc).

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

U   mltonlib/trunk/com/sweeks/basic/unstable/EXPORT
U   mltonlib/trunk/com/sweeks/basic/unstable/basis.sml
U   mltonlib/trunk/com/sweeks/basic/unstable/export.sig
U   mltonlib/trunk/com/sweeks/basic/unstable/export.sml
U   mltonlib/trunk/com/sweeks/basic/unstable/open-export.sml
U   mltonlib/trunk/com/sweeks/basic/unstable/ref.sml
U   mltonlib/trunk/com/sweeks/basic/unstable/util.sig
U   mltonlib/trunk/com/sweeks/basic/unstable/util.sml

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

Modified: mltonlib/trunk/com/sweeks/basic/unstable/EXPORT
===================================================================
--- mltonlib/trunk/com/sweeks/basic/unstable/EXPORT	2007-03-15 23:41:43 UTC (rev 5442)
+++ mltonlib/trunk/com/sweeks/basic/unstable/EXPORT	2007-03-18 14:40:52 UTC (rev 5443)
@@ -1,8 +1,10 @@
 eqtype z = unit
+val ! : 'a Ref.t -> 'a
 val * : ('a * 'a) -> 'a
 val + : ('a * 'a) -> 'a
 val - : ('a * 'a) -> 'a
 val / : ('a * 'a) -> 'a
+val := : ('a Ref.t * 'a) -> unit
 val < : ('a * 'a) -> Bool.t
 val <= : ('a * 'a) -> Bool.t
 val <> : ('a * 'a) -> Bool.t
@@ -15,12 +17,15 @@
 val die: string -> 'a
 val div: ('a * 'a) -> 'a
 val finally: ((unit -> 'a) * (unit -> unit)) -> 'a
+val id: 'a -> 'a
 val ignore: 'a -> unit
 val lazy: (unit -> 'a) -> (unit -> 'a)
 val mod: ('a * 'a) -> 'a
 val not: Bool.t -> Bool.t
 val o: (('a -> 'b) * ('c -> 'a)) -> ('c -> 'b)
+val pass: 'a -> (('a -> 'b) -> 'b)
 val print: string -> unit
+val recur: ('a * (('a * ('a -> 'b)) -> 'b)) -> 'b
 val valOf: 'a Option.t -> 'a
 val ~ : 'a -> 'a
 structure Array: ARRAY
@@ -353,7 +358,7 @@
    end
 signature BOOL = 
    sig
-      eqtype t = Bool.t
+      datatype t = false | true
       val not: Bool.t -> Bool.t
    end
 signature CHAR = 

Modified: mltonlib/trunk/com/sweeks/basic/unstable/basis.sml
===================================================================
--- mltonlib/trunk/com/sweeks/basic/unstable/basis.sml	2007-03-15 23:41:43 UTC (rev 5442)
+++ mltonlib/trunk/com/sweeks/basic/unstable/basis.sml	2007-03-18 14:40:52 UTC (rev 5443)
@@ -6,7 +6,7 @@
 structure Basis = struct
    structure Array = struct open Array type 'a t = 'a array end
    structure ArraySlice = ArraySlice
-   structure Bool = struct open Bool type t = bool end
+   structure Bool = struct open Bool datatype t = datatype bool end
    structure Byte = Byte
    structure Char = struct open Char type t = char end
    structure CommandLine = CommandLine

Modified: mltonlib/trunk/com/sweeks/basic/unstable/export.sig
===================================================================
--- mltonlib/trunk/com/sweeks/basic/unstable/export.sig	2007-03-15 23:41:43 UTC (rev 5442)
+++ mltonlib/trunk/com/sweeks/basic/unstable/export.sig	2007-03-18 14:40:52 UTC (rev 5443)
@@ -60,15 +60,19 @@
    sharing type ArraySlice.base = Array.t
    sharing type VectorSlice.base = Vector.t
 
+   val ! : 'a Ref.t -> 'a
+   val := : 'a Ref.t * 'a -> Unit.t
    val @ : 'a List.t * 'a List.t -> 'a List.t
    val concat: String.t Seq.t -> String.t
    val die: String.t -> 'a
    val finally: 'a thunk * Unit.t thunk -> 'a
+   val id: 'a -> 'a
    val ignore: 'a -> Unit.t
    val lazy: 'a thunk -> 'a thunk
    val not: Bool.t -> Bool.t
    val o: ('a -> 'b) * ('c -> 'a) -> 'c -> 'b
+   val pass: 'a -> ('a -> 'b) -> 'b
    val print: String.t -> Unit.t
+   val recur: 'a * ('a * ('a -> 'b) -> 'b) -> 'b
    val valOf: 'a Option.t -> 'a
-
 end

Modified: mltonlib/trunk/com/sweeks/basic/unstable/export.sml
===================================================================
--- mltonlib/trunk/com/sweeks/basic/unstable/export.sml	2007-03-15 23:41:43 UTC (rev 5442)
+++ mltonlib/trunk/com/sweeks/basic/unstable/export.sml	2007-03-18 14:40:52 UTC (rev 5443)
@@ -108,14 +108,19 @@
    structure Word64 = Word64
 
    val op @ = op @
+   val ! = !
+   val op := = op :=
    val concat = concat
    val die = die
    val finally = finally
+   val id = id
    val ignore = ignore
    val lazy = lazy
    val not = not
    val op o = op o
+   val pass = pass
    val print = print
+   val recur = recur
    val valOf = valOf
 
 end

Modified: mltonlib/trunk/com/sweeks/basic/unstable/open-export.sml
===================================================================
--- mltonlib/trunk/com/sweeks/basic/unstable/open-export.sml	2007-03-15 23:41:43 UTC (rev 5442)
+++ mltonlib/trunk/com/sweeks/basic/unstable/open-export.sml	2007-03-18 14:40:52 UTC (rev 5443)
@@ -13,6 +13,7 @@
 val _: z = Less (* quell unused warning *)
 datatype z = datatype Option.t
 val _: Unit.t z = None (* quell unused warning *)
+datatype z = datatype Ref.t
 type z = Unit.t
 
 (* The following are so that nice type names are used by -show-basis. *)

Modified: mltonlib/trunk/com/sweeks/basic/unstable/ref.sml
===================================================================
--- mltonlib/trunk/com/sweeks/basic/unstable/ref.sml	2007-03-15 23:41:43 UTC (rev 5442)
+++ mltonlib/trunk/com/sweeks/basic/unstable/ref.sml	2007-03-18 14:40:52 UTC (rev 5443)
@@ -11,3 +11,10 @@
    val op := = op := 
 
 end
+
+local
+   open Ref
+in
+   val ! = !
+   val op := = op :=
+end

Modified: mltonlib/trunk/com/sweeks/basic/unstable/util.sig
===================================================================
--- mltonlib/trunk/com/sweeks/basic/unstable/util.sig	2007-03-15 23:41:43 UTC (rev 5442)
+++ mltonlib/trunk/com/sweeks/basic/unstable/util.sig	2007-03-18 14:40:52 UTC (rev 5443)
@@ -12,6 +12,7 @@
    val fst: 'a * 'b -> 'a
    val id: 'a -> 'a
    val o: ('a -> 'b) * ('c -> 'a) -> 'c -> 'b
+   val pass: 'a -> ('a -> 'b) -> 'b
    val recur: 'a * ('a * ('a -> 'b) -> 'b) -> 'b
    val snd: 'a * 'b -> 'b
 

Modified: mltonlib/trunk/com/sweeks/basic/unstable/util.sml
===================================================================
--- mltonlib/trunk/com/sweeks/basic/unstable/util.sml	2007-03-15 23:41:43 UTC (rev 5442)
+++ mltonlib/trunk/com/sweeks/basic/unstable/util.sml	2007-03-18 14:40:52 UTC (rev 5443)
@@ -13,6 +13,8 @@
 
    fun (f o g) x = f (g x)
 
+   fun pass x f = f x
+      
    fun recur (x, f) = let fun loop x = f (x, loop) in loop x end
 
    fun fst (a, _) = a




More information about the MLton-commit mailing list