[MLton-commit] r5423
Vesa Karvonen
vesak at mlton.org
Mon Mar 12 05:56:21 PST 2007
Written slightly more concisely using multi-include and sharing
constraints.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/text/char.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/text/string.sig
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/text/char.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/text/char.sig 2007-03-12 13:26:37 UTC (rev 5422)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/text/char.sig 2007-03-12 13:56:21 UTC (rev 5423)
@@ -6,12 +6,12 @@
(** Extended {CHAR} signature. *)
signature CHAR = sig
+ eqtype t
+ (** Convenience alias. *)
+
eqtype char
eqtype string
- type t = char
- (** Convenience alias. *)
-
val ord : t -> Int.t
val chr : Int.t -> t
@@ -68,10 +68,7 @@
(** == Concepts == *)
- include BOUNDED where type bounded = t
- include CASED where type cased = t
- include CSTRINGABLE where type cstringable = t
- include ORDERED where type ordered = t
- include SCANNABLE where type scannable = t
- include STRINGABLE where type stringable = t
+ include BOUNDED CASED CSTRINGABLE ORDERED SCANNABLE STRINGABLE
+
+ sharing type t=char=bounded=cased=cstringable=ordered=scannable=stringable
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/text/string.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/text/string.sig 2007-03-12 13:26:37 UTC (rev 5422)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/text/string.sig 2007-03-12 13:56:21 UTC (rev 5423)
@@ -6,12 +6,12 @@
(** Extended {STRING} signature. *)
signature STRING = sig
+ eqtype t
+ (** Convenience alias. *)
+
eqtype string
eqtype char
- type t = string
- (** Convenience alias. *)
-
val maxSize : Int.t
val size : t -> Int.t
@@ -52,8 +52,8 @@
(** == {MONO_VECTOR} == *)
- type elem = char
- type vector = t
+ type elem
+ type vector
val all : elem UnPr.t -> vector UnPr.t
val app : elem Effect.t -> vector Effect.t
@@ -78,9 +78,8 @@
(** == Concepts == *)
- include CASED where type cased = t
- include CSTRINGABLE where type cstringable = t
- include ORDERED where type ordered = t
- include SCANNABLE where type scannable = t
- include STRINGABLE where type stringable = t
+ include CASED CSTRINGABLE ORDERED SCANNABLE STRINGABLE
+
+ sharing type char=elem
+ sharing type t=string=cstringable=ordered=scannable=stringable=vector
end
More information about the MLton-commit
mailing list