[MLton-commit] r5597
Vesa Karvonen
vesak at mlton.org
Thu Jun 7 09:41:44 PDT 2007
GenericsUtil for defining generics.
----------------------------------------------------------------------
A mltonlib/trunk/com/ssh/generic/unstable/detail/generics-util.sml
U mltonlib/trunk/com/ssh/generic/unstable/detail/ml/smlnj/unsealed.cm
U mltonlib/trunk/com/ssh/generic/unstable/lib.mlb
U mltonlib/trunk/com/ssh/generic/unstable/public/export.sml
A mltonlib/trunk/com/ssh/generic/unstable/public/generics-util.sig
----------------------------------------------------------------------
Copied: mltonlib/trunk/com/ssh/generic/unstable/detail/generics-util.sml (from rev 5593, mltonlib/trunk/com/ssh/misc-util/unstable/type-util.sml)
===================================================================
--- mltonlib/trunk/com/ssh/misc-util/unstable/type-util.sml 2007-06-07 09:57:22 UTC (rev 5593)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/generics-util.sml 2007-06-07 16:41:44 UTC (rev 5597)
@@ -0,0 +1,16 @@
+(* 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 GenericsUtil :> GENERICS_UTIL = struct
+ (* <-- SML/NJ workaround *)
+ open Basic
+ (* SML/NJ workaround --> *)
+
+ val ` = Exn.name
+ fun failCat ss = fail (concat ss)
+ fun failExn e = failCat ["unregistered exn ", `e]
+ fun failExnSq (l, r) = failCat ["unregistered exns ", `l, " and ", `r]
+end
Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/ml/smlnj/unsealed.cm
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/ml/smlnj/unsealed.cm 2007-06-07 15:50:28 UTC (rev 5596)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/ml/smlnj/unsealed.cm 2007-06-07 16:41:44 UTC (rev 5597)
@@ -10,9 +10,11 @@
../../../public/ext-generic.sig
../../../public/generic-index.sig
../../../public/generic.sig
+ ../../../public/generics-util.sig
../../../public/generics.sig
../../../public/join-generics-fun.sig
../../generic.sml
+ ../../generics-util.sml
../../generics.sml
../../ground-generic.fun
../../join-generics.fun
Modified: mltonlib/trunk/com/ssh/generic/unstable/lib.mlb
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/lib.mlb 2007-06-07 15:50:28 UTC (rev 5596)
+++ mltonlib/trunk/com/ssh/generic/unstable/lib.mlb 2007-06-07 16:41:44 UTC (rev 5597)
@@ -20,6 +20,9 @@
detail/generics.sml
end
+ public/generics-util.sig
+ detail/generics-util.sml
+
public/generic-index.sig
public/generic.sig
Modified: mltonlib/trunk/com/ssh/generic/unstable/public/export.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/export.sml 2007-06-07 15:50:28 UTC (rev 5596)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/export.sml 2007-06-07 16:41:44 UTC (rev 5597)
@@ -8,6 +8,8 @@
signature GENERICS = GENERICS
+signature GENERICS_UTIL = GENERICS_UTIL
+
signature GENERIC = GENERIC
signature GENERIC_INDEX = GENERIC_INDEX
@@ -20,6 +22,7 @@
structure Generic : EXT_GENERIC = Generic
structure Generics : GENERICS = Generics
+structure GenericsUtil : GENERICS_UTIL = GenericsUtil
(** == Exported Functors == *)
Added: mltonlib/trunk/com/ssh/generic/unstable/public/generics-util.sig
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/generics-util.sig 2007-06-07 15:50:28 UTC (rev 5596)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/generics-util.sig 2007-06-07 16:41:44 UTC (rev 5597)
@@ -0,0 +1,13 @@
+(* 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.
+ *)
+
+(**
+ * Utilities for defining generic functions.
+ *)
+signature GENERICS_UTIL = sig
+ val failExn : Exn.t -> 'a
+ val failExnSq : Exn.t Sq.t -> 'a
+end
Property changes on: mltonlib/trunk/com/ssh/generic/unstable/public/generics-util.sig
___________________________________________________________________
Name: svn:eol-style
+ native
More information about the MLton-commit
mailing list