[MLton-commit] r5422

Vesa Karvonen vesak at mlton.org
Mon Mar 12 05:26:38 PST 2007


Wrote a few signatures slightly more concisely using multi-include and
sharing constraints.

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

U   mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/bounded.sig
U   mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/cstringable.sig
U   mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/equality.sig
U   mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/formattable.sig
U   mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/monad.sig
U   mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/ordered.sig
U   mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/stringable.sig

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

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/bounded.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/bounded.sig	2007-03-12 03:07:55 UTC (rev 5421)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/bounded.sig	2007-03-12 13:26:37 UTC (rev 5422)
@@ -18,8 +18,8 @@
 end
 
 signature BOUNDED = sig
-   include BOUNDED_CORE
-   include BOUNDED_EX where type bounded_ex = bounded
+   include BOUNDED_CORE BOUNDED_EX
+   sharing type bounded = bounded_ex
 end
 
 (** == Maybe Bounded == *)
@@ -36,6 +36,6 @@
 end
 
 signature MAYBE_BOUNDED = sig
-   include MAYBE_BOUNDED_CORE
-   include MAYBE_BOUNDED_EX where type bounded_ex = bounded
+   include MAYBE_BOUNDED_CORE MAYBE_BOUNDED_EX
+   sharing type bounded = bounded_ex
 end

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/cstringable.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/cstringable.sig	2007-03-12 03:07:55 UTC (rev 5421)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/cstringable.sig	2007-03-12 13:26:37 UTC (rev 5422)
@@ -42,6 +42,6 @@
 end
 
 signature CSTRINGABLE = sig
-   include CSTRINGABLE_CORE
-   include CSTRINGABLE_EX where type cstringable_ex = cstringable
+   include CSTRINGABLE_CORE CSTRINGABLE_EX
+   sharing type cstringable = cstringable_ex
 end

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/equality.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/equality.sig	2007-03-12 03:07:55 UTC (rev 5421)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/equality.sig	2007-03-12 13:26:37 UTC (rev 5422)
@@ -25,6 +25,6 @@
 end
 
 signature EQUALITY = sig
-   include EQUALITY_CORE
-   include EQUALITY_EX where type equality_ex = equality
+   include EQUALITY_CORE EQUALITY_EX
+   sharing type equality = equality_ex
 end

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/formattable.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/formattable.sig	2007-03-12 03:07:55 UTC (rev 5421)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/formattable.sig	2007-03-12 13:26:37 UTC (rev 5422)
@@ -11,13 +11,12 @@
 end
 
 signature FORMATTABLE_and_SCANNABLE = sig
-   include FORMATTABLE
-   include SCANNABLE where type scannable = formattable
+   include FORMATTABLE SCANNABLE
+   sharing type scannable = formattable
 end
 
 signature FORMATTABLE_and_SCANNABLE_FROM_FORMAT = sig
-   include FORMATTABLE
-   include SCANNABLE_FROM_FORMAT
-      where type scannable = formattable
-      where type scannable_format = formattable_format
+   include FORMATTABLE SCANNABLE_FROM_FORMAT
+   sharing type scannable = formattable
+   sharing type scannable_format = formattable_format
 end

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/monad.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/monad.sig	2007-03-12 03:07:55 UTC (rev 5421)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/monad.sig	2007-03-12 13:26:37 UTC (rev 5422)
@@ -42,8 +42,8 @@
 end
 
 signature MONAD = sig
-   include MONAD_CORE
-   include MONAD_EX where type 'a monad_ex = 'a monad
+   include MONAD_CORE MONAD_EX
+   sharing type monad_ex = monad
 end
 
 (** == Monad Plus == *)
@@ -60,9 +60,8 @@
 end
 
 signature MONADP = sig
-   include MONADP_CORE
-   include MONAD_EX where type 'a monad_ex = 'a monad
-   include MONADP_EX where type 'a monadp_ex = 'a monad
+   include MONADP_CORE MONAD_EX MONADP_EX
+   sharing type monad = monad_ex = monadp_ex
 end
 
 (** == State Monads == *)
@@ -76,11 +75,11 @@
 end 
  
 signature MONAD_STATE = sig
-  include MONAD
-  include MONAD_WS where type 'a monad_ws = 'a monad
+  include MONAD MONAD_WS
+  sharing type monad = monad_ws
 end 
 
 signature MONADP_STATE = sig
-  include MONADP
-  include MONAD_WS where type 'a monad_ws = 'a monad
+  include MONADP MONAD_WS
+  sharing type monad = monad_ws
 end 

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/ordered.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/ordered.sig	2007-03-12 03:07:55 UTC (rev 5421)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/ordered.sig	2007-03-12 13:26:37 UTC (rev 5422)
@@ -44,7 +44,6 @@
 end
 
 signature ORDERED = sig
-   include ORDERED_CORE
-   include EQUALITY where type equality = ordered
-   include ORDERED_EX where type ordered_ex = ordered
+   include ORDERED_CORE EQUALITY ORDERED_EX
+   sharing type ordered = equality = ordered_ex
 end

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/stringable.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/stringable.sig	2007-03-12 03:07:55 UTC (rev 5421)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/stringable.sig	2007-03-12 13:26:37 UTC (rev 5422)
@@ -42,6 +42,6 @@
 end
 
 signature STRINGABLE = sig
-   include STRINGABLE_CORE
-   include STRINGABLE_EX where type stringable_ex = stringable
+   include STRINGABLE_CORE STRINGABLE_EX
+   sharing type stringable = stringable_ex
 end




More information about the MLton-commit mailing list