[MLton-commit] r6178
Vesa Karvonen
vesak at mlton.org
Mon Nov 19 08:59:23 PST 2007
Made OO Shapes Example independent of the Extended Basis library.
----------------------------------------------------------------------
U mltonlib/trunk/org/mlton/vesak/tech/oo/framework/lib.mlb
U mltonlib/trunk/org/mlton/vesak/tech/oo/framework/lib.use
A mltonlib/trunk/org/mlton/vesak/tech/oo/framework/prelude.sml
U mltonlib/trunk/org/mlton/vesak/tech/oo/imperative-shapes/main.mlb
----------------------------------------------------------------------
Modified: mltonlib/trunk/org/mlton/vesak/tech/oo/framework/lib.mlb
===================================================================
--- mltonlib/trunk/org/mlton/vesak/tech/oo/framework/lib.mlb 2007-11-19 16:26:57 UTC (rev 6177)
+++ mltonlib/trunk/org/mlton/vesak/tech/oo/framework/lib.mlb 2007-11-19 16:59:22 UTC (rev 6178)
@@ -4,11 +4,9 @@
* See the LICENSE file or http://mlton.org/License for details.
*)
-local
- $(MLTON_LIB)/com/ssh/extended-basis/unstable/basis.mlb
-in
- any.sig
- any.sml
- sub.fun
- var.sml
-end
+$(SML_LIB)/basis/basis.mlb
+prelude.sml
+any.sig
+any.sml
+sub.fun
+var.sml
Modified: mltonlib/trunk/org/mlton/vesak/tech/oo/framework/lib.use
===================================================================
--- mltonlib/trunk/org/mlton/vesak/tech/oo/framework/lib.use 2007-11-19 16:26:57 UTC (rev 6177)
+++ mltonlib/trunk/org/mlton/vesak/tech/oo/framework/lib.use 2007-11-19 16:59:22 UTC (rev 6178)
@@ -4,7 +4,7 @@
* See the LICENSE file or http://mlton.org/License for details.
*)
-lib ["../../../../../../com/ssh/extended-basis/unstable/basis.use",
+lib ["prelude.sml",
"any.sig",
"any.sml",
"sub.fun",
Added: mltonlib/trunk/org/mlton/vesak/tech/oo/framework/prelude.sml
===================================================================
--- mltonlib/trunk/org/mlton/vesak/tech/oo/framework/prelude.sml 2007-11-19 16:26:57 UTC (rev 6177)
+++ mltonlib/trunk/org/mlton/vesak/tech/oo/framework/prelude.sml 2007-11-19 16:59:22 UTC (rev 6178)
@@ -0,0 +1,42 @@
+(* Copyright (C) 2007 Vesa Karvonen
+ *
+ * This code is released under the MLton license, a BSD-style license.
+ * See the LICENSE file or http://mlton.org/License for details.
+ *)
+
+(* NOTE: All of these are already provided by the Extended Basis library. *)
+
+fun id x = x
+
+structure Int = struct
+ open Int
+ type t = int
+end
+
+structure Unit = struct
+ type t = unit
+end
+
+structure Sq = struct
+ type 'a t = 'a * 'a
+end
+
+structure Effect = struct
+ type 'a t = 'a -> Unit.t
+end
+
+structure Thunk = struct
+ type 'a t = Unit.t -> 'a
+end
+
+infix &
+
+structure Product = struct
+ datatype ('a, 'b) product = & of 'a * 'b
+ type ('a, 'b) t = ('a, 'b) product
+ fun fst (a & _) = a
+ fun snd (_ & b) = b
+ fun mapFst f (a & b) = f a & b
+end
+
+datatype product = datatype Product.product
Property changes on: mltonlib/trunk/org/mlton/vesak/tech/oo/framework/prelude.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: mltonlib/trunk/org/mlton/vesak/tech/oo/imperative-shapes/main.mlb
===================================================================
--- mltonlib/trunk/org/mlton/vesak/tech/oo/imperative-shapes/main.mlb 2007-11-19 16:26:57 UTC (rev 6177)
+++ mltonlib/trunk/org/mlton/vesak/tech/oo/imperative-shapes/main.mlb 2007-11-19 16:59:22 UTC (rev 6178)
@@ -5,7 +5,6 @@
*)
local
- $(MLTON_LIB)/com/ssh/extended-basis/unstable/basis.mlb
../framework/lib.mlb
shape.sig
More information about the MLton-commit
mailing list