[MLton-commit] r4871

Vesa Karvonen vesak at mlton.org
Wed Nov 29 04:47:48 PST 2006


Documentation.
----------------------------------------------------------------------

U   mltonlib/trunk/com/ssh/extended-basis/unstable/public/iso.sig

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

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/iso.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/iso.sig	2006-11-29 03:57:38 UTC (rev 4870)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/iso.sig	2006-11-29 12:47:40 UTC (rev 4871)
@@ -7,17 +7,13 @@
 (** Signature for the {Iso} structure for isomorphisms. *)
 signature ISO = sig
    type ('a, 'b) t = ('a -> 'b) * ('b -> 'a)
-   (**
-    * Isomorphism between {'a} and {'b} with injection and projection
-    * functions.
-    *)
+   (** Witness to an isomorphism between {'a} and {'b}. *)
 
    val id : ('a, 'a) t
-   (**
-    * The identity isomorphism.  This is always equivalent to {(fn a => a,
-    * fn a => a)}.
-    *)
+   (** The trivial isomorphism.  This is always equivalent to {(id, id)}. *)
 
+   (** == Basic == *)
+
    val to : ('a, 'b) t -> 'a -> 'b
    (** Extracts the injection part of the given isomorphism. *)
 
@@ -25,12 +21,31 @@
    (** Extracts the projection part of the given isomorphism. *)
 
    val swap : ('a, 'b) t -> ('b, 'a) t
+   (** Switch the direction of the isomorphism. *)
+
+   (** == Combinators for Building Isomorphisms == *)
+
    val map : ('c, 'a) t * ('b, 'd) t -> ('a, 'b) t -> ('c, 'd) t
+   (** Changes the domain and range of an isomorphism. *)
 
    val <--> : ('a, 'b) t * ('c, 'a) t -> ('c, 'b) t
    (** Isomorphism composition. *)
 
    val --> : ('c, 'a) t * ('b, 'd) t -> (('a, 'b) Fn.t, ('c, 'd) Fn.t) t
+   (**
+    * Creates an isomorphism between functions given isomorphisms between
+    * domains and ranges.
+    *)
+
    val +` : ('a, 'c) t * ('b, 'd) t -> (('a, 'b) Sum.t, ('c, 'd) Sum.t) t
+   (**
+    * Creates an isomorphism between sums given isomorphisms between
+    * elements.
+    *)
+
    val *` : ('a, 'c) t * ('b, 'd) t -> (('a, 'b) Product.t, ('c, 'd) Product.t) t
+   (**
+    * Creates an isomorphism between products given isomorphisms between
+    * elements.
+    *)
 end




More information about the MLton-commit mailing list