[MLton-commit] r6041
Vesa Karvonen
vesak at mlton.org
Wed Sep 19 20:29:03 PDT 2007
Moved OptInt to a separate file.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/generic/unstable/detail/ml/smlnj/unsealed.cm
A mltonlib/trunk/com/ssh/generic/unstable/detail/opt-int.sml
U mltonlib/trunk/com/ssh/generic/unstable/detail/value/pickle.sml
U mltonlib/trunk/com/ssh/generic/unstable/detail/value/pretty.sml
U mltonlib/trunk/com/ssh/generic/unstable/lib.mlb
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/ml/smlnj/unsealed.cm
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/ml/smlnj/unsealed.cm 2007-09-20 03:08:27 UTC (rev 6040)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/ml/smlnj/unsealed.cm 2007-09-20 03:29:02 UTC (rev 6041)
@@ -43,6 +43,7 @@
../../hash-univ.sml
../../layer-generic.fun
../../mk-closed-rep.fun
+ ../../opt-int.sml
../../reg-basis-exns.fun
../../root-generic.sml
../../sml-syntax.sml
Added: mltonlib/trunk/com/ssh/generic/unstable/detail/opt-int.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/opt-int.sml 2007-09-20 03:08:27 UTC (rev 6040)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/opt-int.sml 2007-09-20 03:29:02 UTC (rev 6041)
@@ -0,0 +1,18 @@
+(* 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 OptInt = struct
+ type t = Int.t Option.t
+ local
+ fun mk bop =
+ fn (SOME l, SOME r) => SOME (bop (l, r))
+ | _ => NONE
+ in
+ val op + = mk op +
+ val op - = mk op -
+ val op div = mk op div
+ end
+end
Property changes on: mltonlib/trunk/com/ssh/generic/unstable/detail/opt-int.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/value/pickle.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/value/pickle.sml 2007-09-20 03:08:27 UTC (rev 6040)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/value/pickle.sml 2007-09-20 03:29:02 UTC (rev 6041)
@@ -165,18 +165,6 @@
end
end
- structure OptInt = struct
- type t = Int.t Option.t
- local
- fun mk bop =
- fn (SOME l, SOME r) => SOME (bop (l, r))
- | _ => NONE
- in
- val op + = mk op +
- val op div = mk op div
- end
- end
-
datatype 'a t =
P of {rd : 'a I.monad,
wr : 'a -> Unit.t O.monad,
Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/value/pretty.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/value/pretty.sml 2007-09-20 03:08:27 UTC (rev 6040)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/value/pretty.sml 2007-09-20 03:29:02 UTC (rev 6041)
@@ -61,17 +61,6 @@
fun surround (n, p) = nest n o enclose p
fun atomize (a, d) = if ATOMIC = a then d else surround parens d
- structure OptInt = struct
- type t = Int.t Option.t
- local
- fun mk bop =
- fn (SOME l, SOME r) => SOME (bop (l, r))
- | _ => NONE
- in
- val op - = mk op -
- end
- end
-
structure Fmt = struct
structure Opts = MkOpts (type 'a t = 'a)
@@ -255,7 +244,9 @@
((), E ({cnt = cnt, fmt = fmt, map = map}, v))
fun getRemDepth (e as E (_, {maxDepth})) = (maxDepth, e)
- fun setRemDepth maxDepth (E (c, _)) = ((), E (c, {maxDepth = maxDepth}))
+ fun setRemDepth remDepth =
+ (Fmt.notNegOpt remDepth
+ ; fn (E (c, _)) => ((), E (c, {maxDepth = remDepth})))
structure Fixity = Fixity
Modified: mltonlib/trunk/com/ssh/generic/unstable/lib.mlb
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/lib.mlb 2007-09-20 03:08:27 UTC (rev 6040)
+++ mltonlib/trunk/com/ssh/generic/unstable/lib.mlb 2007-09-20 03:29:02 UTC (rev 6041)
@@ -48,6 +48,8 @@
detail/mk-closed-rep.fun
+ detail/opt-int.sml (* XXX Should really go to Extended Basis? *)
+
local
local
$(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlb
More information about the MLton-commit
mailing list