[MLton-commit] r5399
Vesa Karvonen
vesak at mlton.org
Mon Mar 5 23:22:34 PST 2007
Introducing some further structure into the library interface and
implementation.
----------------------------------------------------------------------
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array-slice.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bin-fn.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bin-op.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bin-pr.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bool.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/buffer.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/cmp.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/data/
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/data/bool.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/data/option.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/data/order.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/data/pair.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/data/product.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/data/ref.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/data/sq.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/data/sum.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/data/univ-exn.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/data/univ-ref.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/effect.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/bin-fn.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/bin-op.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/bin-pr.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/cmp.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/effect.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/fn.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/thunk.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/un-op.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/un-pr.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/io/reader.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/io/writer.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/list.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-int-inf-ext.fun
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-integer-ext.fun
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-ext.fun
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-slice-ext.fun
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-seq-common-ext.fun
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-vector-ext.fun
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-vector-slice-ext.fun
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-real-ext.fun
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-seq-common-ext.fun
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-text-ext.fun
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-word-ext.fun
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/numeric/
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/numeric/mk-int-inf-ext.fun
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/numeric/mk-integer-ext.fun
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/numeric/mk-real-ext.fun
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/numeric/mk-word-ext.fun
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/option.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/order.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/pair.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/product.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/reader.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/ref.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/array-slice.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/array.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/buffer.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/list.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/mk-mono-array-ext.fun
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/mk-mono-array-slice-ext.fun
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/mk-mono-seq-common-ext.fun
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/mk-mono-vector-ext.fun
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/mk-mono-vector-slice-ext.fun
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/mk-seq-common-ext.fun
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/vector-slice.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/vector.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/sigs.cm
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/unsealed.cm
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sq.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sum.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/text/
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/text/mk-text-ext.fun
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/thunk.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/un-op.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/un-pr.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/univ-exn.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/univ-ref.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/vector-slice.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/vector.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/detail/writer.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb
A mltonlib/trunk/com/ssh/extended-basis/unstable/public/data/void.sig
A mltonlib/trunk/com/ssh/extended-basis/unstable/public/io/reader.sig
A mltonlib/trunk/com/ssh/extended-basis/unstable/public/io/writer.sig
D mltonlib/trunk/com/ssh/extended-basis/unstable/public/reader.sig
D mltonlib/trunk/com/ssh/extended-basis/unstable/public/void.sig
D mltonlib/trunk/com/ssh/extended-basis/unstable/public/writer.sig
----------------------------------------------------------------------
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array-slice.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array-slice.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array-slice.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,9 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-structure ArraySlice : ARRAY_SLICE = struct
- open ArraySlice
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,18 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-structure Array : ARRAY = struct
- local
- structure Common = MkSeqCommonExt (Array)
- in
- open Array Common
- end
- fun duplicate a = tabulate (length a, fn i => sub (a, i))
- val toVector = vector
- fun fromVector v = tabulate (Vector.length v, fn i => Vector.sub (v, i))
- val isoVector = (toVector, fromVector)
- fun map f a = tabulate (length a, fn i => f (sub (a, i)))
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bin-fn.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bin-fn.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bin-fn.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,10 +0,0 @@
-(* 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.
- *)
-
-structure BinFn :> BIN_FN = struct
- open BinFn
- fun map (f, g) = Fn.map (Sq.map f, g)
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bin-op.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bin-op.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bin-op.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,10 +0,0 @@
-(* 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.
- *)
-
-structure BinOp :> BIN_OP = struct
- open BinOp
- val map = BinFn.map
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bin-pr.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bin-pr.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bin-pr.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,10 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-structure BinPr :> BIN_PR = struct
- open BinPr
- fun map f = UnPr.map (Sq.map f)
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bool.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bool.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bool.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,32 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-structure Bool : BOOL = struct
- structure Core = struct
- open Bool
- type bounded = t
- type ordered = t
- type scannable = t
- type stringable = t
- val embString = (toString, fromString)
- val bounds = (false, true)
- val compare = fn (false, true) => LESS
- | (true, false) => GREATER
- | (_, _) => EQUAL
- end
-
- structure Bounded = MkBounded (Core)
- structure Ordered = MkOrdered (Core)
- structure Scannable = MkScannable (Core)
- structure Stringable = MkStringable (Core)
-
- open Bounded
- open Ordered
- open Scannable
- open Stringable
-
- open Core
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/buffer.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/buffer.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/buffer.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,64 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-structure Buffer :> BUFFER = struct
- structure A = Array and AS = ArraySlice and V = Vector and VS = VectorSlice
- datatype 'a t = IN of {length : int ref, data : 'a A.t ref}
- fun new () = IN {length = ref 0, data = ref (A.fromList [])}
- fun duplicate (IN {length, data}) =
- IN {length = ref (!length), data = ref (A.duplicate (!data))}
- fun length (IN {length, ...}) = !length
- fun isEmpty b = 0 = length b
- fun data (IN {data, ...}) = !data
- fun sub (b, i) = if length b <= i then raise Subscript else A.sub (data b, i)
- local
- fun cap b = A.length (data b)
- fun decideCap c r = if r <= c then c else decideCap (2*c+1) r
- in
- fun ensureCap (b as IN {data, ...}) reqCap filler =
- if reqCap <= cap b then ()
- else let val oldData = !data
- in data := A.tabulate (decideCap (cap b) reqCap,
- fn i => if A.length oldData <= i then
- filler
- else
- A.sub (oldData, i))
- end
- end
- local
- fun mk sLength sAny sCopy (b as IN {length, data}) s =
- case sLength s of
- 0 => ()
- | n => let
- val newLength = !length + n
- in ensureCap b newLength (sAny s)
- ; sCopy {src = s, dst = !data, di = !length} : unit
- ; length := newLength
- end
- infixr />
- val op /> = Fn./>
- in
- fun push ? =
- mk (Fn.const 1) Fn.id (fn {src, dst, di} => A.update (dst, di, src)) ?
- fun pushArray ? = mk A.length (A.sub /> 0) A.copy ?
- fun pushArraySlice ? = mk AS.length (AS.sub /> 0) AS.copy ?
- fun pushBuffer b s =
- pushArraySlice b (AS.slice (data s, 0, SOME (length s)))
- fun pushList ? =
- mk List.length List.hd
- (fn {src, dst, di} =>
- List.appi (fn (i, x) => A.update (dst, di+i, x)) src) ?
- fun pushVector ? = mk V.length (V.sub /> 0) A.copyVec ?
- fun pushVectorSlice ? = mk VS.length (VS.sub /> 0) AS.copyVec ?
- end
- local
- fun mk tabulate b = tabulate (length b, fn i => sub (b, i))
- in
- fun toArray ? = mk A.tabulate ?
- fun toList ? = mk List.tabulate ?
- fun toVector ? = mk V.tabulate ?
- end
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/cmp.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/cmp.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/cmp.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,27 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-structure Cmp :> CMP = struct
- open Cmp
-
- fun map b2a = Fn.map (Sq.map b2a, Fn.id)
-
- local
- open Order
- in
- fun mkRelOps cmp =
- {< = isLess o cmp, <= = not o isGreater o cmp,
- == = isEqual o cmp, != = not o isEqual o cmp,
- > = isGreater o cmp, >= = not o isLess o cmp}
-
- local
- fun mk is cmp (x, y) = if is (cmp (x, y)) then y else x
- in
- fun max ? = mk isLess ?
- fun min ? = mk isGreater ?
- end
- end
-end
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/data/bool.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bool.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/data/option.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/option.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/data/order.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/order.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/data/pair.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/pair.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/data/product.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/product.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/data/ref.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/ref.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/data/sq.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sq.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/data/sum.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sum.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/data/univ-exn.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/univ-exn.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/data/univ-ref.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/univ-ref.sml)
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/effect.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/effect.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/effect.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,13 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-structure Effect :> EFFECT = struct
- open Effect
- val ignore = ignore
- val nop = ignore
- fun obs ef x = (ef x : unit ; x)
- fun past ef x = (ef () : unit ; x)
-end
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/bin-fn.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bin-fn.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/bin-op.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bin-op.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/bin-pr.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bin-pr.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/cmp.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/cmp.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/effect.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/effect.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/fn.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/thunk.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/thunk.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/un-op.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/un-op.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/un-pr.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/un-pr.sml)
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,24 +0,0 @@
-(* 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.
- *)
-
-structure Fn :> FN = struct
- open Fn
- fun const x _ = x
- fun curry f x y = f (x, y)
- fun fix f x = f (fix f) x
- fun flip f x y = f y x
- fun id x = x
- fun map (f, g) h = g o h o f
- fun pass x f = f x
- fun uncurry f (x, y) = f x y
- val op o = op o
- fun op <\ (x, f) y = f (x, y)
- fun op \> (f, y) = f y
- fun op /> (f, y) x = f (x, y)
- fun op </ (x, f) = f x
- val op >| = op </
- val op |< = op \>
-end
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/io/reader.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/reader.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/io/writer.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/writer.sml)
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/list.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/list.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/list.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,133 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-structure List : LIST = struct
- open List
- val sub = nth
- fun init l = rev (tl (rev l))
- fun unfoldl' f x = let
- fun lp (ys, x) = case f x of NONE => (ys, x) | SOME (y, x) => lp (y::ys, x)
- in
- lp ([], x)
- end
- fun unfoldr' f = Pair.map (rev, Fn.id) o unfoldl' f
- fun unfoldl f = #1 o unfoldl' f
- fun unfoldr f = #1 o unfoldr' f
- fun intersperse d =
- fn [] => [] | x::xs => x::foldr (fn (x, ys) => d::x::ys) [] xs
- local
- fun headsAndTails xss =
- Pair.map (rev, rev)
- (foldl (fn (h::t, (hs, ts)) => (h::hs, t::ts) | ([], ?) => ?)
- ([], []) xss)
- in
- fun transpose xss = let
- fun lp yss =
- fn [] => rev yss
- | []::xss => lp yss xss
- | (x::xs)::xss => let
- val (hs, ts) = headsAndTails xss
- in
- lp ((x::hs)::yss) (xs::ts)
- end
- in
- lp [] xss
- end
- end
- fun foldl1 f = fn [] => raise Empty | x::xs => foldl f x xs
- fun foldr1 f = foldl1 f o rev
- fun push r x = r := x :: !r
- fun pop r = case !r of x::xs => (r := xs ; SOME x) | [] => NONE
- fun split (l, i) =
- if i < 0 then raise Subscript
- else Pair.map (Fn.id, #1)
- (unfoldr' (fn (_, 0) => NONE
- | ([], _) => raise Subscript
- | (x::xs, n) => SOME (x, (xs, n-1)))
- (l, i))
- fun findi p l = let
- fun lp (_, []) = NONE
- | lp (i, x::xs) = if p (i, x) then SOME (i, x) else lp (i+1, xs)
- in
- lp (0, l)
- end
- fun equal eq = let
- fun lp ([], []) = true
- | lp (x::xs, y::ys) = eq (x, y) andalso lp (xs, ys)
- | lp (_, _) = false
- in
- lp
- end
- fun concatMap f = rev o foldl (revAppend o Pair.map (f, Fn.id)) []
- fun appr e = app e o rev
- fun foldli f y = #2 o foldl (fn (x, (i, y)) => (i+1, f (i+1, x, y))) (~1, y)
- fun foldri f y xs = let
- val (n, xs) = foldl (fn (x, (n, xs)) => (n+1, x::xs)) (0, []) xs
- in
- #2 (foldl (fn (x, (i, y)) => (i-1, f (i-1, x, y))) (n, y) xs)
- end
- fun concatMapi f =
- rev o foldli (fn (i, x, ys) => revAppend (f (i, x), ys)) []
- fun mapiPartial f =
- rev o foldli (fn (i, x, ys) => case f (i, x) of NONE => ys
- | SOME y => y::ys) []
- fun mapi f = mapiPartial (SOME o f)
- fun appi e = foldli (fn (i, x, ()) => e (i, x)) ()
- fun appri e = foldri (fn (i, x, ()) => e (i, x)) ()
- fun existsi p = Option.isSome o findi p
- fun alli p = Option.isNone o findi (not o p)
- fun index ? = mapi Fn.id ?
- fun contains l x = exists (fn y => x = y) l
- fun maximum cmp = foldl1 (Cmp.max cmp o Pair.swap)
- fun minimum cmp = foldl1 (Cmp.min cmp o Pair.swap)
- local
- fun mk combine init pred xs = let
- fun lp (ts, []) = (ts, [])
- | lp (ts, x::xs) =
- if pred x then lp (combine (x, ts), xs) else (ts, x::xs)
- in
- lp (init, xs)
- end
- in
- fun span ? = Pair.map (rev, Fn.id) o mk op :: [] ?
- fun takeWhile ? = rev o #1 o mk op :: [] ?
- fun dropWhile ? = #2 o mk ignore () ?
- end
-
- fun uniqueByEq eq xs =
- case xs
- of [] => true
- | x::xs' =>
- exists (Fn.curry eq x) xs' andalso
- uniqueByEq eq xs'
-
- local
- fun divideByEqTail eq xs accum =
- case xs
- of [] => rev accum
- | x::xs' => let
- val (xclass, remainder) = partition (Fn.curry eq x) xs'
- in
- divideByEqTail eq remainder ((x::xclass)::accum)
- end
- in
- fun divideByEq eq xs = divideByEqTail eq xs []
- end
-
- local
- fun nubByEqTail eq xs accum =
- case xs
- of [] => accum
- | x::xs' =>
- if exists (Fn.curry eq x) xs' then
- nubByEqTail eq xs' accum
- else
- nubByEqTail eq xs' (x::accum)
- in
- fun nubByEq eq xs = nubByEqTail eq (rev xs) []
- end
-
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-int-inf-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-int-inf-ext.fun 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-int-inf-ext.fun 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,13 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-functor MkIntInfExt (I : BASIS_INT_INF) : INT_INF = struct
- local
- structure E = MkIntegerExt (I)
- in
- open E I
- end
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-integer-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-integer-ext.fun 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-integer-ext.fun 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,20 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-functor MkIntegerExt (I : BASIS_INTEGER) : INTEGER = struct
- open I
- type t = int
- val embString = (toString, fromString)
- val isoInt = (toInt, fromInt)
- val isoLarge = (toLarge, fromLarge)
- fun isZero i = fromInt 0 = i
- fun isEven i = isZero (rem (i, fromInt 2))
- val isOdd = not o isEven
- val bounds = case (minInt, maxInt) of
- (NONE, NONE) => NONE
- | (SOME min, SOME max) => SOME (min, max)
- | _ => raise Fail "impossible"
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-ext.fun 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-ext.fun 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,33 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-functor MkMonoArrayExt (structure MonoVector : BASIS_MONO_VECTOR
- structure MonoArray : BASIS_MONO_ARRAY
- where type elem = MonoVector.elem
- where type vector = MonoVector.vector) :
- MONO_ARRAY = struct
- local
- structure MonoArray = struct
- open MonoArray
- type t = array
- end
- structure Common = MkMonoSeqCommonExt (MonoArray)
- in
- open MonoArray Common
- end
- local
- fun mk tabulate length sub ? = tabulate (length ?, fn i => sub (?, i))
- in
- fun duplicate ? = mk tabulate length sub ?
- fun fromVector ? = mk tabulate MonoVector.length MonoVector.sub ?
- fun toPoly ? = mk Array.tabulate length sub ?
- fun fromPoly ? = mk tabulate Array.length Array.sub ?
- end
- val toVector = vector
- val isoVector = (toVector, fromVector)
- val isoPoly = (toPoly, fromPoly)
- fun map f a = tabulate (length a, fn i => f (sub (a, i)))
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-slice-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-slice-ext.fun 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-slice-ext.fun 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,12 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-functor MkMonoArraySliceExt (structure MonoArraySlice :
- BASIS_MONO_ARRAY_SLICE) : MONO_ARRAY_SLICE =
-struct
- open MonoArraySlice
- type t = slice
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-seq-common-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-seq-common-ext.fun 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-seq-common-ext.fun 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,20 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-functor MkMonoSeqCommonExt (type t
- type elem
- val foldr : (elem * 'a -> 'a) -> 'a -> t -> 'a
- val fromList : elem list -> t
- val maxLen : int) = struct
- fun unfoldi fis (n, s) = let
- fun lp (i, s, xs) =
- if i = n then (fromList (rev xs), s)
- else case fis (i, s) of (x, s) => lp (i+1, s, x::xs)
- in if n < 0 orelse maxLen < n then raise Size else lp (0, s, [])
- end
- fun toList t = foldr op :: [] t
- val isoList = (toList, fromList)
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-vector-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-vector-ext.fun 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-vector-ext.fun 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,21 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-functor MkMonoVectorExt (MonoVector : BASIS_MONO_VECTOR) : MONO_VECTOR = struct
- local
- structure MonoVector = struct
- open MonoVector
- type t = vector
- end
- structure Common = MkMonoSeqCommonExt (MonoVector)
- in
- open MonoVector Common
- end
- (* XXX It would be nice to avoid copying in toPoly and fromPoly *)
- fun toPoly v = Vector.tabulate (length v, fn i => sub (v, i))
- fun fromPoly v = tabulate (Vector.length v, fn i => Vector.sub (v, i))
- val isoPoly = (toPoly, fromPoly)
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-vector-slice-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-vector-slice-ext.fun 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-vector-slice-ext.fun 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,12 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-functor MkMonoVectorSliceExt (structure MonoVectorSlice :
- BASIS_MONO_VECTOR_SLICE) =
-struct
- open MonoVectorSlice
- type t = slice
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-real-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-real-ext.fun 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-real-ext.fun 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,16 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-functor MkRealExt (R : BASIS_REAL) : REAL = struct
- open R
- type t = real
- val embDecimal = (toDecimal, fromDecimal)
- val embString = (toString, fromString)
- fun isoInt mode = (toInt mode, fromInt)
- fun isoLarge mode = (toLarge, fromLarge mode)
- fun isoLargeInt mode = (toLargeInt mode, fromLargeInt)
- val isoManExp = (toManExp, fromManExp)
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-seq-common-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-seq-common-ext.fun 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-seq-common-ext.fun 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,19 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-functor MkSeqCommonExt (type 'a t
- val foldr : ('a * 'b -> 'b) -> 'b -> 'a t -> 'b
- val fromList : 'a list -> 'a t
- val maxLen : int) = struct
- fun unfoldi fis (n, s) = let
- fun lp (i, s, xs) =
- if i = n then (fromList (rev xs), s)
- else case fis (i, s) of (x, s) => lp (i+1, s, x::xs)
- in if n < 0 orelse maxLen < n then raise Size else lp (0, s, [])
- end
- fun toList t = foldr op :: [] t
- val isoList = (toList, fromList)
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-text-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-text-ext.fun 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-text-ext.fun 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,89 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-functor MkTextExt (T : BASIS_TEXT) : TEXT = struct
- open T
-
- structure Char : CHAR = struct
- structure Core = struct
- open Char
- type t = char
- type bounded = t
- type cased = t
- type cstringable = t
- type ordered = t
- type scannable = t
- type stringable = t
- val boundsChar = (minChar, maxChar)
- val bounds = boundsChar
- val minOrd = 0
- val boundsOrd = (minOrd, maxOrd)
- val isoInt = (ord, chr)
- val embCString = (toCString, fromCString)
- val embString = (toString, fromString)
- end
-
- structure Bounded = MkBounded (Core)
- structure CStringable = MkCStringable (Core)
- structure Ordered = MkOrdered (Core)
- structure Stringable = MkStringable (Core)
-
- open Bounded
- open CStringable
- open Ordered
- open Stringable
-
- open Core
- end
-
- structure CharVector = MkMonoVectorExt (CharVector)
-
- structure CharVectorSlice =
- MkMonoVectorSliceExt (structure MonoVectorSlice = CharVectorSlice)
-
- structure CharArray =
- MkMonoArrayExt (structure MonoArray = CharArray
- structure MonoVector = CharVector)
-
- structure CharArraySlice =
- MkMonoArraySliceExt (structure MonoArraySlice = CharArraySlice)
-
- structure String : STRING = struct
- structure Core = struct
- open CharVector
- open String
- type t = string
- type cased = t
- type cstringable = t
- type ordered = t
- type scannable = t
- type stringable = t
- val toUpper = map Char.toUpper
- val toLower = map Char.toLower
- val embCString = (toCString, fromCString)
- val embString = (toString, fromString)
- val isoList = (explode, implode)
- end
-
- structure CStringable = MkCStringable (Core)
- structure Ordered = MkOrdered (Core)
- structure Scannable = MkScannable (Core)
- structure Stringable = MkStringable (Core)
-
- open CStringable
- open Ordered
- open Scannable
- open Stringable
-
- open Core
- end
-
- structure Substring : SUBSTRING = struct
- open Substring
- type t = substring
- val length = size
- end
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-word-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-word-ext.fun 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-word-ext.fun 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,55 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-functor MkWordExt (W : BASIS_WORD) : WORD = struct
- open W
- type t = word
- val bounds as (minWord, maxWord) = (fromInt 0, fromInt~1)
- val numBytes = BasisInt.quot (BasisInt.+ (wordSize, 7), 8)
- local
- fun mk fold bs =
- if numBytes <> BasisWord8Vector.length bs then
- raise Subscript
- else
- fold (fn (b, w) =>
- W.orb (W.<< (w, 0w8), W.fromLarge (BasisWord8.toLarge b)))
- (W.fromInt 0)
- bs
- in
- val fromBigBytes = mk BasisWord8Vector.foldl
- val fromLittleBytes = mk BasisWord8Vector.foldr
- end
- val fromWord = fromLarge o BasisWord.toLarge
- val fromWordX = fromLarge o BasisWord.toLargeX
- local
- fun mk idx w =
- BasisWord8Vector.tabulate
- (numBytes,
- fn i =>
- BasisWord8.fromLarge
- (W.toLarge (W.>> (w, BasisWord.*
- (0w8, BasisWord.fromInt (idx i))))))
- in
- val toBigBytes = mk (fn i => BasisInt.- (BasisInt.- (numBytes, 1), i))
- val toLittleBytes = mk (fn i => i)
- end
- val toWord = BasisWord.fromLarge o toLarge
- val toWordX = BasisWord.fromLarge o toLargeX
- val embString = (toString, fromString)
- val isoBigBytes = (toBigBytes, fromBigBytes)
- val isoInt = (toInt, fromInt)
- val isoIntX = (toIntX, fromInt)
- val isoLarge = (toLarge, fromLarge)
- val isoLargeInt = (toLargeInt, fromLargeInt)
- val isoLargeIntX = (toLargeIntX, fromLargeInt)
- val isoLargeX = (toLargeX, fromLarge)
- val isoLittleBytes = (toLittleBytes, fromLittleBytes)
- val isoWord = (toWord, fromWord)
- val isoWordX = (toWordX, fromWordX)
- fun isZero w = fromInt 0 = w
- fun isEven w = isZero (andb (fromInt 1, w))
- val isOdd = not o isEven
-end
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/numeric/mk-int-inf-ext.fun (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-int-inf-ext.fun)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/numeric/mk-integer-ext.fun (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-integer-ext.fun)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/numeric/mk-real-ext.fun (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-real-ext.fun)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/numeric/mk-word-ext.fun (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-word-ext.fun)
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/option.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/option.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/option.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,17 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-structure Option : OPTION = struct
- open Option
- val isNone = fn NONE => true
- | SOME _ => false
-
- fun collate cmp = fn (NONE, NONE) => EQUAL
- | (SOME _, NONE) => GREATER
- | (NONE, SOME _) => LESS
- | (SOME x1, SOME x2) => cmp (x1, x2)
-
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/order.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/order.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/order.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,17 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-structure Order :> ORDER = struct
- open Order
- val swap = fn LESS => GREATER
- | EQUAL => EQUAL
- | GREATER => LESS
- fun isEqual x = x = EQUAL
- fun isGreater x = x = GREATER
- fun isLess x = x = LESS
- val orWhenEq = fn (EQUAL, th) => th ()
- | (other, _) => other
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/pair.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/pair.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/pair.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,51 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-structure Pair : PAIR = struct
- open Pair
-
- val isoTuple2 as (fromTuple2, toTuple2) =
- (fn (a, b) => (a, b),
- fn (a, b) => (a, b))
- val isoTuple3 as (fromTuple3, toTuple3) =
- (fn (a, b, c) => ((a, b), c),
- fn ((a, b), c) => (a, b, c))
- val isoTuple4 as (fromTuple4, toTuple4) =
- (fn (a, b, c, d) => (((a, b), c), d),
- fn (((a, b), c), d) => (a, b, c, d))
-
- fun swap (a, b) = (b, a)
- fun swizzle ((a, b), (c, d)) = ((a, c), (b, d))
-
- fun fst (a, _) = a
- fun snd (_, b) = b
-
- fun app (ea, eb) (a, b) = (ea a : unit ; eb b : unit)
- fun appFst eA = app (eA, Effect.ignore)
- fun appSnd eB = app (Effect.ignore, eB)
-
- fun map (fa, fb) (a, b) = (fa a, fb b)
- fun mapFst fA = map (fA, Fn.id)
- fun mapSnd fB = map (Fn.id, fB)
-
- local
- fun mk p (fA, fB) (a, b) = let
- val a = fA a
- in
- if p a then a else fB b
- end
- in
- fun all ? = mk Bool.isFalse ?
- fun exists ? = mk Bool.isTrue ?
- fun equal ? = mk Bool.isFalse ? o swizzle
- fun collate ? = mk Order.isEqual ? o swizzle
- end
-
- fun foldl (fa, fb) ((a, b), s) = fb (b, fa (a, s))
- fun foldr (fa, fb) ((a, b), s) = fa (a, fb (b, s))
-
- fun thunk (na, nb) () = (na (), nb ())
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/product.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/product.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/product.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,53 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-structure Product : PRODUCT = struct
- open Product
-
- infix &
-
- val isoTuple2 as (fromTuple2, toTuple2) =
- (fn (a, b) => a & b,
- fn a & b => (a, b))
- val isoTuple3 as (fromTuple3, toTuple3) =
- (fn (a, b, c) => a & b & c,
- fn a & b & c => (a, b, c))
- val isoTuple4 as (fromTuple4, toTuple4) =
- (fn (a, b, c, d) => a & b & c & d,
- fn a & b & c & d => (a, b, c, d))
-
- fun swap (a & b) = b & a
- fun swizzle ((a & b), (c & d)) = ((a, c) & (b, d))
-
- fun fst (a & _) = a
- fun snd (_ & b) = b
-
- fun app (eA, eB) (a & b) = (eA a : unit ; eB b : unit)
- fun appFst eA = app (eA, Effect.ignore)
- fun appSnd eB = app (Effect.ignore, eB)
-
- fun map (fA, fB) (a & b) = fA a & fB b
- fun mapFst fA = map (fA, Fn.id)
- fun mapSnd fB = map (Fn.id, fB)
-
- local
- fun mk p (fA, fB) (a & b) = let
- val a = fA a
- in
- if p a then a else fB b
- end
- in
- fun all ? = mk Bool.isFalse ?
- fun exists ? = mk Bool.isTrue ?
- fun equal ? = mk Bool.isFalse ? o swizzle
- fun collate ? = mk Order.isEqual ? o swizzle
- end
-
- fun foldl (fA, fB) (a & b, s) = fB (b, fA (a, s))
- fun foldr (fA, fB) (a & b, s) = fA (a, fB (b, s))
-
- fun thunk (nA, nB) () = nA () & nB ()
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/reader.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/reader.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/reader.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,30 +0,0 @@
-(* 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.
- *)
-
-structure Reader :> READER = struct
- open Reader
-
- infix >>=
-
- type 'a monad_dom = Univ.t and 'a monad_cod = ('a * Univ.t) Option.t
-
- structure Monad =
- MkMonadP
- (type 'a monad = 'a monad_dom -> 'a monad_cod
- fun return a s = SOME (a, s)
- fun aM >>= a2bM = Option.mapPartial (Fn.uncurry a2bM) o aM
- fun zero _ = NONE
- fun plus (lM, rM) s = case lM s of NONE => rM s | result => result)
-
- open Monad
-
- fun polymorphically aM2bM = let
- val (to, from) = Univ.newIso ()
- fun map f = Option.map (Pair.map (Fn.id, f))
- in
- Fn.map (to, map from) o aM2bM o Fn.map (from, map to)
- end
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/ref.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/ref.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/ref.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,24 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-structure Ref : REF = struct
- open Ref
- val new = ref
- val ! = !
- val op := = op :=
- fun op :=: (r1, r2) = let
- val v1 = !r1
- val v2 = !r2
- in
- r1 := v2
- ; r2 := v1
- end
- fun exchange (r, v) = !r before r := v
- fun app ef = ef o !
- fun map f = new o f o !
- fun modify f r = r := f (!r)
- val equal = op =
-end
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/array-slice.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array-slice.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/array.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/buffer.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/buffer.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/list.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/list.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/mk-mono-array-ext.fun (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-ext.fun)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/mk-mono-array-slice-ext.fun (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-slice-ext.fun)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/mk-mono-seq-common-ext.fun (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-seq-common-ext.fun)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/mk-mono-vector-ext.fun (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-vector-ext.fun)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/mk-mono-vector-slice-ext.fun (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-vector-slice-ext.fun)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/mk-seq-common-ext.fun (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-seq-common-ext.fun)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/vector-slice.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/vector-slice.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sequence/vector.sml (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/vector.sml)
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/sigs.cm
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/sigs.cm 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/sigs.cm 2007-03-06 07:22:27 UTC (rev 5399)
@@ -35,6 +35,7 @@
../../public/data/sum.sig
../../public/data/unit.sig
../../public/data/univ.sig
+ ../../public/data/void.sig
../../public/fn/bin-fn.sig
../../public/fn/bin-op.sig
../../public/fn/bin-pr.sig
@@ -49,12 +50,13 @@
../../public/generic/fix.sig
../../public/generic/iso.sig
../../public/generic/tie.sig
+ ../../public/io/reader.sig
../../public/io/text-io.sig
+ ../../public/io/writer.sig
../../public/numeric/int-inf.sig
../../public/numeric/integer.sig
../../public/numeric/real.sig
../../public/numeric/word.sig
- ../../public/reader.sig
../../public/sequence/array-slice.sig
../../public/sequence/array.sig
../../public/sequence/buffer.sig
@@ -69,6 +71,4 @@
../../public/text/string.sig
../../public/text/substring.sig
../../public/text/text.sig
- ../../public/void.sig
- ../../public/writer.sig
bootstrap.cm
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/unsealed.cm
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/unsealed.cm 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/unsealed.cm 2007-03-06 07:22:27 UTC (rev 5399)
@@ -8,15 +8,7 @@
group(sigs.cm)
source(-)
is
- ../../detail/array-slice.sml
- ../../detail/array.sml
../../detail/basic.sml
- ../../detail/bin-fn.sml
- ../../detail/bin-op.sml
- ../../detail/bin-pr.sml
- ../../detail/bool.sml
- ../../detail/buffer.sml
- ../../detail/cmp.sml
../../detail/common/mono-seqs.sml
../../detail/common/scalars.sml
../../detail/concept/mk-bounded.fun
@@ -30,32 +22,48 @@
../../detail/control/exit.sml
../../detail/control/exn.sml
../../detail/control/with.sml
- ../../detail/effect.sml
- ../../detail/fn.sml
+ ../../detail/data/bool.sml
+ ../../detail/data/option.sml
+ ../../detail/data/order.sml
+ ../../detail/data/pair.sml
+ ../../detail/data/product.sml
+ ../../detail/data/ref.sml
+ ../../detail/data/sq.sml
+ ../../detail/data/sum.sml
+ ../../detail/data/univ-exn.sml
+ ../../detail/fn/bin-fn.sml
+ ../../detail/fn/bin-op.sml
+ ../../detail/fn/bin-pr.sml
+ ../../detail/fn/cmp.sml
+ ../../detail/fn/effect.sml
+ ../../detail/fn/fn.sml
+ ../../detail/fn/thunk.sml
+ ../../detail/fn/un-op.sml
+ ../../detail/fn/un-pr.sml
../../detail/generic/emb.sml
../../detail/generic/fix.sml
../../detail/generic/iso.sml
../../detail/generic/tie.sml
+ ../../detail/io/reader.sml
../../detail/io/text-io.sml
+ ../../detail/io/writer.sml
../../detail/lazy/promise.sml
- ../../detail/list.sml
- ../../detail/mk-int-inf-ext.fun
- ../../detail/mk-integer-ext.fun
- ../../detail/mk-mono-array-ext.fun
- ../../detail/mk-mono-array-slice-ext.fun
- ../../detail/mk-mono-seq-common-ext.fun
- ../../detail/mk-mono-vector-ext.fun
- ../../detail/mk-mono-vector-slice-ext.fun
- ../../detail/mk-real-ext.fun
- ../../detail/mk-seq-common-ext.fun
- ../../detail/mk-text-ext.fun
- ../../detail/mk-word-ext.fun
- ../../detail/option.sml
- ../../detail/order.sml
- ../../detail/pair.sml
- ../../detail/product.sml
- ../../detail/reader.sml
- ../../detail/ref.sml
+ ../../detail/numeric/mk-int-inf-ext.fun
+ ../../detail/numeric/mk-integer-ext.fun
+ ../../detail/numeric/mk-real-ext.fun
+ ../../detail/numeric/mk-word-ext.fun
+ ../../detail/sequence/array-slice.sml
+ ../../detail/sequence/array.sml
+ ../../detail/sequence/buffer.sml
+ ../../detail/sequence/list.sml
+ ../../detail/sequence/mk-mono-array-ext.fun
+ ../../detail/sequence/mk-mono-array-slice-ext.fun
+ ../../detail/sequence/mk-mono-seq-common-ext.fun
+ ../../detail/sequence/mk-mono-vector-ext.fun
+ ../../detail/sequence/mk-mono-vector-slice-ext.fun
+ ../../detail/sequence/mk-seq-common-ext.fun
+ ../../detail/sequence/vector-slice.sml
+ ../../detail/sequence/vector.sml
../../detail/smlnj/ints.sml
../../detail/smlnj/mono-array-slices.sml
../../detail/smlnj/mono-arrays.sml
@@ -63,15 +71,7 @@
../../detail/smlnj/mono-vectors.sml
../../detail/smlnj/reals.sml
../../detail/smlnj/words.sml
- ../../detail/sq.sml
- ../../detail/sum.sml
- ../../detail/thunk.sml
- ../../detail/un-op.sml
- ../../detail/un-pr.sml
- ../../detail/univ-exn.sml
- ../../detail/vector-slice.sml
- ../../detail/vector.sml
- ../../detail/writer.sml
+ ../../detail/text/mk-text-ext.fun
../../public/lazy/promise.sig
ext.sml
sigs.cm
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sq.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sq.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sq.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,11 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-structure Sq :> SQ = struct
- open Sq
- fun mk x = (x, x)
- fun map f (x, y) = (f x, f y)
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sum.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sum.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/sum.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,45 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-structure Sum : SUM = struct
- open Sum
-
- exception Sum
-
- fun sum (fA, fB) = fn INL a => fA a | INR b => fB b
-
- val swap = fn INL x => INR x | INR x => INL x
-
- val out = fn INL x => x | INR x => x
- val app = sum
- fun map (fA, fB) = sum (INL o fA, INR o fB)
-
- fun appL f = app (f, ignore)
- fun getL (INL x) _ = x | getL (INR _) x = x
- fun isL (INL _) = true | isL (INR _) = false
- fun mapL f = map (f, Fn.id)
- fun outL (INL l) = l | outL (INR _) = raise Sum
-
- fun appR f = appL f o swap
- fun getR ? = (getL o swap) ?
- fun isR ? = (isL o swap) ?
- fun mapR f = swap o mapL f o swap
- fun outR ? = (outL o swap) ?
-
- fun mapLR f = map (f, f)
-
- fun equal (eqA, eqB) =
- fn (INL l, INL r) => eqA (l, r)
- | (INL _, INR _) => false
- | (INR _, INL _) => false
- | (INR l, INR r) => eqB (l, r)
-
- fun collate (cmpA, cmpB) =
- fn (INL l, INL r) => cmpA (l, r)
- | (INL _, INR _) => LESS
- | (INR _, INL _) => GREATER
- | (INR l, INR r) => cmpB (l, r)
-end
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/text/mk-text-ext.fun (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-text-ext.fun)
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/thunk.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/thunk.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/thunk.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,10 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-structure Thunk :> THUNK = struct
- open Thunk
- val mk = Fn.const
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/un-op.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/un-op.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/un-op.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,9 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-structure UnOp :> UN_OP = struct
- open UnOp
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/un-pr.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/un-pr.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/un-pr.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,13 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-structure UnPr :> UN_PR = struct
- open UnPr
- fun map f p = p o f
- fun op andAlso (p, q) ? = p ? andalso q ?
- fun op orElse (p, q) ? = p ? orelse q ?
- fun negate p = not o p
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/univ-exn.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/univ-exn.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/univ-exn.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,25 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-structure UnivExn :> UNIV = struct
- open Univ
-
- type t = Exn.t
-
- fun newIso () = let
- exception U of 'a
- in
- (U, fn U ? => ? | _ => raise Univ)
- end
-
- fun newEmb () = let
- exception U of 'a
- in
- (U, fn U ? => SOME ? | _ => NONE)
- end
-end
-
-structure Univ :> UNIV = UnivExn
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/univ-ref.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/univ-ref.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/univ-ref.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,30 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-structure UnivRef :> UNIV = struct
- open Univ
-
- datatype t =
- IN of {clear : unit -> unit,
- store : unit -> unit}
-
- local
- fun mk deref = let
- val r = ref NONE
- in
- (fn a =>
- IN {clear = fn () => r := NONE,
- store = fn () => r := SOME a},
- fn IN {clear, store} =>
- deref ((store () ; !r) before clear ()))
- end
- in
- fun newIso () = mk (fn SOME ? => ? | NONE => raise Univ)
- fun newEmb () = mk (fn ? => ?)
- end
-end
-
-structure Univ :> UNIV = UnivRef
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/vector-slice.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/vector-slice.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/vector-slice.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,9 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-structure VectorSlice : VECTOR_SLICE = struct
- open VectorSlice
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/vector.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/vector.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/vector.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,13 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-structure Vector : VECTOR = struct
- local
- structure Common = MkSeqCommonExt (Vector)
- in
- open Vector Common
- end
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/writer.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/writer.sml 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/writer.sml 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,20 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-structure Writer :> WRITER = struct
- open Writer
-
- type 'a func_dom = 'a * Univ.t and 'a func_cod = Univ.t
- type 'a func = 'a func_dom -> 'a func_cod
- fun map b2a wA = wA o Pair.map (b2a, Fn.id)
-
- fun polymorphically uA2uB = let
- val (to, from) = Univ.newIso ()
- fun map f = Pair.map (Fn.id, f)
- in
- Fn.map (map to, from) o uA2uB o Fn.map (map from, to)
- end
-end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb 2007-03-06 07:22:27 UTC (rev 5399)
@@ -74,11 +74,11 @@
detail/concept/mk-cstringable.fun
(* Void *)
- public/void.sig
+ public/data/void.sig
(* Fn *)
public/fn/fn.sig
- detail/fn.sml
+ detail/fn/fn.sml
(* Basic *)
public/basic.sig
@@ -89,25 +89,25 @@
(* Sq *)
public/data/sq.sig
- detail/sq.sml
+ detail/data/sq.sml
(* BinFn *)
- public/fn/bin-fn.sig detail/bin-fn.sml
+ public/fn/bin-fn.sig detail/fn/bin-fn.sml
(* UnOp *)
public/fn/un-op.sig
- detail/un-op.sml
+ detail/fn/un-op.sml
(* Thunk *)
public/fn/thunk.sig
- detail/thunk.sml
+ detail/fn/thunk.sml
(* Univ *)
public/data/univ.sig
local
ann "warnUnused false" in
- detail/univ-ref.sml
- detail/univ-exn.sml
+ detail/data/univ-ref.sml
+ detail/data/univ-exn.sml
end
in
detail/$(SML_COMPILER)/univ.sml
@@ -115,11 +115,11 @@
(* BinOp *)
public/fn/bin-op.sig
- detail/bin-op.sml
+ detail/fn/bin-op.sml
(* Effect *)
public/fn/effect.sig
- detail/effect.sml
+ detail/fn/effect.sml
(* Fix *)
public/generic/fix.sig
@@ -127,37 +127,37 @@
(* UnPr *)
public/fn/un-pr.sig
- detail/un-pr.sml
+ detail/fn/un-pr.sml
(* Order *)
public/data/order.sig
- detail/order.sml
+ detail/data/order.sml
(* BinPr *)
public/fn/bin-pr.sig
- detail/bin-pr.sml
+ detail/fn/bin-pr.sml
(* Cmp *)
public/fn/cmp.sig
- detail/cmp.sml
+ detail/fn/cmp.sml
(* MkOrdered *)
detail/concept/mk-ordered.fun
(* Ref *)
public/data/ref.sig
- detail/ref.sml
+ detail/data/ref.sml
(* Bool *)
public/data/bool.sig
- detail/bool.sml
+ detail/data/bool.sml
(* Products *)
public/data/product-type.sig
public/data/pair.sig
- detail/pair.sml
+ detail/data/pair.sml
public/data/product.sig
- detail/product.sml
+ detail/data/product.sml
(* MkMonad *)
detail/concept/mk-monad.fun
@@ -168,7 +168,7 @@
(* Sum *)
public/data/sum.sig
- detail/sum.sml
+ detail/data/sum.sml
(* Exn *)
public/control/exn.sig
@@ -191,31 +191,31 @@
public/sequence/array-slice.sig
public/sequence/vector.sig
public/sequence/vector-slice.sig
- detail/mk-seq-common-ext.fun
- detail/array.sml
- detail/array-slice.sml
- detail/vector.sml
- detail/vector-slice.sml
+ detail/sequence/mk-seq-common-ext.fun
+ detail/sequence/array.sml
+ detail/sequence/array-slice.sml
+ detail/sequence/vector.sml
+ detail/sequence/vector-slice.sml
(* Option *)
public/data/option.sig
- detail/option.sml
+ detail/data/option.sml
(* List *)
public/sequence/list.sig
- detail/list.sml
+ detail/sequence/list.sml
(* Buffer *)
public/sequence/buffer.sig
- detail/buffer.sml
+ detail/sequence/buffer.sml
(* Reader *)
- public/reader.sig
- detail/reader.sml
+ public/io/reader.sig
+ detail/io/reader.sml
(* Writer *)
- public/writer.sig
- detail/writer.sml
+ public/io/writer.sig
+ detail/io/writer.sml
(* Exit *)
public/control/exit.sig
@@ -226,10 +226,10 @@
public/numeric/integer.sig
public/numeric/real.sig
public/numeric/word.sig
- detail/mk-integer-ext.fun
- detail/mk-int-inf-ext.fun
- detail/mk-real-ext.fun
- detail/mk-word-ext.fun
+ detail/numeric/mk-integer-ext.fun
+ detail/numeric/mk-int-inf-ext.fun
+ detail/numeric/mk-real-ext.fun
+ detail/numeric/mk-word-ext.fun
detail/common/scalars.sml
detail/$(SML_COMPILER)/ints.sml
detail/$(SML_COMPILER)/reals.sml
@@ -244,12 +244,12 @@
public/text/string.sig
public/text/substring.sig
public/text/text.sig
- detail/mk-mono-seq-common-ext.fun
- detail/mk-mono-vector-ext.fun
- detail/mk-mono-vector-slice-ext.fun
- detail/mk-mono-array-ext.fun
- detail/mk-mono-array-slice-ext.fun
- detail/mk-text-ext.fun
+ detail/sequence/mk-mono-seq-common-ext.fun
+ detail/sequence/mk-mono-vector-ext.fun
+ detail/sequence/mk-mono-vector-slice-ext.fun
+ detail/sequence/mk-mono-array-ext.fun
+ detail/sequence/mk-mono-array-slice-ext.fun
+ detail/text/mk-text-ext.fun
detail/common/mono-seqs.sml
detail/$(SML_COMPILER)/mono-vectors.sml
detail/$(SML_COMPILER)/mono-vector-slices.sml
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/public/data/void.sig (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/public/void.sig)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/public/io/reader.sig (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/public/reader.sig)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/public/io/writer.sig (from rev 5393, mltonlib/trunk/com/ssh/extended-basis/unstable/public/writer.sig)
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/public/reader.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/reader.sig 2007-03-06 06:53:19 UTC (rev 5398)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/reader.sig 2007-03-06 07:22:27 UTC (rev 5399)
@@ -1,18 +0,0 @@
-(* Copyright (C) 2006 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.
- *)
-
-(** Utilities for dealing with readers. *)
-sign
More information about the MLton-commit
mailing list