[MLton-commit] r5065

Vesa Karvonen vesak at mlton.org
Fri Jan 12 04:40:22 PST 2007


Initial commit of a lib of misc utils to be refactored.
----------------------------------------------------------------------

A   mltonlib/trunk/com/ssh/misc-util/unstable/type-util.sml

----------------------------------------------------------------------

Added: mltonlib/trunk/com/ssh/misc-util/unstable/type-util.sml
===================================================================
--- mltonlib/trunk/com/ssh/misc-util/unstable/type-util.sml	2007-01-12 12:39:48 UTC (rev 5064)
+++ mltonlib/trunk/com/ssh/misc-util/unstable/type-util.sml	2007-01-12 12:40:13 UTC (rev 5065)
@@ -0,0 +1,19 @@
+(* 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 type-indexed functions.
+ *)
+
+structure TypeUtil :> sig
+   val failExn : Exn.t -> 'a
+   val failExnSq : Exn.t Sq.t -> 'a
+end = struct
+   val ` = Exn.name
+   fun failCat ss = raise Fail (concat ss)
+   fun failExn e = failCat ["unregistered exn ", `e]
+   fun failExnSq (l, r) = failCat ["unregistered exns ", `l, " and ", `r]
+end


Property changes on: mltonlib/trunk/com/ssh/misc-util/unstable/type-util.sml
___________________________________________________________________
Name: svn:eol-style
   + native




More information about the MLton-commit mailing list