[MLton-commit] r5064
Vesa Karvonen
vesak at mlton.org
Fri Jan 12 04:39:55 PST 2007
Initial commit of a lib of misc utils to be refactored.
----------------------------------------------------------------------
A mltonlib/trunk/com/ssh/misc-util/unstable/type-support.sml
----------------------------------------------------------------------
Added: mltonlib/trunk/com/ssh/misc-util/unstable/type-support.sml
===================================================================
--- mltonlib/trunk/com/ssh/misc-util/unstable/type-support.sml 2007-01-12 12:39:26 UTC (rev 5063)
+++ mltonlib/trunk/com/ssh/misc-util/unstable/type-support.sml 2007-01-12 12:39:48 UTC (rev 5064)
@@ -0,0 +1,37 @@
+(* 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.
+ *)
+
+(*
+ * Supporting primitives required by {TYPE}
+ *)
+
+structure TypeSupport :> sig
+ eqtype label
+ eqtype constructor
+
+ type record
+ type tuple
+
+ val labelToString : label -> String.t
+ val constructorToString : constructor -> String.t
+
+ val L : String.t -> label
+ val C : String.t -> constructor
+end = struct
+ structure Dbg = MkDbg (open DbgDefs val name = "TypeSupport")
+
+ type label = String.t
+ type constructor = String.t
+
+ type record = Unit.t
+ type tuple = Unit.t
+
+ val labelToString = id
+ val constructorToString = id
+
+ val L = Effect.obs (fn s => Dbg.assert 0 (fn () => SmlSyntax.isLabel s))
+ val C = Effect.obs (fn s => Dbg.assert 0 (fn () => SmlSyntax.isLongId s))
+end
Property changes on: mltonlib/trunk/com/ssh/misc-util/unstable/type-support.sml
___________________________________________________________________
Name: svn:eol-style
+ native
More information about the MLton-commit
mailing list