You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(56) |
Sep
(40) |
Oct
(30) |
Nov
(144) |
Dec
(23) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(41) |
Feb
(29) |
Mar
(31) |
Apr
(39) |
May
(193) |
Jun
(45) |
Jul
(19) |
Aug
(3) |
Sep
(23) |
Oct
(83) |
Nov
(92) |
Dec
(123) |
| 2007 |
Jan
(90) |
Feb
(267) |
Mar
(120) |
Apr
(51) |
May
(40) |
Jun
(121) |
Jul
(109) |
Aug
(173) |
Sep
(77) |
Oct
(52) |
Nov
(121) |
Dec
(62) |
| 2008 |
Jan
(76) |
Feb
(53) |
Mar
(98) |
Apr
(87) |
May
(26) |
Jun
(27) |
Jul
(23) |
Aug
(136) |
Sep
(79) |
Oct
(68) |
Nov
(29) |
Dec
(14) |
| 2009 |
Jan
(7) |
Feb
(2) |
Mar
(11) |
Apr
(75) |
May
(1) |
Jun
(95) |
Jul
(19) |
Aug
(4) |
Sep
(8) |
Oct
(93) |
Nov
(43) |
Dec
(21) |
| 2010 |
Jan
(20) |
Feb
(23) |
Mar
(18) |
Apr
(6) |
May
(20) |
Jun
(23) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
(2) |
Feb
(6) |
Mar
(15) |
Apr
(5) |
May
(9) |
Jun
(14) |
Jul
(9) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
(2) |
Jun
(17) |
Jul
(37) |
Aug
|
Sep
(1) |
Oct
(6) |
Nov
|
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
(5) |
Apr
(2) |
May
(7) |
Jun
(11) |
Jul
(8) |
Aug
|
Sep
(1) |
Oct
(2) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
|
May
(1) |
Jun
(1) |
Jul
(7) |
Aug
(2) |
Sep
|
Oct
(5) |
Nov
(2) |
Dec
(4) |
| 2015 |
Jan
|
Feb
(2) |
Mar
(2) |
Apr
|
May
|
Jun
(9) |
Jul
(1) |
Aug
|
Sep
|
Oct
(4) |
Nov
(1) |
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
(1) |
Feb
(3) |
Mar
(3) |
Apr
(7) |
May
(2) |
Jun
(2) |
Jul
(5) |
Aug
(1) |
Sep
(2) |
Oct
(17) |
Nov
(4) |
Dec
(7) |
| 2018 |
Jan
(5) |
Feb
(14) |
Mar
(2) |
Apr
(5) |
May
(2) |
Jun
(5) |
Jul
|
Aug
(2) |
Sep
|
Oct
(3) |
Nov
(5) |
Dec
|
| 2019 |
Jan
(4) |
Feb
(2) |
Mar
(3) |
Apr
(1) |
May
(8) |
Jun
(14) |
Jul
(2) |
Aug
|
Sep
(2) |
Oct
(2) |
Nov
(15) |
Dec
(2) |
| 2020 |
Jan
(10) |
Feb
(3) |
Mar
(1) |
Apr
|
May
(9) |
Jun
(4) |
Jul
(16) |
Aug
(10) |
Sep
(4) |
Oct
(3) |
Nov
|
Dec
|
| 2021 |
Jan
(11) |
Feb
(2) |
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(5) |
Sep
|
Oct
(6) |
Nov
(4) |
Dec
(4) |
| 2022 |
Jan
(4) |
Feb
(2) |
Mar
(2) |
Apr
|
May
(6) |
Jun
(3) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2023 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(5) |
Jun
(1) |
Jul
(4) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
(13) |
Dec
|
| 2024 |
Jan
(1) |
Feb
|
Mar
(5) |
Apr
|
May
(10) |
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
(1) |
Dec
(14) |
| 2025 |
Jan
(3) |
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
(3) |
Jul
|
Aug
|
Sep
(2) |
Oct
(3) |
Nov
|
Dec
|
|
From: Vesa K. <ve...@ml...> - 2006-10-24 10:03:34
|
An almost working port to SML/NJ.
SML/NJ (v110.59) has the wrong spec for fromDecimal in the REAL signature.
So, an attempt to compile with SML/NJ currently gives:
public/export.sml:33.40-34.38 Error: value type in structure doesn't match signature spec
name: embDecimal
spec: (real,?.IEEEReal.decimal_approx) emb
actual: (real -> ?.IEEEReal.decimal_approx)
* (?.IEEEReal.decimal_approx -> real)
public/export.sml:36.40-37.28 Error: value type in structure doesn't match signature spec
name: embDecimal
spec: (real,?.IEEEReal.decimal_approx) emb
actual: (real -> ?.IEEEReal.decimal_approx)
* (?.IEEEReal.decimal_approx -> real)
----------------------------------------------------------------------
A mltonlib/trunk/com/ssh/extended-basis/unstable/basis.cm
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/basis-minus-extensions.cm
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/funs.cm
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/ints.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/mono-arrays.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/mono-vectors.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/reals.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/texts.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/unsealed.cm
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/words.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.cm
A mltonlib/trunk/com/ssh/extended-basis/unstable/public/export-smlnj.sml
----------------------------------------------------------------------
Added: mltonlib/trunk/com/ssh/extended-basis/unstable/basis.cm
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/basis.cm 2006-10-24 16:31:55 UTC (rev 4762)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/basis.cm 2006-10-24 17:03:24 UTC (rev 4763)
@@ -0,0 +1,12 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+library
+ library(detail/smlnj/basis-minus-extensions.cm)
+ library(extensions.cm)
+is
+ extensions.cm
+ detail/smlnj/basis-minus-extensions.cm
Added: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/basis-minus-extensions.cm
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/basis-minus-extensions.cm 2006-10-24 16:31:55 UTC (rev 4762)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/basis-minus-extensions.cm 2006-10-24 17:03:24 UTC (rev 4763)
@@ -0,0 +1,10 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+library
+ library($/basis.cm) - library(../../extensions.cm)
+is
+ $/basis.cm
Added: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/funs.cm
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/funs.cm 2006-10-24 16:31:55 UTC (rev 4762)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/funs.cm 2006-10-24 17:03:24 UTC (rev 4763)
@@ -0,0 +1,15 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+group is
+ $/basis.cm
+ ../mk-int-inf-ext.fun
+ ../mk-integer-ext.fun
+ ../mk-mono-array-ext.fun
+ ../mk-mono-vector-ext.fun
+ ../mk-real-ext.fun
+ ../mk-text-ext.fun
+ ../mk-word-ext.fun
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/ints.sml (from rev 4759, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/ints.sml)
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/ints.sml 2006-10-23 23:41:06 UTC (rev 4759)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/ints.sml 2006-10-24 17:03:24 UTC (rev 4763)
@@ -0,0 +1,19 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** == Extended {INTEGER} and {INT_INF} modules for SML/NJ == *)
+
+structure Int = MkIntegerExt (Int)
+structure FixedInt = MkIntegerExt (FixedInt)
+structure LargeInt = MkIntegerExt (LargeInt)
+structure Position = MkIntegerExt (Position)
+
+structure Int31 = MkIntegerExt (Int31)
+structure Int32 = MkIntegerExt (Int32)
+
+structure Int64 = MkIntegerExt (Int64)
+
+structure IntInf = MkIntInfExt (IntInf)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/mono-arrays.sml (from rev 4759, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/mono-arrays.sml)
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/mono-arrays.sml 2006-10-23 23:41:06 UTC (rev 4759)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/mono-arrays.sml 2006-10-24 17:03:24 UTC (rev 4763)
@@ -0,0 +1,18 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** == Extended {MONO_ARRAY} modules for SML/NJ == *)
+
+structure RealArray =
+ MkMonoArrayExt (structure MonoArray = RealArray
+ structure MonoVector = RealVector)
+structure Real64Array =
+ MkMonoArrayExt (structure MonoArray = Real64Array
+ structure MonoVector = Real64Vector)
+
+structure Word8Array =
+ MkMonoArrayExt (structure MonoArray = Word8Array
+ structure MonoVector = Word8Vector)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/mono-vectors.sml (from rev 4759, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/mono-vectors.sml)
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/mono-vectors.sml 2006-10-23 23:41:06 UTC (rev 4759)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/mono-vectors.sml 2006-10-24 17:03:24 UTC (rev 4763)
@@ -0,0 +1,12 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** == Extended {MONO_VECTOR} modules for SML/NJ == *)
+
+structure RealVector = MkMonoVectorExt (RealVector)
+structure Real64Vector = MkMonoVectorExt (Real64Vector)
+
+structure Word8Vector = MkMonoVectorExt (Word8Vector)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/reals.sml (from rev 4759, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/reals.sml)
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/reals.sml 2006-10-23 23:41:06 UTC (rev 4759)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/reals.sml 2006-10-24 17:03:24 UTC (rev 4763)
@@ -0,0 +1,13 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** == Extended {REAL} modules for SML/NJ == *)
+
+structure Real = MkRealExt (Real)
+
+structure LargeReal = MkRealExt (LargeReal)
+
+structure Real64 = MkRealExt (Real64)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/texts.sml (from rev 4759, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/texts.sml)
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/texts.sml 2006-10-23 23:41:06 UTC (rev 4759)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/texts.sml 2006-10-24 17:03:24 UTC (rev 4763)
@@ -0,0 +1,13 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** == Extended {TEXT} modules for SML/NJ == *)
+
+structure Text = MkTextExt (Text)
+structure Char = Text.Char
+structure CharArray = Text.CharArray
+structure CharVector = Text.CharVector
+structure String = Text.String
Added: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/unsealed.cm
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/unsealed.cm 2006-10-24 16:31:55 UTC (rev 4762)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/unsealed.cm 2006-10-24 17:03:24 UTC (rev 4763)
@@ -0,0 +1,32 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+group is
+ $/basis.cm
+ ../array.sml
+ ../emb.sml
+ ../iso.sml
+ ../smlnj/ints.sml
+ ../smlnj/mono-arrays.sml
+ ../smlnj/mono-vectors.sml
+ ../smlnj/reals.sml
+ ../smlnj/texts.sml
+ ../smlnj/words.sml
+ ../vector.sml
+ funs.cm
+ ../../public/array.sig
+ ../../public/char.sig
+ ../../public/emb.sig
+ ../../public/int-inf.sig
+ ../../public/integer.sig
+ ../../public/iso.sig
+ ../../public/mono-array.sig
+ ../../public/mono-vector.sig
+ ../../public/real.sig
+ ../../public/string.sig
+ ../../public/text.sig
+ ../../public/vector.sig
+ ../../public/word.sig
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/words.sml (from rev 4759, mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/words.sml)
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/words.sml 2006-10-23 23:41:06 UTC (rev 4759)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/words.sml 2006-10-24 17:03:24 UTC (rev 4763)
@@ -0,0 +1,18 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** == Extended {WORD} modules for SML/NJ == *)
+
+structure Word = MkWordExt (Word)
+structure LargeWord = MkWordExt (LargeWord)
+structure SysWord = MkWordExt (SysWord)
+
+structure Word8 = MkWordExt (Word8)
+
+structure Word31 = MkWordExt (Word31)
+structure Word32 = MkWordExt (Word32)
+
+structure Word64 = MkWordExt (Word64)
Added: mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.cm
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.cm 2006-10-24 16:31:55 UTC (rev 4762)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.cm 2006-10-24 17:03:24 UTC (rev 4763)
@@ -0,0 +1,13 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+library
+ source(public/export-smlnj.sml)
+ source(public/export.sml)
+is
+ detail/smlnj/unsealed.cm
+ public/export-smlnj.sml
+ public/export.sml
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/public/export-smlnj.sml (from rev 4759, mltonlib/trunk/com/ssh/extended-basis/unstable/public/export-mlton.sml)
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/export-mlton.sml 2006-10-23 23:41:06 UTC (rev 4759)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/export-smlnj.sml 2006-10-24 17:03:24 UTC (rev 4763)
@@ -0,0 +1,22 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** == SML/NJ specific extensions == *)
+
+structure FixedInt : INTEGER = FixedInt
+structure Int31 : INTEGER = Int31
+structure Int32 : INTEGER = Int32
+structure Int64 : INTEGER = Int64
+structure IntInf : INT_INF = IntInf
+structure Real64 : REAL = Real64
+structure Real64Array : MONO_ARRAY = Real64Array
+structure Real64Vector : MONO_VECTOR = Real64Vector
+structure RealArray : MONO_ARRAY = RealArray
+structure RealVector : MONO_VECTOR = RealVector
+structure SysWord : WORD = SysWord
+structure Word31 : WORD = Word31
+structure Word32 : WORD = Word32
+structure Word64 : WORD = Word64
|
|
From: Vesa K. <ve...@ml...> - 2006-10-24 09:32:15
|
SML/NJ only provides the deprecated fromLargeWord, toLargeWord, and
toLargeWordX values.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-word-ext.fun
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-word-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-word-ext.fun 2006-10-24 15:59:43 UTC (rev 4761)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-word-ext.fun 2006-10-24 16:31:55 UTC (rev 4762)
@@ -10,17 +10,17 @@
functor MkWordExt (W : WORD) = struct
open W
val bounds as (minWord, maxWord) = (fromInt 0, fromInt~1)
- val fromWord = fromLarge o Word.toLarge
- val fromWordX = fromLarge o Word.toLargeX
- val toWord = Word.fromLarge o toLarge
- val toWordX = Word.fromLarge o toLargeX
+ val fromWord = fromLargeWord o Word.toLargeWord
+ val fromWordX = fromLargeWord o Word.toLargeWordX
+ val toWord = Word.fromLargeWord o toLargeWord
+ val toWordX = Word.fromLargeWord o toLargeWordX
val embString = (toString, fromString)
val isoInt = (toInt, fromInt)
val isoIntX = (toIntX, fromInt)
- val isoLarge = (toLarge, fromLarge)
+ val isoLarge = (toLargeWord, fromLargeWord)
val isoLargeInt = (toLargeInt, fromLargeInt)
val isoLargeIntX = (toLargeIntX, fromLargeInt)
- val isoLargeX = (toLargeX, fromLarge)
+ val isoLargeX = (toLargeWordX, fromLargeWord)
val isoWord = (toWord, fromWord)
val isoWordX = (toWordX, fromWordX)
fun isZero w = fromInt 0 = w
|
|
From: Vesa K. <ve...@ml...> - 2006-10-24 08:59:50
|
SML/NJ doesn't like top-level non-module bindings.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/array.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/char.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/export.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/int-inf.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/integer.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-array.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-vector.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/real.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/string.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/vector.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/word.sig
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/array.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/array.sig 2006-10-24 15:27:43 UTC (rev 4760)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/array.sig 2006-10-24 15:59:43 UTC (rev 4761)
@@ -36,14 +36,14 @@
(** == Isomorphisms == *)
- val isoList : ('a array, 'a list) iso
+ val isoList : ('a array, 'a list) Iso.iso
(**
* An isomorphism between arrays and lists. It is always equivalent to
* {(toList, fromList)}. Note that the isomorphism does not preserve
* identity.
*)
- val isoVector : ('a array, 'a vector) iso
+ val isoVector : ('a array, 'a vector) Iso.iso
(**
* An isomorphism between arrays and vectors. It is always equivalent
* to {(toVector, fromVector)}. Note that the isomorphism does not
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/char.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/char.sig 2006-10-24 15:27:43 UTC (rev 4760)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/char.sig 2006-10-24 15:59:43 UTC (rev 4761)
@@ -31,7 +31,7 @@
(** == Isomorphisms == *)
- val isoInt : (char, Int.int) iso
+ val isoInt : (char, Int.int) Iso.iso
(**
* An isomorphism between characters and character codes. It always
* equals {(ord, chr)}. Note that the projection part of the
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/export.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/export.sml 2006-10-24 15:27:43 UTC (rev 4760)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/export.sml 2006-10-24 15:59:43 UTC (rev 4761)
@@ -6,8 +6,8 @@
(** == Implementation independent extensions == *)
-type ('a, 'b) emb = ('a, 'b) emb
-type ('a, 'b) iso = ('a, 'b) iso
+type ('a, 'b) emb = ('a, 'b) Emb.emb
+type ('a, 'b) iso = ('a, 'b) Iso.iso
signature ARRAY = ARRAY
signature CHAR = CHAR
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/int-inf.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/int-inf.sig 2006-10-24 15:27:43 UTC (rev 4760)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/int-inf.sig 2006-10-24 15:59:43 UTC (rev 4761)
@@ -22,7 +22,7 @@
(** == Embeddings == *)
- val embString : (int, string) emb
+ val embString : (int, string) Emb.emb
(**
* An embedding of integers into strings. It is always equivalent to
* {(toString, fromString)}.
@@ -30,14 +30,14 @@
(** == Isomorphisms == *)
- val isoInt : (int, Int.int) iso
+ val isoInt : (int, Int.int) Iso.iso
(**
* An isomorphism between integers of type {int} and the default
* integer type. It is always equivalent to {(toInt, fromInt)}. Note
* that one of the injection and projection parts may be partial.
*)
- val isoLarge : (int, LargeInt.int) iso
+ val isoLarge : (int, LargeInt.int) Iso.iso
(**
* An isomorphism between integers of type {int} and integers of type
* {LargeInt.int}. It is always equivalent to {(toLarge, fromLarge)}.
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/integer.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/integer.sig 2006-10-24 15:27:43 UTC (rev 4760)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/integer.sig 2006-10-24 15:59:43 UTC (rev 4761)
@@ -22,7 +22,7 @@
(** == Embeddings == *)
- val embString : (int, string) emb
+ val embString : (int, string) Emb.emb
(**
* An embedding of integers into strings. It is always equivalent to
* {(toString, fromString)}.
@@ -30,14 +30,14 @@
(** == Isomorphisms == *)
- val isoInt : (int, Int.int) iso
+ val isoInt : (int, Int.int) Iso.iso
(**
* An isomorphism between integers of type {int} and the default
* integer type. It is always equivalent to {(toInt, fromInt)}. Note
* that one of the injection and projection parts may be partial.
*)
- val isoLarge : (int, LargeInt.int) iso
+ val isoLarge : (int, LargeInt.int) Iso.iso
(**
* An isomorphism between integers of type {int} and integers of type
* {LargeInt.int}. It is always equivalent to {(toLarge, fromLarge)}.
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-array.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-array.sig 2006-10-24 15:27:43 UTC (rev 4760)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-array.sig 2006-10-24 15:59:43 UTC (rev 4761)
@@ -57,21 +57,21 @@
(** == Isomorphisms == *)
- val isoList : (array, elem list) iso
+ val isoList : (array, elem list) Iso.iso
(**
* An isomorphism between arrays and lists. It is always equivalent to
* {(toList, fromList)}. Note that the isomorphism does not preserve
* identity.
*)
- val isoPoly : (array, elem Array.array) iso
+ val isoPoly : (array, elem Array.array) Iso.iso
(**
* An isomorphism between monomorphic and polymorphic arrays. It is
* always equivalent to {(toPoly, fromPoly)}. Note that the
* isomorphism does not preserve identity.
*)
- val isoVector : (array, vector) iso
+ val isoVector : (array, vector) Iso.iso
(**
* An isomorphism between arrays and vectors. It is always equivalent
* to {(toVector, fromVector)}. Note that the isomorphism does not
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-vector.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-vector.sig 2006-10-24 15:27:43 UTC (rev 4760)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-vector.sig 2006-10-24 15:59:43 UTC (rev 4761)
@@ -36,13 +36,13 @@
(** == Isomorphisms == *)
- val isoList : (vector, elem list) iso
+ val isoList : (vector, elem list) Iso.iso
(**
* An isomorphism between vectors and lists. It is always equivalent
* to {(toList, fromList)}.
*)
- val isoPoly : (vector, elem Vector.vector) iso
+ val isoPoly : (vector, elem Vector.vector) Iso.iso
(**
* An isomorphism between monomorphic and polymorphic vectors. It is
* always equivalent to {(toPoly, fromPoly)}.
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/real.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/real.sig 2006-10-24 15:27:43 UTC (rev 4760)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/real.sig 2006-10-24 15:59:43 UTC (rev 4761)
@@ -12,13 +12,13 @@
(** == Embeddings == *)
- val embDecimal : (real, IEEEReal.decimal_approx) emb
+ val embDecimal : (real, IEEEReal.decimal_approx) Emb.emb
(**
* An embedding of reals into decimal approximations. It is always
* equivalent to {(toDecimal, fromDecimal)}.
*)
- val embString : (real, string) emb
+ val embString : (real, string) Emb.emb
(**
* An embedding of reals into strings. It is always equivalent to
* {(toString, fromString)}.
@@ -26,7 +26,7 @@
(** == Isomorphisms == *)
- val isoInt : IEEEReal.rounding_mode -> (real, Int.int) iso
+ val isoInt : IEEEReal.rounding_mode -> (real, Int.int) Iso.iso
(**
* Returns an isomorphism between integers of type {Int.int} and reals
* given a rounding mode. Specifically, the result of {isoInt mode} is
@@ -34,7 +34,7 @@
* an isomorphism in the mathematical sense.
*)
- val isoLarge : IEEEReal.rounding_mode -> (real, LargeReal.real) iso
+ val isoLarge : IEEEReal.rounding_mode -> (real, LargeReal.real) Iso.iso
(**
* Returns an isomorphism between reals of type {LargeReal.real} and
* reals of type {real} given a rounding mode. Specifically, the
@@ -43,7 +43,7 @@
* mathematical sense.
*)
- val isoLargeInt : IEEEReal.rounding_mode -> (real, LargeInt.int) iso
+ val isoLargeInt : IEEEReal.rounding_mode -> (real, LargeInt.int) Iso.iso
(**
* Returns an isomorphism between integers of type {LargeInt.int} and
* reals given a rounding mode. Specifically, the result of
@@ -52,7 +52,7 @@
* mathematical sense.
*)
- val isoManExp : (real, {man : real, exp : int}) iso
+ val isoManExp : (real, {man : real, exp : int}) Iso.iso
(**
* An isomorphism between reals and their representation as a mantissa
* and an exponent. It is always equivalent to {(toManExp,
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/string.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/string.sig 2006-10-24 15:27:43 UTC (rev 4760)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/string.sig 2006-10-24 15:59:43 UTC (rev 4761)
@@ -12,13 +12,13 @@
(** == Embeddings == *)
- val embCString : (string, string) emb
+ val embCString : (string, string) Emb.emb
(**
* An embedding of strings into C-style string literals. It is always
* equivalent to {(toCString, fromCString)}.
*)
- val embString : (string, string) emb
+ val embString : (string, string) Emb.emb
(**
* An embedding of strings into SML-style string literals. It is
* always equivalent to {(toString, fromString)}.
@@ -26,7 +26,7 @@
(** == Isomorphisms == *)
- val isoList : (string, char list) iso
+ val isoList : (string, char list) Iso.iso
(**
* An isomorphism between strings and lists. It is always equivalent
* to {(toList, fromList)}.
@@ -49,7 +49,7 @@
val foldri : (int * elem * 'a -> 'a) -> 'a -> vector -> 'a
val fromList : elem list -> vector
val fromPoly : elem Vector.vector -> vector
- val isoPoly : (vector, elem Vector.vector) iso
+ val isoPoly : (vector, elem Vector.vector) Iso.iso
val length : vector -> int
val mapi : (int * elem -> elem) -> vector -> vector
val maxLen : int
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/vector.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/vector.sig 2006-10-24 15:27:43 UTC (rev 4760)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/vector.sig 2006-10-24 15:59:43 UTC (rev 4761)
@@ -20,7 +20,7 @@
(** == Isomorphisms == *)
- val isoList : ('a vector, 'a list) iso
+ val isoList : ('a vector, 'a list) Iso.iso
(**
* An isomorphism between vectors and lists. It is always equivalent
* to {(toList, fromList)}.
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/word.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/word.sig 2006-10-24 15:27:43 UTC (rev 4760)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/word.sig 2006-10-24 15:59:43 UTC (rev 4761)
@@ -67,7 +67,7 @@
(** == Embeddings == *)
- val embString : (word, string) emb
+ val embString : (word, string) Emb.emb
(**
* An embedding of words into strings. It is always equivalent to
* {(toString, fromString)}.
@@ -75,49 +75,49 @@
(** == Isomorphisms == *)
- val isoInt : (word, Int.int) iso
+ val isoInt : (word, Int.int) Iso.iso
(**
* An isomorphism between words of type {word} and the default integer
* type. It is always equivalent to {(toInt, fromInt)}.
*)
- val isoIntX : (word, Int.int) iso
+ val isoIntX : (word, Int.int) Iso.iso
(**
* An isomorphism between words of type {word} and the default integer
* type. It is always equivalent to {(toIntX, fromInt)}.
*)
- val isoLarge : (word, LargeWord.word) iso
+ val isoLarge : (word, LargeWord.word) Iso.iso
(**
* An isomorphism between words of type {word} and the {LargeWord.word}
* type. It is always equivalent to {(toLarge, fromLarge)}.
*)
- val isoLargeInt : (word, LargeInt.int) iso
+ val isoLargeInt : (word, LargeInt.int) Iso.iso
(**
* An isomorphism between words of type {word} and the {LargeInt.int}
* type. It is always equivalent to {(toLargeInt, fromLargeInt)}.
*)
- val isoLargeIntX : (word, LargeInt.int) iso
+ val isoLargeIntX : (word, LargeInt.int) Iso.iso
(**
* An isomorphism between words of type {word} and the {LargeInt.int}
* type. It is always equivalent to {(toLargeIntX, fromLargeInt)}.
*)
- val isoLargeX : (word, LargeWord.word) iso
+ val isoLargeX : (word, LargeWord.word) Iso.iso
(**
* An isomorphism between words of type {word} and the {LargeWord.word}
* type. It is always equivalent to {(toLargeX, fromLarge)}.
*)
- val isoWord : (word, Word.word) iso
+ val isoWord : (word, Word.word) Iso.iso
(**
* An isomorphism between words of type {word} and the default word
* type. It is always equivalent to {(toWord, fromWord)}.
*)
- val isoWordX : (word, Word.word) iso
+ val isoWordX : (word, Word.word) Iso.iso
(**
* An isomorphism between words of type {word} and the default word
* type. It is always equivalent to {(toWordX, fromWordX)}.
|
|
From: Matthew F. <fl...@ml...> - 2006-10-24 08:27:48
|
No need to chdir to $HOME, the default for cd. Rather, chdir back to $dir. ---------------------------------------------------------------------- U mlton/trunk/bin/make-pdf-guide ---------------------------------------------------------------------- Modified: mlton/trunk/bin/make-pdf-guide =================================================================== --- mlton/trunk/bin/make-pdf-guide 2006-10-23 23:41:06 UTC (rev 4759) +++ mlton/trunk/bin/make-pdf-guide 2006-10-24 15:27:43 UTC (rev 4760) @@ -132,6 +132,6 @@ mv $pdf $src/doc/guide -cd +cd $dir rm -rf $tmp |
|
From: Stephen W. <sw...@ml...> - 2006-10-23 16:41:08
|
Fixed bug in removeFromStackForProfiling. The bug would only show up
with DEBUG_PROFILE true. getSourceName was used on a master index,
which is of course beyond the array of sources. This (correctly)
triggered the assert in getSourceName.
Added a new function, profileIndexSourceName, that tests whether the
index is a source index or a master index, and does the right thing in
each case.
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c 2006-10-23 18:12:01 UTC (rev 4758)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c 2006-10-23 23:41:06 UTC (rev 4759)
@@ -9,7 +9,11 @@
GC_profileMasterIndex sourceIndexToProfileMasterIndex (GC_state s,
GC_sourceIndex i)
{
- return s->sourceMaps.sources[i].sourceNameIndex + s->sourceMaps.sourcesLength;
+ GC_profileMasterIndex pmi;
+ pmi = s->sourceMaps.sources[i].sourceNameIndex + s->sourceMaps.sourcesLength;
+ if (DEBUG_PROFILE)
+ fprintf (stderr, "%"PRIu32" = sourceIndexToProfileMasterIndex ("FMTSI")\n", pmi, i);
+ return pmi;
}
GC_sourceNameIndex profileMasterIndexToSourceNameIndex (GC_state s,
@@ -18,12 +22,21 @@
return i - s->sourceMaps.sourcesLength;
}
+char* profileIndexSourceName (GC_state s, GC_sourceIndex i) {
+ char* res;
+
+ if (i < s->sourceMaps.sourcesLength)
+ res = getSourceName (s, i);
+ else
+ res = s->sourceMaps.sourceNames[profileMasterIndexToSourceNameIndex (s, i)];
+ return res;
+}
+
GC_profileStack getProfileStackInfo (GC_state s, GC_profileMasterIndex i) {
assert (s->profiling.data != NULL);
return &(s->profiling.data->stack[i]);
}
-
static int profileDepth = 0;
static void profileIndent (void) {
@@ -33,7 +46,6 @@
fprintf (stderr, " ");
}
-
void addToStackForProfiling (GC_state s, GC_profileMasterIndex i) {
GC_profileData p;
GC_profileStack ps;
@@ -103,7 +115,7 @@
ps = getProfileStackInfo (s, i);
if (DEBUG_PROFILE)
fprintf (stderr, "removing %s from stack ticksInc = %"PRIuMAX" ticksGCInc = %"PRIuMAX"\n",
- getSourceName (s, i),
+ profileIndexSourceName (s, i),
p->total - ps->lastTotal,
p->totalGC - ps->lastTotalGC);
ps->ticks += p->total - ps->lastTotal;
@@ -129,7 +141,7 @@
uint32_t *sourceSeq;
if (DEBUG_PROFILE)
- fprintf (stderr, "profileLeave ("FMTSSI")\n", sourceSeqIndex);
+ fprintf (stderr, "leaveForProfiling ("FMTSSI")\n", sourceSeqIndex);
assert (s->profiling.stack);
assert (sourceSeqIndex < s->sourceMaps.sourceSeqsLength);
p = s->profiling.data;
@@ -457,11 +469,8 @@
profileMasterIndex++) {
if (p->stack[profileMasterIndex].numOccurrences > 0) {
if (DEBUG_PROFILE)
- fprintf (stderr, "done leaving %s\n",
- (profileMasterIndex < s->sourceMaps.sourcesLength)
- ? getSourceName (s, (GC_sourceIndex)profileMasterIndex)
- : s->sourceMaps.sourceNames[
- profileMasterIndexToSourceNameIndex (s, profileMasterIndex)]);
+ fprintf (stderr, "done leaving %s\n",
+ profileIndexSourceName (s, profileMasterIndex));
removeFromStackForProfiling (s, profileMasterIndex);
}
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h 2006-10-23 18:12:01 UTC (rev 4758)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h 2006-10-23 23:41:06 UTC (rev 4759)
@@ -96,6 +96,8 @@
static inline void incForProfiling (GC_state s, size_t amount, GC_sourceSeqIndex sourceSeqIndex);
+static inline char* profileIndexSourceName (GC_state s, GC_sourceIndex i);
+
static void writeProfileCount (GC_state s, FILE *f, GC_profileData p, GC_profileMasterIndex i);
GC_profileData profileMalloc (GC_state s);
|
|
From: Vesa K. <ve...@ml...> - 2006-10-23 11:12:16
|
Fixed typo.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/readme.txt
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/readme.txt
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/readme.txt 2006-10-23 17:46:32 UTC (rev 4757)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/readme.txt 2006-10-23 18:12:01 UTC (rev 4758)
@@ -27,7 +27,7 @@
public/
This directory contains the documented signature definitions (*.sig)
- and listings of all all top-level bindings exported by this library
+ and listings of all top-level bindings exported by this library
(export*.sml). The contents of this directory should be sufficient
to understand the extensions provided by this library.
|
|
From: Stephen W. <sw...@ml...> - 2006-10-23 10:47:06
|
Improved error message.
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/mlprof/main.sml
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/mlprof/main.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/mlprof/main.sml 2006-10-23 14:13:16 UTC (rev 4756)
+++ mlton/branches/on-20050822-x86_64-branch/mlprof/main.sml 2006-10-23 17:46:32 UTC (rev 4757)
@@ -108,10 +108,14 @@
master)]
fun new {afile: File.t}: t =
- if not (File.doesExist afile)
- then Error.bug "does not exist"
- else if not (File.canRun afile)
- then Error.bug "can not run"
+ let
+ fun userBug m =
+ Error.bug (concat ["Error: executable '", afile, "' ", m, "."])
+ in
+ if not (File.doesExist afile) then
+ userBug "does not exist"
+ else if not (File.canRun afile) then
+ userBug "does not run"
else
Process.callWithIn
(OS.Path.mkAbsolute {path = afile,
@@ -141,9 +145,8 @@
source = source}
end)
val _ =
- if 0 = Vector.length master
- then
- Error.bug "doesn't appear to be compiled for profiling"
+ if 0 = Vector.length master then
+ userBug "is not compiled for profiling"
else ()
val sources =
vector
@@ -191,6 +194,7 @@
name = afile,
split = split}
end)
+ end
end
structure Kind =
@@ -1022,10 +1026,7 @@
| Result.Yes (afile :: files) =>
let
val mlmonFiles = files @ !mlmonFiles
- val aInfo =
- AFile.new {afile = afile}
- handle e => die (concat ["Error in ", afile, ": ",
- Exn.toString e])
+ val aInfo = AFile.new {afile = afile}
val _ =
if debug
then
@@ -1041,8 +1042,8 @@
handle e =>
let
val msg =
- concat ["error in ", mlmonfile, ": ",
- Exn.toString e]
+ concat ["Error loading mlmon file '", mlmonfile,
+ "': ", Exn.toString e]
in
if !tolerant
then
|
|
From: Vesa K. <ve...@ml...> - 2006-10-23 07:13:21
|
Documentation.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/word.sig
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/word.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/word.sig 2006-10-23 12:05:40 UTC (rev 4755)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/word.sig 2006-10-23 14:13:16 UTC (rev 4756)
@@ -13,36 +13,132 @@
(** == Bounds == *)
val maxWord : word
+ (**
+ * The maximal representable {word}. This is always equal to {fromInt
+ * ~1}.
+ *)
+
val minWord : word
+ (**
+ * The minimal representable {word}. This is always {0w0}.
+ *)
val bounds : word * word
+ (**
+ * Pair of the minimal and maximal representable {word}s. This is
+ * always equal to {(minWord, maxWord)}.
+ *)
(** == Conversions == *)
val fromWord : Word.word -> word
+ (**
+ * Converts the given word {w : Word.word} to the value {w(mod
+ * (2^wordSize))} of type {word}. This has the effect of taking the
+ * low-order {wordSize} bits of the 2's complement representation of
+ * {w}.
+ *)
+
val fromWordX : Word.word -> word
+ (**
+ * Converts the given word {w : Word.word} to a value of type {word}.
+ * {w} is ``sign-extended,'' i.e., the {min (Word.wordSize, wordSize)}
+ * low-order bits of {w} and {fromWordX w} are the same, and the
+ * remaining bits of {fromWordX w} are all equal to the most
+ * significant bit of {w}.
+ *)
val toWord : word -> Word.word
+ (**
+ * Converts the given word {w : word} to the value {w(mod
+ * (2^Word.wordSize))} of type {Word.word}. This has the effect of
+ * taking the low-order {Word.wordSize} bits of the 2's complement
+ * representation of {w}.
+ *)
+
val toWordX : word -> Word.word
+ (**
+ * Converts the given word {w : word} to a value of type {Word.word}.
+ * {w} is ``sign-extended,'' i.e., the {min (Word.wordSize, wordSize)}
+ * low-order bits of {w} and {toWordX w} are the same, and the
+ * remaining bits of {toWordX w} are all equal to the most significant
+ * bit of {w}.
+ *)
(** == Embeddings == *)
val embString : (word, string) emb
+ (**
+ * An embedding of words into strings. It is always equivalent to
+ * {(toString, fromString)}.
+ *)
(** == Isomorphisms == *)
val isoInt : (word, Int.int) iso
+ (**
+ * An isomorphism between words of type {word} and the default integer
+ * type. It is always equivalent to {(toInt, fromInt)}.
+ *)
+
val isoIntX : (word, Int.int) iso
+ (**
+ * An isomorphism between words of type {word} and the default integer
+ * type. It is always equivalent to {(toIntX, fromInt)}.
+ *)
+
val isoLarge : (word, LargeWord.word) iso
+ (**
+ * An isomorphism between words of type {word} and the {LargeWord.word}
+ * type. It is always equivalent to {(toLarge, fromLarge)}.
+ *)
+
val isoLargeInt : (word, LargeInt.int) iso
+ (**
+ * An isomorphism between words of type {word} and the {LargeInt.int}
+ * type. It is always equivalent to {(toLargeInt, fromLargeInt)}.
+ *)
+
val isoLargeIntX : (word, LargeInt.int) iso
+ (**
+ * An isomorphism between words of type {word} and the {LargeInt.int}
+ * type. It is always equivalent to {(toLargeIntX, fromLargeInt)}.
+ *)
+
val isoLargeX : (word, LargeWord.word) iso
+ (**
+ * An isomorphism between words of type {word} and the {LargeWord.word}
+ * type. It is always equivalent to {(toLargeX, fromLarge)}.
+ *)
+
val isoWord : (word, Word.word) iso
+ (**
+ * An isomorphism between words of type {word} and the default word
+ * type. It is always equivalent to {(toWord, fromWord)}.
+ *)
+
val isoWordX : (word, Word.word) iso
+ (**
+ * An isomorphism between words of type {word} and the default word
+ * type. It is always equivalent to {(toWordX, fromWordX)}.
+ *)
(** == Predicates == *)
val isEven : word -> bool
+ (**
+ * Returns true if the given word is of the form {0w2*n} for some
+ * word {n}.
+ *)
+
val isOdd : word -> bool
+ (**
+ * Returns true if the given word is of the form {0w2*n+0w1} for some
+ * word {n}.
+ *)
+
val isZero : word -> bool
+ (**
+ * Returns true if the given word is {0w0}.
+ *)
end
|
|
From: Vesa K. <ve...@ml...> - 2006-10-23 05:06:01
|
Documentation.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/readme.txt
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/readme.txt
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/readme.txt 2006-10-23 11:03:03 UTC (rev 4754)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/readme.txt 2006-10-23 12:05:40 UTC (rev 4755)
@@ -12,6 +12,15 @@
functions such as isZero, isEven and isOdd.
+Info
+----
+
+ License: MLton-LICENSE
+ Portability: portable
+ Stability: experimental
+ Maintainer: Vesa Karvonen <ves...@cs...>
+
+
About Library Organization
--------------------------
@@ -44,7 +53,7 @@
This directory contains the implementation details of the library.
- detail/<compiler>/
+ detail/<COMPILER>/
These directories (e.g. detail/mlton/) contain compiler specific
implementation details. Different compilers implement different
@@ -86,6 +95,28 @@
*the* basis library for it, should go into other libraries.
+Contributions
+-------------
+
+ The signatures and structures defined by this library are not meant to
+ be cast in stone! We welcome contributions including new extensions,
+ bugfixes, and ports to new compilers. The recommended submit method
+ for small contributions to this library is to send a message with a
+ brief description of the proposed contribution as well as a patch
+ containing full code and documentation (signature comments) to either
+ the MLton-user list
+
+ mlt...@ml...
+
+ or the MLton list
+
+ ml...@ml... .
+
+ For larger extensions or changes we recommend that you first contact
+ the active maintainer(s) of this library. The preferred contact method
+ is through the above mailing lists.
+
+
References
----------
|
|
From: Vesa K. <ve...@ml...> - 2006-10-23 04:03:06
|
Documentation.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/real.sig
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/real.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/real.sig 2006-10-23 10:45:49 UTC (rev 4753)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/real.sig 2006-10-23 11:03:03 UTC (rev 4754)
@@ -13,12 +13,49 @@
(** == Embeddings == *)
val embDecimal : (real, IEEEReal.decimal_approx) emb
+ (**
+ * An embedding of reals into decimal approximations. It is always
+ * equivalent to {(toDecimal, fromDecimal)}.
+ *)
+
val embString : (real, string) emb
+ (**
+ * An embedding of reals into strings. It is always equivalent to
+ * {(toString, fromString)}.
+ *)
(** == Isomorphisms == *)
val isoInt : IEEEReal.rounding_mode -> (real, Int.int) iso
+ (**
+ * Returns an isomorphism between integers of type {Int.int} and reals
+ * given a rounding mode. Specifically, the result of {isoInt mode} is
+ * equivalent to {(toInt mode, fromInt)}. Note that the result isn't
+ * an isomorphism in the mathematical sense.
+ *)
+
val isoLarge : IEEEReal.rounding_mode -> (real, LargeReal.real) iso
+ (**
+ * Returns an isomorphism between reals of type {LargeReal.real} and
+ * reals of type {real} given a rounding mode. Specifically, the
+ * result of {isoLarge mode} is equivalent to {(toLarge, fromLarge
+ * mode)}. Note that the result isn't an isomorphism in the
+ * mathematical sense.
+ *)
+
val isoLargeInt : IEEEReal.rounding_mode -> (real, LargeInt.int) iso
+ (**
+ * Returns an isomorphism between integers of type {LargeInt.int} and
+ * reals given a rounding mode. Specifically, the result of
+ * {isoLargeInt mode} is equivalent to {(toLargeInt mode,
+ * fromLargeInt)}. Note that the result isn't an isomorphism in the
+ * mathematical sense.
+ *)
+
val isoManExp : (real, {man : real, exp : int}) iso
+ (**
+ * An isomorphism between reals and their representation as a mantissa
+ * and an exponent. It is always equivalent to {(toManExp,
+ * fromManExp)}.
+ *)
end
|
|
From: Vesa K. <ve...@ml...> - 2006-10-23 03:45:58
|
Parameterized isomorphisms by the rounding mode.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-real-ext.fun
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/real.sig
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-real-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-real-ext.fun 2006-10-23 10:29:46 UTC (rev 4752)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-real-ext.fun 2006-10-23 10:45:49 UTC (rev 4753)
@@ -7,13 +7,12 @@
(**
* Functor for extending {REAL} modules.
*)
-
functor MkRealExt (R : REAL) = struct
open R
val embDecimal = (toDecimal, fromDecimal)
val embString = (toString, fromString)
- val isoInt = (toInt IEEEReal.TO_NEAREST, fromInt)
- val isoLarge = (toLarge, fromLarge IEEEReal.TO_NEAREST)
- val isoLargeInt = (toLargeInt IEEEReal.TO_NEAREST, fromLargeInt)
+ fun isoInt mode = (toInt mode, fromInt)
+ fun isoLarge mode = (toLarge, fromLarge mode)
+ fun isoLargeInt mode = (toLargeInt mode, fromLargeInt)
val isoManExp = (toManExp, fromManExp)
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/real.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/real.sig 2006-10-23 10:29:46 UTC (rev 4752)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/real.sig 2006-10-23 10:45:49 UTC (rev 4753)
@@ -17,8 +17,8 @@
(** == Isomorphisms == *)
- val isoInt : (real, Int.int) iso
- val isoLarge : (real, LargeReal.real) iso
- val isoLargeInt : (real, LargeInt.int) iso
+ val isoInt : IEEEReal.rounding_mode -> (real, Int.int) iso
+ val isoLarge : IEEEReal.rounding_mode -> (real, LargeReal.real) iso
+ val isoLargeInt : IEEEReal.rounding_mode -> (real, LargeInt.int) iso
val isoManExp : (real, {man : real, exp : int}) iso
end
|
|
From: Vesa K. <ve...@ml...> - 2006-10-23 03:29:50
|
Added WordX (or sign-extended) conversions.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-word-ext.fun
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/word.sig
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-word-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-word-ext.fun 2006-10-23 09:26:44 UTC (rev 4751)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-word-ext.fun 2006-10-23 10:29:46 UTC (rev 4752)
@@ -9,8 +9,11 @@
*)
functor MkWordExt (W : WORD) = struct
open W
+ val bounds as (minWord, maxWord) = (fromInt 0, fromInt~1)
+ val fromWord = fromLarge o Word.toLarge
+ val fromWordX = fromLarge o Word.toLargeX
val toWord = Word.fromLarge o toLarge
- val fromWord = fromLarge o Word.toLarge
+ val toWordX = Word.fromLarge o toLargeX
val embString = (toString, fromString)
val isoInt = (toInt, fromInt)
val isoIntX = (toIntX, fromInt)
@@ -19,8 +22,8 @@
val isoLargeIntX = (toLargeIntX, fromLargeInt)
val isoLargeX = (toLargeX, fromLarge)
val isoWord = (toWord, fromWord)
+ val isoWordX = (toWordX, fromWordX)
fun isZero w = fromInt 0 = w
fun isEven w = isZero (andb (fromInt 1, w))
val isOdd = not o isEven
- val bounds as (minWord, maxWord) = (fromInt 0, fromInt~1)
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/word.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/word.sig 2006-10-23 09:26:44 UTC (rev 4751)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/word.sig 2006-10-23 10:29:46 UTC (rev 4752)
@@ -20,7 +20,10 @@
(** == Conversions == *)
val fromWord : Word.word -> word
+ val fromWordX : Word.word -> word
+
val toWord : word -> Word.word
+ val toWordX : word -> Word.word
(** == Embeddings == *)
@@ -35,6 +38,7 @@
val isoLargeIntX : (word, LargeInt.int) iso
val isoLargeX : (word, LargeWord.word) iso
val isoWord : (word, Word.word) iso
+ val isoWordX : (word, Word.word) iso
(** == Predicates == *)
|
|
From: Vesa K. <ve...@ml...> - 2006-10-23 02:27:06
|
Documentation.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/basis.mlb
U mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb
U mltonlib/trunk/com/ssh/extended-basis/unstable/readme.txt
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/basis.mlb
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/basis.mlb 2006-10-22 23:42:41 UTC (rev 4750)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/basis.mlb 2006-10-23 09:26:44 UTC (rev 4751)
@@ -4,5 +4,11 @@
* See the file MLton-LICENSE for details.
*)
+(*
+ * This basis file defines the extended basis library including all of the
+ * original basis library. The idea is that users refer to this instead
+ * of the original basis library.
+ *)
+
$(SML_LIB)/basis/basis.mlb
extensions.mlb
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb 2006-10-22 23:42:41 UTC (rev 4750)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb 2006-10-23 09:26:44 UTC (rev 4751)
@@ -4,6 +4,17 @@
* See the file MLton-LICENSE for details.
*)
+(*
+ * This basis file defines only the extensions provided by this library.
+ * Users may refer to this basis file, but this is probably more
+ * interesting to maintainers. You can, for example, run the command
+ *
+ * mlton -stop tc -show-basis extensions.basis extensions.mlb
+ *
+ * and inspect the generated file (extensions.basis) to get a precise and
+ * accurate picture of the extensions provided by this library.
+ *)
+
local
$(SML_LIB)/basis/basis.mlb
in
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/readme.txt
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/readme.txt 2006-10-22 23:42:41 UTC (rev 4750)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/readme.txt 2006-10-23 09:26:44 UTC (rev 4751)
@@ -11,6 +11,49 @@
fromX)), bounds (pairs of the form (minX, maxX)), and simple utility
functions such as isZero, isEven and isOdd.
+
+About Library Organization
+--------------------------
+
+ public/
+
+ This directory contains the documented signature definitions (*.sig)
+ and listings of all all top-level bindings exported by this library
+ (export*.sml). The contents of this directory should be sufficient
+ to understand the extensions provided by this library.
+
+ basis.mlb
+
+ This basis file defines the extended basis library including all of
+ the original basis library. The idea is that users refer to this
+ instead of the original basis library.
+
+ extensions.mlb
+
+ This basis file defines only the extensions provided by this
+ library. Users may refer to this basis file, but this is probably
+ more interesting to maintainers. You can, for example, run the
+ command
+
+ mlton -stop tc -show-basis extensions.basis extensions.mlb
+
+ and inspect the generated file (extensions.basis) to get a precise
+ and accurate picture of the extensions provided by this library.
+
+ detail/
+
+ This directory contains the implementation details of the library.
+
+ detail/<compiler>/
+
+ These directories (e.g. detail/mlton/) contain compiler specific
+ implementation details. Different compilers implement different
+ subsets of the original basis library.
+
+
+About Motivation and Scope
+--------------------------
+
The basis library, while certainly not perfect, is a valuable library
and it doesn't make sense to throw it away. There is a book describing
the basis library and people just learning SML are likely to spend time
|
|
From: Vesa K. <ve...@ml...> - 2006-10-22 16:42:50
|
Major restructuring with the intent to improve readability. The basic
idea is that the public directory contains everything that users need to
know about.
----------------------------------------------------------------------
D mltonlib/trunk/com/ssh/extended-basis/unstable/array.sig
D mltonlib/trunk/com/ssh/extended-basis/unstable/array.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/emb.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/iso.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-int-inf-ext.fun
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-integer-ext.fun
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-ext.fun
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-vector-ext.fun
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-real-ext.fun
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-text-ext.fun
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-word-ext.fun
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/ints.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/mono-arrays.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/mono-vectors.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/reals.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/texts.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/words.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/vector.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sig
D mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb
D mltonlib/trunk/com/ssh/extended-basis/unstable/int-inf.sig
D mltonlib/trunk/com/ssh/extended-basis/unstable/integer.sig
D mltonlib/trunk/com/ssh/extended-basis/unstable/ints-mlton.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sig
D mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/mk-int-inf-ext.fun
D mltonlib/trunk/com/ssh/extended-basis/unstable/mk-integer-ext.fun
D mltonlib/trunk/com/ssh/extended-basis/unstable/mk-mono-array-ext.fun
D mltonlib/trunk/com/ssh/extended-basis/unstable/mk-mono-vector-ext.fun
D mltonlib/trunk/com/ssh/extended-basis/unstable/mk-real-ext.fun
D mltonlib/trunk/com/ssh/extended-basis/unstable/mk-text-ext.fun
D mltonlib/trunk/com/ssh/extended-basis/unstable/mk-word-ext.fun
D mltonlib/trunk/com/ssh/extended-basis/unstable/mono-array.sig
D mltonlib/trunk/com/ssh/extended-basis/unstable/mono-arrays-mlton.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vector.sig
D mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vectors-mlton.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/public/
A mltonlib/trunk/com/ssh/extended-basis/unstable/public/array.sig
A mltonlib/trunk/com/ssh/extended-basis/unstable/public/char.sig
A mltonlib/trunk/com/ssh/extended-basis/unstable/public/emb.sig
A mltonlib/trunk/com/ssh/extended-basis/unstable/public/export-mlton.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/public/export.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/public/int-inf.sig
A mltonlib/trunk/com/ssh/extended-basis/unstable/public/integer.sig
A mltonlib/trunk/com/ssh/extended-basis/unstable/public/iso.sig
A mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-array.sig
A mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-vector.sig
A mltonlib/trunk/com/ssh/extended-basis/unstable/public/real.sig
A mltonlib/trunk/com/ssh/extended-basis/unstable/public/string.sig
A mltonlib/trunk/com/ssh/extended-basis/unstable/public/text.sig
A mltonlib/trunk/com/ssh/extended-basis/unstable/public/vector.sig
A mltonlib/trunk/com/ssh/extended-basis/unstable/public/word.sig
D mltonlib/trunk/com/ssh/extended-basis/unstable/real.sig
D mltonlib/trunk/com/ssh/extended-basis/unstable/reals-mlton.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/string.sig
D mltonlib/trunk/com/ssh/extended-basis/unstable/text.sig
D mltonlib/trunk/com/ssh/extended-basis/unstable/texts-mlton.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sig
D mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sml
D mltonlib/trunk/com/ssh/extended-basis/unstable/word.sig
D mltonlib/trunk/com/ssh/extended-basis/unstable/words-mlton.sml
----------------------------------------------------------------------
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/array.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/array.sig 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/array.sig 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,52 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(**
- * Extended {ARRAY} signature.
- *)
-signature ARRAY = sig
- include ARRAY
-
- (** == Conversions == *)
-
- val fromVector : 'a vector -> 'a array
- (**
- * Creates a new array from the given vector. Specifically, the
- * expression {fromVector v} is equivalent to the expression
- *
- *> tabulate (Vector.length v, fn i => Vector.sub (v, i))
- *)
-
- val toList : 'a array -> 'a list
- (**
- * Generates a list from the given array. Specifically, the result of
- * {toList a} is equivalent to {foldr op :: [] a}.
- *)
-
- val toVector : 'a array -> 'a vector
- (**
- * Generates a vector from the given array. Specifically, the result
- * of {toVector a} is equivalent to
- *
- *> Vector.tabulate (length a, fn i => sub (a, i))
- *)
-
- (** == Isomorphisms == *)
-
- val isoList : ('a array, 'a list) iso
- (**
- * An isomorphism between arrays and lists. It is always equivalent to
- * {(toList, fromList)}. Note that the isomorphism does not preserve
- * identity.
- *)
-
- val isoVector : ('a array, 'a vector) iso
- (**
- * An isomorphism between arrays and vectors. It is always equivalent
- * to {(toVector, fromVector)}. Note that the isomorphism does not
- * preserve identity.
- *)
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/array.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/array.sml 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/array.sml 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,17 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(**
- * Extended {Array :> ARRAY} structure.
- *)
-structure Array : ARRAY = struct
- open Array
- fun toList a = foldr op :: [] a
- val isoList = (toList, fromList)
- val toVector = vector
- fun fromVector v = tabulate (Vector.length v, fn i => Vector.sub (v, i))
- val isoVector = (toVector, fromVector)
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,40 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(**
- * Extended {CHAR} signature.
- *)
-signature CHAR = sig
- include CHAR
-
- (** == Bounds == *)
-
- val minOrd : Int.int
- (**
- * The least character code. It always equals {0}.
- *)
-
- val boundsChar : char * char
- (**
- * Pair of the least and greatest characters. It always equals
- * {(minChar, maxChar)}.
- *)
-
- val boundsOrd : Int.int * Int.int
- (**
- * Pair of the least and greatest character codes. It always equals
- * {(minOrd, maxOrd)}.
- *)
-
- (** == Isomorphisms == *)
-
- val isoInt : (char, Int.int) iso
- (**
- * An isomorphism between characters and character codes. It always
- * equals {(ord, chr)}. Note that the projection part of the
- * isomorphism, namely {chr}, is likely to be a partial function.
- *)
-end
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array.sml (from rev 4741, mltonlib/trunk/com/ssh/extended-basis/unstable/array.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/emb.sml (from rev 4741, mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/iso.sml (from rev 4741, mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-int-inf-ext.fun (from rev 4741, mltonlib/trunk/com/ssh/extended-basis/unstable/mk-int-inf-ext.fun)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-integer-ext.fun (from rev 4741, mltonlib/trunk/com/ssh/extended-basis/unstable/mk-integer-ext.fun)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-ext.fun (from rev 4741, mltonlib/trunk/com/ssh/extended-basis/unstable/mk-mono-array-ext.fun)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-vector-ext.fun (from rev 4741, mltonlib/trunk/com/ssh/extended-basis/unstable/mk-mono-vector-ext.fun)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-real-ext.fun (from rev 4741, mltonlib/trunk/com/ssh/extended-basis/unstable/mk-real-ext.fun)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-text-ext.fun (from rev 4741, mltonlib/trunk/com/ssh/extended-basis/unstable/mk-text-ext.fun)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-word-ext.fun (from rev 4741, mltonlib/trunk/com/ssh/extended-basis/unstable/mk-word-ext.fun)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/ints.sml (from rev 4741, mltonlib/trunk/com/ssh/extended-basis/unstable/ints-mlton.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/mono-arrays.sml (from rev 4741, mltonlib/trunk/com/ssh/extended-basis/unstable/mono-arrays-mlton.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/mono-vectors.sml (from rev 4741, mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vectors-mlton.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/reals.sml (from rev 4741, mltonlib/trunk/com/ssh/extended-basis/unstable/reals-mlton.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/texts.sml (from rev 4741, mltonlib/trunk/com/ssh/extended-basis/unstable/texts-mlton.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/words.sml (from rev 4741, mltonlib/trunk/com/ssh/extended-basis/unstable/words-mlton.sml)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/vector.sml (from rev 4741, mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sml)
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sig 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sig 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,33 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-type ('a, 'b) emb = ('a -> 'b) * ('b -> 'a option)
-(**
- * Embedding of {'a} into {'b} with injection and projection functions.
- *)
-
-(**
- * Signature for the {Emb} structure for embeddings.
- *)
-signature EMB = sig
- type ('a, 'b) emb = ('a, 'b) emb
-
- val id : ('a, 'a) emb
- (**
- * The identity embedding. This is always equivalent to {(fn a => a,
- * SOME)}.
- *)
-
- val to : ('a, 'b) emb -> 'a -> 'b
- (**
- * Extracts the injection part of the given embedding.
- *)
-
- val from : ('a, 'b) emb -> 'b -> 'a option
- (**
- * Extracts the projection part of the given embedding.
- *)
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sml 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sml 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,17 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(**
- * Structure for embeddings.
- *)
-structure Emb :> EMB = struct
- type ('a, 'b) emb = ('a, 'b) emb
-
- val id = (fn a => a, SOME)
-
- fun to (a2b, _) = a2b
- fun from (_, b2a) = b2a
-end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb 2006-10-22 23:42:41 UTC (rev 4750)
@@ -4,84 +4,89 @@
* See the file MLton-LICENSE for details.
*)
-ann
- "forceUsed"
- "sequenceNonUnit warn"
- "warnUnused true"
+local
+ $(SML_LIB)/basis/basis.mlb
in
- local
- $(SML_LIB)/basis/basis.mlb
+ ann
+ "forceUsed"
+ "sequenceNonUnit warn"
+ "warnUnused true"
in
- (* New {Iso :> ISO} and {Emb :> EMB} modules *)
- iso.sig
- iso.sml
- emb.sig
- emb.sml
-
- (* Extended integer modules *)
local
- mk-integer-ext.fun
- mk-int-inf-ext.fun
- in
- int-inf.sig
- integer.sig
- ints-mlton.sml
- end
+ (* New {Iso :> ISO} and {Emb :> EMB} modules *)
+ public/emb.sig
+ detail/emb.sml
+ public/iso.sig
+ detail/iso.sml
- (* Extended real modules *)
- local
- mk-real-ext.fun
- in
- real.sig
- reals-mlton.sml
- end
+ (* Extended integer modules *)
+ local
+ detail/mk-integer-ext.fun
+ detail/mk-int-inf-ext.fun
+ in
+ public/int-inf.sig
+ public/integer.sig
+ detail/mlton/ints.sml
+ end
- (* Extended word modules *)
- local
- mk-word-ext.fun
- in
- word.sig
- words-mlton.sml
- end
+ (* Extended real modules *)
+ local
+ detail/mk-real-ext.fun
+ in
+ public/real.sig
+ detail/mlton/reals.sml
+ end
- (* Extended vector module *)
- vector.sig
- vector.sml
+ (* Extended word modules *)
+ local
+ detail/mk-word-ext.fun
+ in
+ public/word.sig
+ detail/mlton/words.sml
+ end
- (* Extended array module
- * (may depend on vector module)
- *)
- array.sig
- array.sml
+ (* Extended vector module *)
+ public/vector.sig
+ detail/vector.sml
- (* Extended mono vector modules *)
- local
- mk-mono-vector-ext.fun
- in
- mono-vector.sig
- mono-vectors-mlton.sml
+ (* Extended array module
+ * (may depend on vector module)
+ *)
+ public/array.sig
+ detail/array.sml
- (* Extended mono array modules
- * (may depend on mono vector modules)
- *)
+ (* Extended mono vector modules *)
local
- mk-mono-array-ext.fun
+ detail/mk-mono-vector-ext.fun
in
- mono-array.sig
- mono-arrays-mlton.sml
+ public/mono-vector.sig
+ detail/mlton/mono-vectors.sml
- (* Extended text modules
- * (may depend on mono vector and mono array modules)
+ (* Extended mono array modules
+ * (may depend on mono vector modules)
*)
local
- mk-text-ext.fun
+ detail/mk-mono-array-ext.fun
in
- char.sig
- string.sig
- text.sig
- texts-mlton.sml
+ public/mono-array.sig
+ detail/mlton/mono-arrays.sml
+
+ (* Extended text modules
+ * (may depend on mono vector and mono array modules)
+ *)
+ local
+ detail/mk-text-ext.fun
+ in
+ public/char.sig
+ public/string.sig
+ public/text.sig
+ detail/mlton/texts.sml
+ end
end
end
+ in
+ public/export.sml
+ public/export-mlton.sml
end
end
end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/int-inf.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/int-inf.sig 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/int-inf.sig 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,65 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(**
- * Extended {INT_INF} signature.
- *)
-signature INT_INF = sig
- include INT_INF
-
- (** == Bounds == *)
-
- val bounds : (int * int) option
- (**
- * Pair of the minimal and maximal integers, respectively,
- * representable by {int}. If {minInt = NONE} and {maxInt = NONE},
- * this is also {NONE}. Otherwise this is {SOME (valOf minInt, valOf
- * maxInt)}.
- *)
-
- (** == Embeddings == *)
-
- val embString : (int, string) emb
- (**
- * An embedding of integers into strings. It is always equivalent to
- * {(toString, fromString)}.
- *)
-
- (** == Isomorphisms == *)
-
- val isoInt : (int, Int.int) iso
- (**
- * An isomorphism between integers of type {int} and the default
- * integer type. It is always equivalent to {(toInt, fromInt)}. Note
- * that one of the injection and projection parts may be partial.
- *)
-
- val isoLarge : (int, LargeInt.int) iso
- (**
- * An isomorphism between integers of type {int} and integers of type
- * {LargeInt.int}. It is always equivalent to {(toLarge, fromLarge)}.
- * Note that the projection part may be partial.
- *)
-
- (** == Predicates == *)
-
- val isEven : int -> bool
- (**
- * Returns true if the given integer is of the form {2*n} for some
- * integer {n}.
- *)
-
- val isOdd : int -> bool
- (**
- * Returns true if the given integer is of the form {2*n+1} for some
- * integer {n}.
- *)
-
- val isZero : int -> bool
- (**
- * Returns true if the given integer is {0}.
- *)
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/integer.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/integer.sig 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/integer.sig 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,65 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(**
- * Extended {INTEGER} signature.
- *)
-signature INTEGER = sig
- include INTEGER
-
- (** == Bounds == *)
-
- val bounds : (int * int) option
- (**
- * Pair of the minimal and maximal integers, respectively,
- * representable by {int}. If {minInt = NONE} and {maxInt = NONE},
- * this is also {NONE}. Otherwise this is {SOME (valOf minInt, valOf
- * maxInt)}.
- *)
-
- (** == Embeddings == *)
-
- val embString : (int, string) emb
- (**
- * An embedding of integers into strings. It is always equivalent to
- * {(toString, fromString)}.
- *)
-
- (** == Isomorphisms == *)
-
- val isoInt : (int, Int.int) iso
- (**
- * An isomorphism between integers of type {int} and the default
- * integer type. It is always equivalent to {(toInt, fromInt)}. Note
- * that one of the injection and projection parts may be partial.
- *)
-
- val isoLarge : (int, LargeInt.int) iso
- (**
- * An isomorphism between integers of type {int} and integers of type
- * {LargeInt.int}. It is always equivalent to {(toLarge, fromLarge)}.
- * Note that the projection part may be partial.
- *)
-
- (** == Predicates == *)
-
- val isEven : int -> bool
- (**
- * Returns true if the given integer is of the form {2*n} for some
- * integer {n}.
- *)
-
- val isOdd : int -> bool
- (**
- * Returns true if the given integer is of the form {2*n+1} for some
- * integer {n}.
- *)
-
- val isZero : int -> bool
- (**
- * Returns true if the given integer is {0}.
- *)
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/ints-mlton.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/ints-mlton.sml 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/ints-mlton.sml 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,49 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(** == Extended {INTEGER} and {INT_INF} modules for MLton == *)
-
-structure Int : INTEGER = MkIntegerExt (Int)
-structure FixedInt : INTEGER = MkIntegerExt (FixedInt)
-structure LargeInt : INTEGER = MkIntegerExt (LargeInt)
-structure Position : INTEGER = MkIntegerExt (Position)
-
-structure Int1 : INTEGER = MkIntegerExt (Int1)
-structure Int2 : INTEGER = MkIntegerExt (Int2)
-structure Int3 : INTEGER = MkIntegerExt (Int3)
-structure Int4 : INTEGER = MkIntegerExt (Int4)
-structure Int5 : INTEGER = MkIntegerExt (Int5)
-structure Int6 : INTEGER = MkIntegerExt (Int6)
-structure Int7 : INTEGER = MkIntegerExt (Int7)
-structure Int8 : INTEGER = MkIntegerExt (Int8)
-structure Int9 : INTEGER = MkIntegerExt (Int9)
-structure Int10 : INTEGER = MkIntegerExt (Int10)
-structure Int11 : INTEGER = MkIntegerExt (Int11)
-structure Int12 : INTEGER = MkIntegerExt (Int12)
-structure Int13 : INTEGER = MkIntegerExt (Int13)
-structure Int14 : INTEGER = MkIntegerExt (Int14)
-structure Int15 : INTEGER = MkIntegerExt (Int15)
-structure Int16 : INTEGER = MkIntegerExt (Int16)
-structure Int17 : INTEGER = MkIntegerExt (Int17)
-structure Int18 : INTEGER = MkIntegerExt (Int18)
-structure Int19 : INTEGER = MkIntegerExt (Int19)
-structure Int20 : INTEGER = MkIntegerExt (Int20)
-structure Int21 : INTEGER = MkIntegerExt (Int21)
-structure Int22 : INTEGER = MkIntegerExt (Int22)
-structure Int23 : INTEGER = MkIntegerExt (Int23)
-structure Int24 : INTEGER = MkIntegerExt (Int24)
-structure Int25 : INTEGER = MkIntegerExt (Int25)
-structure Int26 : INTEGER = MkIntegerExt (Int26)
-structure Int27 : INTEGER = MkIntegerExt (Int27)
-structure Int28 : INTEGER = MkIntegerExt (Int28)
-structure Int29 : INTEGER = MkIntegerExt (Int29)
-structure Int30 : INTEGER = MkIntegerExt (Int30)
-structure Int31 : INTEGER = MkIntegerExt (Int31)
-structure Int32 : INTEGER = MkIntegerExt (Int32)
-
-structure Int64 : INTEGER = MkIntegerExt (Int64)
-
-structure IntInf : INT_INF = MkIntInfExt (IntInf)
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sig 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sig 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,34 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-type ('a, 'b) iso = ('a -> 'b) * ('b -> 'a)
-(**
- * Isomorphism between {'a} and {'b} with injection and projection
- * functions.
- *)
-
-(**
- * Signature for the {Iso} structure for isomorphisms.
- *)
-signature ISO = sig
- type ('a, 'b) iso = ('a, 'b) iso
-
- val id : ('a, 'a) iso
- (**
- * The identity isomorphism. This is always equivalent to {(fn a => a,
- * fn a => a)}.
- *)
-
- val to : ('a, 'b) iso -> 'a -> 'b
- (**
- * Extracts the injection part of the given isomorphism.
- *)
-
- val from : ('a, 'b) iso -> 'b -> 'a
- (**
- * Extracts the projection part of the given isomorphism.
- *)
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sml 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sml 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,17 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(**
- * Structure for isomorphisms.
- *)
-structure Iso :> ISO = struct
- type ('a, 'b) iso = ('a, 'b) iso
-
- val id = (fn a => a, fn a => a)
-
- fun to (a2b, _) = a2b
- fun from (_, b2a) = b2a
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/mk-int-inf-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mk-int-inf-ext.fun 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mk-int-inf-ext.fun 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,16 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(**
- * Functor for extending {INT_INF} modules.
- *)
-functor MkIntInfExt (I : INT_INF) = struct
- local
- structure E = MkIntegerExt (I)
- in
- open E I
- end
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/mk-integer-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mk-integer-ext.fun 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mk-integer-ext.fun 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,22 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(**
- * Functor for extending {INTEGER} modules.
- *)
-functor MkIntegerExt (I : INTEGER) = struct
- open I
- val embString = (toString, fromString)
- val isoInt = (toInt, fromInt)
- val isoLarge = (toLarge, fromLarge)
- fun isZero i = fromInt 0 = i
- fun isEven i = isZero (rem (i, fromInt 2))
- val isOdd = not o isEven
- val bounds = case (minInt, maxInt) of
- (NONE, NONE) => NONE
- | (SOME min, SOME max) => SOME (min, max)
- | _ => raise Fail "impossible"
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/mk-mono-array-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mk-mono-array-ext.fun 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mk-mono-array-ext.fun 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,25 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(**
- * Functor for extending {MONO_ARRAY} modules.
- *)
-functor MkMonoArrayExt (structure MonoVector : MONO_VECTOR
- structure MonoArray : MONO_ARRAY
- where type elem = MonoVector.elem
- where type vector = MonoVector.vector) = struct
- open MonoArray
- fun toList a = foldr op :: [] a
- val isoList = (toList, fromList)
- val toVector = vector
- fun fromVector v =
- tabulate (MonoVector.length v, fn i => MonoVector.sub (v, i))
- val isoVector = (toVector, fromVector)
- fun toPoly a = Array.tabulate (length a, fn i => sub (a, i))
- fun fromPoly a = tabulate (Array.length a, fn i => Array.sub (a, i))
- val isoPoly = (toPoly, fromPoly)
-end
-
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/mk-mono-vector-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mk-mono-vector-ext.fun 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mk-mono-vector-ext.fun 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,18 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(**
- * Functor for extending {MONO_VECTOR} modules.
- *)
-functor MkMonoVectorExt (M : MONO_VECTOR) = struct
- open M
- fun toList v = foldr op :: [] v
- val isoList = (toList, fromList)
- (* XXX It would be nice to avoid copying in toPoly and fromPoly *)
- fun toPoly v = Vector.tabulate (length v, fn i => sub (v, i))
- fun fromPoly v = tabulate (Vector.length v, fn i => Vector.sub (v, i))
- val isoPoly = (toPoly, fromPoly)
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/mk-real-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mk-real-ext.fun 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mk-real-ext.fun 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,19 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(**
- * Functor for extending {REAL} modules.
- *)
-
-functor MkRealExt (R : REAL) = struct
- open R
- val embDecimal = (toDecimal, fromDecimal)
- val embString = (toString, fromString)
- val isoInt = (toInt IEEEReal.TO_NEAREST, fromInt)
- val isoLarge = (toLarge, fromLarge IEEEReal.TO_NEAREST)
- val isoLargeInt = (toLargeInt IEEEReal.TO_NEAREST, fromLargeInt)
- val isoManExp = (toManExp, fromManExp)
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/mk-text-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mk-text-ext.fun 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mk-text-ext.fun 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,32 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(**
- * Functor for extending {TEXT} modules.
- *)
-functor MkTextExt (T : TEXT) = struct
- open T
-
- structure Char = struct
- open Char
- val minOrd = 0
- val boundsChar = (minChar, maxChar)
- val boundsOrd = (minOrd, maxOrd)
- val isoInt = (ord, chr)
- end
-
- structure CharVector = MkMonoVectorExt (CharVector)
- structure CharArray =
- MkMonoArrayExt (structure MonoArray = CharArray
- structure MonoVector = CharVector)
-
- structure String = struct
- open CharVector String
- val embCString = (toCString, fromCString)
- val embString = (toString, fromString)
- val isoList = (explode, implode)
- end
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/mk-word-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mk-word-ext.fun 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mk-word-ext.fun 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,26 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(**
- * Functor for extending {WORD} modules.
- *)
-functor MkWordExt (W : WORD) = struct
- open W
- val toWord = Word.fromLarge o toLarge
- val fromWord = fromLarge o Word.toLarge
- val embString = (toString, fromString)
- val isoInt = (toInt, fromInt)
- val isoIntX = (toIntX, fromInt)
- val isoLarge = (toLarge, fromLarge)
- val isoLargeInt = (toLargeInt, fromLargeInt)
- val isoLargeIntX = (toLargeIntX, fromLargeInt)
- val isoLargeX = (toLargeX, fromLarge)
- val isoWord = (toWord, fromWord)
- fun isZero w = fromInt 0 = w
- fun isEven w = isZero (andb (fromInt 1, w))
- val isOdd = not o isEven
- val bounds as (minWord, maxWord) = (fromInt 0, fromInt~1)
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/mono-array.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mono-array.sig 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mono-array.sig 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,80 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(**
- * Extended {MONO_ARRAY} signature.
- *)
-signature MONO_ARRAY = sig
- include MONO_ARRAY
-
- (** == Conversions == *)
-
- val fromPoly : elem Array.array -> array
- (**
- * Creates a new monomorphic array from the given polymorphic array.
- * Specifically, the expression {fromPoly a} is equivalent to the
- * expression
- *
- *> tabulate (Array.length a, fn i => Array.sub (a, i))
- *)
-
- val fromVector : vector -> array
- (**
- * Creates a new array from the given vector. Specifically, the
- * expression {fromVector v} is equivalent to the expression
- *
- *> tabulate (Vector.length v, fn i => Vector.sub (v, i))
- *)
-
- val toList : array -> elem list
- (**
- * Generates a list from the given array. Specifically, the result of
- * {toList a} is equivalent to {foldr op :: [] a}.
- *)
-
- val toPoly : array -> elem Array.array
- (**
- * Creates a new polymorphic array from the given monomorphic array.
- * Specifically, the expression {toPoly a} is equivalent to the
- * expression
- *
- *> Array.tabulate (length a, fn i => Array.sub (a, i))
- *)
-
- val toVector : array -> vector
- (**
- * Generates a vector from the given array. Specifically, the result
- * of {toVector a} is equivalent to
- *
- *> MonoVector.tabulate (length a, fn i => sub (a, i))
- *
- * where {MonoVector} refers to the home structure of the monomorphic
- * {vector} type.
- *)
-
- (** == Isomorphisms == *)
-
- val isoList : (array, elem list) iso
- (**
- * An isomorphism between arrays and lists. It is always equivalent to
- * {(toList, fromList)}. Note that the isomorphism does not preserve
- * identity.
- *)
-
- val isoPoly : (array, elem Array.array) iso
- (**
- * An isomorphism between monomorphic and polymorphic arrays. It is
- * always equivalent to {(toPoly, fromPoly)}. Note that the
- * isomorphism does not preserve identity.
- *)
-
- val isoVector : (array, vector) iso
- (**
- * An isomorphism between arrays and vectors. It is always equivalent
- * to {(toVector, fromVector)}. Note that the isomorphism does not
- * preserve identity.
- *)
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/mono-arrays-mlton.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mono-arrays-mlton.sml 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mono-arrays-mlton.sml 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,62 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(** == Extended {MONO_ARRAY} modules for MLton == *)
-
-structure BoolArray : MONO_ARRAY =
- MkMonoArrayExt (structure MonoArray = BoolArray
- structure MonoVector = BoolVector)
-
-structure IntArray : MONO_ARRAY =
- MkMonoArrayExt (structure MonoArray = IntArray
- structure MonoVector = IntVector)
-structure LargeIntArray : MONO_ARRAY =
- MkMonoArrayExt (structure MonoArray = LargeIntArray
- structure MonoVector = LargeIntVector)
-structure Int8Array : MONO_ARRAY =
- MkMonoArrayExt (structure MonoArray = Int8Array
- structure MonoVector = Int8Vector)
-structure Int16Array : MONO_ARRAY =
- MkMonoArrayExt (structure MonoArray = Int16Array
- structure MonoVector = Int16Vector)
-structure Int32Array : MONO_ARRAY =
- MkMonoArrayExt (structure MonoArray = Int32Array
- structure MonoVector = Int32Vector)
-structure Int64Array : MONO_ARRAY =
- MkMonoArrayExt (structure MonoArray = Int64Array
- structure MonoVector = Int64Vector)
-
-structure RealArray : MONO_ARRAY =
- MkMonoArrayExt (structure MonoArray = RealArray
- structure MonoVector = RealVector)
-structure LargeRealArray : MONO_ARRAY =
- MkMonoArrayExt (structure MonoArray = LargeRealArray
- structure MonoVector = LargeRealVector)
-structure Real32Array : MONO_ARRAY =
- MkMonoArrayExt (structure MonoArray = Real32Array
- structure MonoVector = Real32Vector)
-structure Real64Array : MONO_ARRAY =
- MkMonoArrayExt (structure MonoArray = Real64Array
- structure MonoVector = Real64Vector)
-
-structure WordArray : MONO_ARRAY =
- MkMonoArrayExt (structure MonoArray = WordArray
- structure MonoVector = WordVector)
-structure LargeWordArray : MONO_ARRAY =
- MkMonoArrayExt (structure MonoArray = LargeWordArray
- structure MonoVector = LargeWordVector)
-structure Word8Array : MONO_ARRAY =
- MkMonoArrayExt (structure MonoArray = Word8Array
- structure MonoVector = Word8Vector)
-structure Word16Array : MONO_ARRAY =
- MkMonoArrayExt (structure MonoArray = Word16Array
- structure MonoVector = Word16Vector)
-structure Word32Array : MONO_ARRAY =
- MkMonoArrayExt (structure MonoArray = Word32Array
- structure MonoVector = Word32Vector)
-structure Word64Array : MONO_ARRAY =
- MkMonoArrayExt (structure MonoArray = Word64Array
- structure MonoVector = Word64Vector)
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vector.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vector.sig 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vector.sig 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,50 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(**
- * Extended {MONO_VECTOR} signature.
- *)
-signature MONO_VECTOR = sig
- include MONO_VECTOR
-
- (** == Conversions == *)
-
- val fromPoly : elem Vector.vector -> vector
- (**
- * Generates a monomorphic vector from the given polymorphic vector.
- * Specifically, the result of {fromPoly v} is equivalent to
- *
- *> tabulate (Vector.length v, fn i => Vector.sub (v, i))
- *)
-
- val toList : vector -> elem list
- (**
- * Generates a list from the given vector. Specifically, the result of
- * {toList v} is equivalent to {foldr op :: [] v}.
- *)
-
- val toPoly : vector -> elem Vector.vector
- (**
- * Generates a new polymorphic vector from the given monomorphic
- * vector. Specifically, the result of {toPoly v} is equivalent to
- *
- *> Vector.tabulate (length v, fn i => Vector.sub (v, i))
- *)
-
- (** == Isomorphisms == *)
-
- val isoList : (vector, elem list) iso
- (**
- * An isomorphism between vectors and lists. It is always equivalent
- * to {(toList, fromList)}.
- *)
-
- val isoPoly : (vector, elem Vector.vector) iso
- (**
- * An isomorphism between monomorphic and polymorphic vectors. It is
- * always equivalent to {(toPoly, fromPoly)}.
- *)
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vectors-mlton.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vectors-mlton.sml 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vectors-mlton.sml 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,28 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(** == Extended {MONO_VECTOR} modules for MLton == *)
-
-structure BoolVector : MONO_VECTOR = MkMonoVectorExt (BoolVector)
-
-structure IntVector : MONO_VECTOR = MkMonoVectorExt (IntVector)
-structure LargeIntVector : MONO_VECTOR = MkMonoVectorExt (LargeIntVector)
-structure Int8Vector : MONO_VECTOR = MkMonoVectorExt (Int8Vector)
-structure Int16Vector : MONO_VECTOR = MkMonoVectorExt (Int16Vector)
-structure Int32Vector : MONO_VECTOR = MkMonoVectorExt (Int32Vector)
-structure Int64Vector : MONO_VECTOR = MkMonoVectorExt (Int64Vector)
-
-structure RealVector : MONO_VECTOR = MkMonoVectorExt (RealVector)
-structure LargeRealVector : MONO_VECTOR = MkMonoVectorExt (LargeRealVector)
-structure Real32Vector : MONO_VECTOR = MkMonoVectorExt (Real32Vector)
-structure Real64Vector : MONO_VECTOR = MkMonoVectorExt (Real64Vector)
-
-structure WordVector : MONO_VECTOR = MkMonoVectorExt (WordVector)
-structure LargeWordVector : MONO_VECTOR = MkMonoVectorExt (LargeWordVector)
-structure Word8Vector : MONO_VECTOR = MkMonoVectorExt (Word8Vector)
-structure Word16Vector : MONO_VECTOR = MkMonoVectorExt (Word16Vector)
-structure Word32Vector : MONO_VECTOR = MkMonoVectorExt (Word32Vector)
-structure Word64Vector : MONO_VECTOR = MkMonoVectorExt (Word64Vector)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/public/array.sig (from rev 4741, mltonlib/trunk/com/ssh/extended-basis/unstable/array.sig)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/public/char.sig (from rev 4742, mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/public/emb.sig (from rev 4742, mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sig)
Added: mltonlib/trunk/com/ssh/extended-basis/unstable/public/export-mlton.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/export-mlton.sml 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/export-mlton.sml 2006-10-22 23:42:41 UTC (rev 4750)
@@ -0,0 +1,110 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** == MLton specific extensions == *)
+
+structure BoolArray : MONO_ARRAY = BoolArray
+structure BoolVector : MONO_VECTOR = BoolVector
+structure FixedInt : INTEGER = FixedInt
+structure Int1 : INTEGER = Int1
+structure Int10 : INTEGER = Int10
+structure Int11 : INTEGER = Int11
+structure Int12 : INTEGER = Int12
+structure Int13 : INTEGER = Int13
+structure Int14 : INTEGER = Int14
+structure Int15 : INTEGER = Int15
+structure Int16 : INTEGER = Int16
+structure Int16Array : MONO_ARRAY = Int16Array
+structure Int16Vector : MONO_VECTOR = Int16Vector
+structure Int17 : INTEGER = Int17
+structure Int18 : INTEGER = Int18
+structure Int19 : INTEGER = Int19
+structure Int2 : INTEGER = Int2
+structure Int20 : INTEGER = Int20
+structure Int21 : INTEGER = Int21
+structure Int22 : INTEGER = Int22
+structure Int23 : INTEGER = Int23
+structure Int24 : INTEGER = Int24
+structure Int25 : INTEGER = Int25
+structure Int26 : INTEGER = Int26
+structure Int27 : INTEGER = Int27
+structure Int28 : INTEGER = Int28
+structure Int29 : INTEGER = Int29
+structure Int3 : INTEGER = Int3
+structure Int30 : INTEGER = Int30
+structure Int31 : INTEGER = Int31
+structure Int32 : INTEGER = Int32
+structure Int32Array : MONO_ARRAY = Int32Array
+structure Int32Vector : MONO_VECTOR = Int32Vector
+structure Int4 : INTEGER = Int4
+structure Int5 : INTEGER = Int5
+structure Int6 : INTEGER = Int6
+structure Int64 : INTEGER = Int64
+structure Int64Array : MONO_ARRAY = Int64Array
+structure Int64Vector : MONO_VECTOR = Int64Vector
+structure Int7 : INTEGER = Int7
+structure Int8 : INTEGER = Int8
+structure Int8Array : MONO_ARRAY = Int8Array
+structure Int8Vector : MONO_VECTOR = Int8Vector
+structure Int9 : INTEGER = Int9
+structure IntArray : MONO_ARRAY = IntArray
+structure IntInf : INT_INF = IntInf
+structure IntVector : MONO_VECTOR = IntVector
+structure LargeIntArray : MONO_ARRAY = LargeIntArray
+structure LargeIntVector : MONO_VECTOR = LargeIntVector
+structure LargeRealArray : MONO_ARRAY = LargeRealArray
+structure LargeRealVector : MONO_VECTOR = LargeRealVector
+structure LargeWordArray : MONO_ARRAY = LargeWordArray
+structure LargeWordVector : MONO_VECTOR = LargeWordVector
+structure Real32 : REAL = Real32
+structure Real32Array : MONO_ARRAY = Real32Array
+structure Real32Vector : MONO_VECTOR = Real32Vector
+structure Real64 : REAL = Real64
+structure Real64Array : MONO_ARRAY = Real64Array
+structure Real64Vector : MONO_VECTOR = Real64Vector
+structure RealArray : MONO_ARRAY = RealArray
+structure RealVector : MONO_VECTOR = RealVector
+structure SysWord : WORD = SysWord
+structure Word1 : WORD = Word1
+structure Word10 : WORD = Word10
+structure Word11 : WORD = Word11
+structure Word12 : WORD = Word12
+structure Word13 : WORD = Word13
+structure Word14 : WORD = Word14
+structure Word15 : WORD = Word15
+structure Word16 : WORD = Word16
+structure Word16Array : MONO_ARRAY = Word16Array
+structure Word16Vector : MONO_VECTOR = Word16Vector
+structure Word17 : WORD = Word17
+structure Word18 : WORD = Word18
+structure Word19 : WORD = Word19
+structure Word2 : WORD = Word2
+structure Word20 : WORD = Word20
+structure Word21 : WORD = Word21
+structure Word22 : WORD = Word22
+structure Word23 : WORD = Word23
+structure Word24 : WORD = Word24
+structure Word25 : WORD = Word25
+structure Word26 : WORD = Word26
+structure Word27 : WORD = Word27
+structure Word28 : WORD = Word28
+structure Word29 : WORD = Word29
+structure Word3 : WORD = Word3
+structure Word30 : WORD = Word30
+structure Word31 : WORD = Word31
+structure Word32 : WORD = Word32
+structure Word32Array : MONO_ARRAY = Word32Array
+structure Word32Vector : MONO_VECTOR = Word32Vector
+structure Word4 : WORD = Word4
+structure Word5 : WORD = Word5
+structure Word6 : WORD = Word6
+structure Word64 : WORD = Word64
+structure Word64Array : MONO_ARRAY = Word64Array
+structure Word64Vector : MONO_VECTOR = Word64Vector
+structure Word7 : WORD = Word7
+structure Word9 : WORD = Word9
+structure WordArray : MONO_ARRAY = WordArray
+structure WordVector : MONO_VECTOR = WordVector
Property changes on: mltonlib/trunk/com/ssh/extended-basis/unstable/public/export-mlton.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/extended-basis/unstable/public/export.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/export.sml 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/export.sml 2006-10-22 23:42:41 UTC (rev 4750)
@@ -0,0 +1,44 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** == Implementation independent extensions == *)
+
+type ('a, 'b) emb = ('a, 'b) emb
+type ('a, 'b) iso = ('a, 'b) iso
+
+signature ARRAY = ARRAY
+signature CHAR = CHAR
+signature EMB = EMB
+signature INTEGER = INTEGER
+signature INT_INF = INT_INF
+signature ISO = ISO
+signature MONO_ARRAY = MONO_ARRAY
+signature MONO_VECTOR = MONO_VECTOR
+signature REAL = REAL
+signature STRING = STRING
+signature TEXT = TEXT
+signature VECTOR = VECTOR
+signature WORD = WORD
+
+structure Array : ARRAY = Array
+structure Char : CHAR = Char
+structure CharArray : MONO_ARRAY = CharArray
+structure CharVector : MONO_VECTOR = CharVector
+structure Emb : EMB = Emb
+structure Int : INTEGER = Int
+structure Iso : ISO = Iso
+structure LargeInt : INTEGER = LargeInt
+structure LargeReal : REAL = LargeReal
+structure LargeWord : WORD = LargeWord
+structure Position : INTEGER = Position
+structure Real : REAL = Real
+structure String : STRING = String
+structure Text : TEXT = Text
+structure Vector : VECTOR = Vector
+structure Word : WORD = Word
+structure Word8 : WORD = Word8
+structure Word8Array : MONO_ARRAY = Word8Array
+structure Word8Vector : MONO_VECTOR = Word8Vector
Property changes on: mltonlib/trunk/com/ssh/extended-basis/unstable/public/export.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/public/int-inf.sig (from rev 4742, mltonlib/trunk/com/ssh/extended-basis/unstable/int-inf.sig)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/public/integer.sig (from rev 4742, mltonlib/trunk/com/ssh/extended-basis/unstable/integer.sig)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/public/iso.sig (from rev 4742, mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sig)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-array.sig (from rev 4741, mltonlib/trunk/com/ssh/extended-basis/unstable/mono-array.sig)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-vector.sig (from rev 4741, mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vector.sig)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/public/real.sig (from rev 4741, mltonlib/trunk/com/ssh/extended-basis/unstable/real.sig)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/public/string.sig (from rev 4741, mltonlib/trunk/com/ssh/extended-basis/unstable/string.sig)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/public/text.sig (from rev 4741, mltonlib/trunk/com/ssh/extended-basis/unstable/text.sig)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/public/vector.sig (from rev 4741, mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sig)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/public/word.sig (from rev 4741, mltonlib/trunk/com/ssh/extended-basis/unstable/word.sig)
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/real.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/real.sig 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/real.sig 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,24 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(**
- * Extended {REAL} signature.
- *)
-signature REAL = sig
- include REAL
-
- (** == Embeddings == *)
-
- val embDecimal : (real, IEEEReal.decimal_approx) emb
- val embString : (real, string) emb
-
- (** == Isomorphisms == *)
-
- val isoInt : (real, Int.int) iso
- val isoLarge : (real, LargeReal.real) iso
- val isoLargeInt : (real, LargeInt.int) iso
- val isoManExp : (real, {man : real, exp : int}) iso
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/reals-mlton.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/reals-mlton.sml 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/reals-mlton.sml 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,14 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(** == Extended {REAL} modules for MLton == *)
-
-structure Real : REAL = MkRealExt (Real)
-
-structure LargeReal : REAL = MkRealExt (LargeReal)
-
-structure Real32 : REAL = MkRealExt (Real32)
-structure Real64 : REAL = MkRealExt (Real64)
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/string.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/string.sig 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/string.sig 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,60 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(**
- * Extended {STRING} signature.
- *)
-signature STRING = sig
- include STRING
-
- (** == Embeddings == *)
-
- val embCString : (string, string) emb
- (**
- * An embedding of strings into C-style string literals. It is always
- * equivalent to {(toCString, fromCString)}.
- *)
-
- val embString : (string, string) emb
- (**
- * An embedding of strings into SML-style string literals. It is
- * always equivalent to {(toString, fromString)}.
- *)
-
- (** == Isomorphisms == *)
-
- val isoList : (string, char list) iso
- (**
- * An isomorphism between strings and lists. It is always equivalent
- * to {(toList, fromList)}.
- *)
-
- (** == {MONO_VECTOR} == *)
-
- type elem = char
- type vector = string
-
- val all : (elem -> bool) -> vector -> bool
- val app : (elem -> unit) -> vector -> unit
- val appi : (int * elem -> unit) -> vector -> unit
- val exists : (elem -> bool) -> vector -> bool
- val find : (elem -> bool) -> vector -> elem option
- val findi : (int * elem -> bool) -> vector -> (int * elem) option
- val foldl : (elem * 'a -> 'a) -> 'a -> vector -> 'a
- val foldli : (int * elem * 'a -> 'a) -> 'a -> vector -> 'a
- val foldr : (elem * 'a -> 'a) -> 'a -> vector -> 'a
- val foldri : (int * elem * 'a -> 'a) -> 'a -> vector -> 'a
- val fromList : elem list -> vector
- val fromPoly : elem Vector.vector -> vector
- val isoPoly : (vector, elem Vector.vector) iso
- val length : vector -> int
- val mapi : (int * elem -> elem) -> vector -> vector
- val maxLen : int
- val tabulate : int * (int -> elem) -> vector
- val toList : vector -> elem list
- val toPoly : vector -> elem Vector.vector
- val update : vector * int * elem -> vector
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/text.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/text.sig 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/text.sig 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,39 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(**
- * Extended {TEXT} signature.
- *
- * This signature is just a restament of the {TEXT} signature using the
- * extended substructure signatures.
- *)
-signature TEXT = sig
- structure Char : CHAR
- structure CharArray : MONO_ARRAY
- structure CharArraySlice : MONO_ARRAY_SLICE
- structure CharVector : MONO_VECTOR
- structure CharVectorSlice : MONO_VECTOR_SLICE
- structure String : STRING
- structure Substring : SUBSTRING
- sharing type Char.char
- = CharArray.elem
- = CharArraySlice.elem
- = CharVector.elem
- = CharVectorSlice.elem
- = String.char
- = Substring.char
- sharing type Char.string
- = CharArray.vector
- = CharArraySlice.vector
- = CharVector.vector
- = CharVectorSlice.vector
- = String.string
- = Substring.string
- sharing type CharArray.array
- = CharArraySlice.array
- sharing type CharArraySlice.vector_slice
- = CharVectorSlice.slice
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/texts-mlton.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/texts-mlton.sml 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/texts-mlton.sml 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,13 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(** == Extended {TEXT} modules for MLton == *)
-
-structure Text : TEXT = MkTextExt (Text)
-structure Char : CHAR = Text.Char
-structure CharArray : MONO_ARRAY = Text.CharArray
-structure CharVector : MONO_VECTOR = Text.CharVector
-structure String : STRING = Text.String
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sig 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sig 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,28 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(**
- * Extended {VECTOR} signature.
- *)
-signature VECTOR = sig
- include VECTOR
-
- (** == Conversions == *)
-
- val toList : 'a vector -> 'a list
- (**
- * Generates a list from the given vector. Specifically, the result of
- * {toList v} is equivalent to {foldr op :: [] v}.
- *)
-
- (** == Isomorphisms == *)
-
- val isoList : ('a vector, 'a list) iso
- (**
- * An isomorphism between vectors and lists. It is always equivalent
- * to {(toList, fromList)}.
- *)
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sml 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sml 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,14 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(**
- * Extended {Vector :> VECTOR} structure.
- *)
-structure Vector : VECTOR = struct
- open Vector
- fun toList v = foldr op :: [] v
- val isoList = (toList, fromList)
-end
Deleted: mltonlib/trunk/com/ssh/extended-basis/unstable/word.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/word.sig 2006-10-22 21:03:11 UTC (rev 4749)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/word.sig 2006-10-22 23:42:41 UTC (rev 4750)
@@ -1,44 +0,0 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-(**
- * Extended {WORD} signature.
- *)
-signature WORD = sig
- include WORD
-
- (** == Bounds == *)
-
- val maxWord : word
- val minWord : word
-
- val bounds : word * word
-
- (** == Conversions == *)
-
- val fromWord : Word.word -> word
- val toWord : word -> Wor...
[truncated message content] |
|
From: Vesa K. <ve...@ml...> - 2006-10-22 14:03:11
|
Splitted basis.mlb to basis.mlb and extensions.mlb. The idea is that one
can now use -show-basis and see just the extended stuff.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/basis.mlb
A mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/basis.mlb
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/basis.mlb 2006-10-22 02:50:48 UTC (rev 4748)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/basis.mlb 2006-10-22 21:03:11 UTC (rev 4749)
@@ -4,78 +4,5 @@
* See the file MLton-LICENSE for details.
*)
-ann
- "forceUsed"
- "sequenceNonUnit warn"
- "warnUnused true"
-in
- $(SML_LIB)/basis/basis.mlb
-
- (* New {Iso :> ISO} and {Emb :> EMB} modules *)
- iso.sig
- iso.sml
- emb.sig
- emb.sml
-
- (* Extended integer modules *)
- local
- mk-integer-ext.fun
- mk-int-inf-ext.fun
- in
- int-inf.sig
- integer.sig
- ints-mlton.sml
- end
-
- (* Extended real modules *)
- local
- mk-real-ext.fun
- in
- real.sig
- reals-mlton.sml
- end
-
- (* Extended word modules *)
- local
- mk-word-ext.fun
- in
- word.sig
- words-mlton.sml
- end
-
- (* Extended vector module *)
- vector.sig
- vector.sml
-
- (* Extended array module (may depend on vector module) *)
- array.sig
- array.sml
-
- (* Extended mono vector modules *)
- local
- mk-mono-vector-ext.fun
- in
- mono-vector.sig
- mono-vectors-mlton.sml
-
- (* Extended mono array modules (may depend on mono vector modules) *)
- local
- mk-mono-array-ext.fun
- in
- mono-array.sig
- mono-arrays-mlton.sml
-
- (* Extended text modules (may depend on mono vector and mono
- * array modules)
- *)
- local
- mk-text-ext.fun
- in
- char.sig
- string.sig
- text.sig
- texts-mlton.sml
- end
- end
- end
-end
+$(SML_LIB)/basis/basis.mlb
+extensions.mlb
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb (from rev 4741, mltonlib/trunk/com/ssh/extended-basis/unstable/basis.mlb)
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/basis.mlb 2006-10-21 13:33:16 UTC (rev 4741)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb 2006-10-22 21:03:11 UTC (rev 4749)
@@ -0,0 +1,87 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+ann
+ "forceUsed"
+ "sequenceNonUnit warn"
+ "warnUnused true"
+in
+ local
+ $(SML_LIB)/basis/basis.mlb
+ in
+ (* New {Iso :> ISO} and {Emb :> EMB} modules *)
+ iso.sig
+ iso.sml
+ emb.sig
+ emb.sml
+
+ (* Extended integer modules *)
+ local
+ mk-integer-ext.fun
+ mk-int-inf-ext.fun
+ in
+ int-inf.sig
+ integer.sig
+ ints-mlton.sml
+ end
+
+ (* Extended real modules *)
+ local
+ mk-real-ext.fun
+ in
+ real.sig
+ reals-mlton.sml
+ end
+
+ (* Extended word modules *)
+ local
+ mk-word-ext.fun
+ in
+ word.sig
+ words-mlton.sml
+ end
+
+ (* Extended vector module *)
+ vector.sig
+ vector.sml
+
+ (* Extended array module
+ * (may depend on vector module)
+ *)
+ array.sig
+ array.sml
+
+ (* Extended mono vector modules *)
+ local
+ mk-mono-vector-ext.fun
+ in
+ mono-vector.sig
+ mono-vectors-mlton.sml
+
+ (* Extended mono array modules
+ * (may depend on mono vector modules)
+ *)
+ local
+ mk-mono-array-ext.fun
+ in
+ mono-array.sig
+ mono-arrays-mlton.sml
+
+ (* Extended text modules
+ * (may depend on mono vector and mono array modules)
+ *)
+ local
+ mk-text-ext.fun
+ in
+ char.sig
+ string.sig
+ text.sig
+ texts-mlton.sml
+ end
+ end
+ end
+ end
+end
|
|
From: Matthew F. <fl...@ml...> - 2006-10-21 19:50:53
|
Added MLNLFFI platform memory file for amd64-linux (for -m32 mode) ---------------------------------------------------------------------- A mlton/branches/on-20050822-x86_64-branch/lib/mlnlffi/memory/platform/memory.amd64-linux.mlb ---------------------------------------------------------------------- Added: mlton/branches/on-20050822-x86_64-branch/lib/mlnlffi/memory/platform/memory.amd64-linux.mlb =================================================================== --- mlton/branches/on-20050822-x86_64-branch/lib/mlnlffi/memory/platform/memory.amd64-linux.mlb 2006-10-22 02:49:16 UTC (rev 4747) +++ mlton/branches/on-20050822-x86_64-branch/lib/mlnlffi/memory/platform/memory.amd64-linux.mlb 2006-10-22 02:50:48 UTC (rev 4748) @@ -0,0 +1 @@ +../memory.32bit-unix.mlb |
|
From: Matthew F. <fl...@ml...> - 2006-10-21 19:49:18
|
Fixed gcc cast warnings introduced in r4743
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c 2006-10-22 02:33:18 UTC (rev 4746)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c 2006-10-22 02:49:16 UTC (rev 4747)
@@ -203,8 +203,7 @@
}
}
-
-GC_profileData GC_profileMalloc (GC_state s) {
+GC_profileData profileMalloc (GC_state s) {
GC_profileData p;
uint32_t profileMasterLength;
@@ -218,17 +217,27 @@
(struct GC_profileStack *)
(calloc_safe(profileMasterLength, sizeof(*(p->stack))));
if (DEBUG_PROFILE)
- fprintf (stderr, FMTPTR" = GC_profileMalloc ()\n", (uintptr_t)p);
+ fprintf (stderr, FMTPTR" = profileMalloc ()\n", (uintptr_t)p);
return p;
}
-void GC_profileFree (GC_state s, GC_profileData p) {
+GC_profileData GC_profileMalloc (GC_state s) {
+ return profileMalloc (s);
+}
+
+void profileFree (GC_state s, GC_profileData p) {
+ if (DEBUG_PROFILE)
+ fprintf (stderr, "profileFree ("FMTPTR")\n", (uintptr_t)p);
free (p->countTop);
if (s->profiling.stack)
free (p->stack);
free (p);
}
+void GC_profileFree (GC_state s, GC_profileData p) {
+ profileFree (s, p);
+}
+
void writeProfileCount (GC_state s, FILE *f,
GC_profileData p, GC_profileMasterIndex i) {
writeUintmaxU (f, p->countTop[i]);
@@ -244,13 +253,13 @@
writeNewline (f);
}
-void GC_profileWrite (GC_state s, GC_profileData p, NullString8_t fileName) {
+void profileWrite (GC_state s, GC_profileData p, const char *fileName) {
FILE *f;
const char* kind;
if (DEBUG_PROFILE)
- fprintf (stderr, "GC_profileWrite\n");
- f = fopen_safe ((const char*)fileName, "wb");
+ fprintf (stderr, "profileWrite("FMTPTR",%s)\n", (uintptr_t)p, fileName);
+ f = fopen_safe (fileName, "wb");
writeString (f, "MLton prof\n");
kind = "";
switch (s->profiling.kind) {
@@ -291,6 +300,9 @@
fclose_safe (f);
}
+void GC_profileWrite (GC_state s, GC_profileData p, NullString8_t fileName) {
+ profileWrite (s, p, (const char*)fileName);
+}
void setProfTimer (long usec) {
struct itimerval iv;
@@ -352,7 +364,7 @@
static void initProfilingTime (GC_state s) {
struct sigaction sa;
- s->profiling.data = GC_profileMalloc (s);
+ s->profiling.data = profileMalloc (s);
if (PROFILE_TIME_LABEL == s->profiling.kind) {
initTextSources (s);
} else {
@@ -397,7 +409,7 @@
s = atexitForProfilingState;
if (s->profiling.isOn) {
fprintf (stderr, "profiling is on\n");
- GC_profileWrite (s, s->profiling.data, "mlmon.out");
+ profileWrite (s, s->profiling.data, "mlmon.out");
}
}
@@ -410,7 +422,7 @@
switch (s->profiling.kind) {
case PROFILE_ALLOC:
case PROFILE_COUNT:
- s->profiling.data = GC_profileMalloc (s);
+ s->profiling.data = profileMalloc (s);
break;
case PROFILE_NONE:
die ("impossible PROFILE_NONE");
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h 2006-10-22 02:33:18 UTC (rev 4746)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h 2006-10-22 02:49:16 UTC (rev 4747)
@@ -98,6 +98,10 @@
static void writeProfileCount (GC_state s, FILE *f, GC_profileData p, GC_profileMasterIndex i);
+GC_profileData profileMalloc (GC_state s);
+void profileWrite (GC_state s, GC_profileData p, const char* fileName);
+void profileFree (GC_state s, GC_profileData p);
+
static void setProfTimer (long usec);
static void initProfilingTime (GC_state s);
static void atexitForProfiling (void);
|
|
From: Matthew F. <fl...@ml...> - 2006-10-21 19:33:20
|
Added x86_64 porting notes ---------------------------------------------------------------------- A mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/ A mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/TODO A mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/bench.txt A mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/exec-summary.0.txt A mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/exec-summary.1.txt A mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/mltongc.txt A mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/semantics.txt A mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/status.0.txt A mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/status.1.txt D mlton/branches/on-20050822-x86_64-branch/runtime/TODO D mlton/branches/on-20050822-x86_64-branch/runtime/gc/mltongc.txt ---------------------------------------------------------------------- Copied: mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/TODO (from rev 4745, mlton/branches/on-20050822-x86_64-branch/runtime/TODO) Added: mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/bench.txt =================================================================== --- mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/bench.txt 2006-10-22 02:26:17 UTC (rev 4745) +++ mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/bench.txt 2006-10-22 02:33:18 UTC (rev 4746) @@ -0,0 +1,535 @@ + +Now that the refactoring on the x86_64 branch as mostly quiesced, I +ran the benchmark suite to verify that there weren't any major +regressions in performance. It is to be expected that there will be +some variability between HEAD and the x86_64 branch, since lots of +code has been tweaked -- both in the runtime and in the implementation +of the Basis Library. + +I've run the benchmark suite on the following two systems: + * FedoraCore 4; gcc 4.0.2; AMD Opteron 2GHz; 4GB memory + * RedHat; gcc 3.2.2; Intel Pentium 1.1GHz; 2GB memory + +Overall, there don't appear to be any significant (unexplained) +regressions, but the x86_64 branch does appear to be running a little +bit slower. I'll go over some of the highlights, but if anyone sees +anything that they believe deserves more investigation, let me know. + +Reminder: on the AMD Opteron system, these are 32-bit executables +(running on a 64-bit kernel). However, I will note that on the +Opteron we compile the runtime and C-codegen generated files with the +'-mopteron' option. + + +Run-time ratio: + +Across the board, the 'checksum' benchmark performs poorly under the +x86_64 branch; this is easily explained by the fact that the +'checksum' benchmark is dominated by PackWord32Little.subArr, which is +a primitive on HEAD, but is a C-call on the x86_64 branch. See +revision 4418. We should eventually turn the PackWord operations into +a more general primitives; see: + http://mlton.org/pipermail/mlton-user/2004-November/000556.html + http://mlton.org/pipermail/mlton/2004-November/026246.html +This should also partially explain the performance of 'md5', which +also makes use of PackWord32Little operations. + + +For the native-codegen on HEAD vs x86_64 on Opteron, the outliers are: + checksum 2.31 + count-graphs 1.63 + md5 1.41 + ray 1.08 +The 'count-graphs' benchmark deserves further investigation, since it +seems to perform badly on the configurations as well. + +For the native-codegen on HEAD vs x86_64 on i686, the outliers are: + checksum 2.18 + count-graphs 1.74 + md5 1.47 + tyan 1.25 + logic 1.20 + DLXSimulator 1.13 + zebra 1.12 + zern 1.12 + model-elimination 1.11 + hamlet 1.09 + wc-input1 1.09 + life 1.09 + mlyacc 1.08 + flat-array 1.08 + lexgen 1.08 + smith-normal-form 1.07 + +For the C-codegen on HEAD vs x86_64 on Opteron, the outliers are: + checksum 4.61 + mpuz 2.05 + count-graphs 1.68 + md5 1.60 + tailfib 1.53 + zern 1.40 + imp-for 1.40 + simple 1.26 + matrix-multiply 1.24 + mandelbrot 1.18 + vector-concat 1.15 + vliw 1.12 + tyan 1.11 + fib 1.10 + hamlet 1.09 + flat-array 1.07 + +For the C-codegen on HEAD vs x86_64 on i686, the outliers are: + checksum 3.80 + count-graphs 1.68 + md5 1.61 + zern 1.24 + ray 1.19 + logic 1.18 + mpuz 1.18 + tyan 1.16 + vliw 1.14 + barnes-hut 1.13 + fft 1.13 + zebra 1.12 + DLXSimulator 1.12 + smith-normal-form 1.08 + knuth-bendix 1.07 + model-elimination 1.06 + mlyacc 1.06 + wc-scanStream 1.06 + hamlet 1.06 + psdes-random 1.06 + +Since quite a few of our platforms are using the C-codegen, its +probably worth investigating whether there is some low-hanging fruit +to improve its performance. + + +Size: + +Generally, the size of executables on the x86_64 branch are larger +than those on HEAD. + +Size x86_64 - Size HEAD: + +system codegen mean min max +Opteron native 33K 0K 37K +Opteron C 32K 0K 37K +Opteron byte 56K 0K 66K +Pentium native 20K 0K 24K +Pentium C 18K -18K 38K + +Much of the size can probably be attributed to the refactored runtime +code and aggressive inlining with the garbage collector. On the +Opteron system: + + text data bss dec hex filename + 54485 1 352 54838 d636 mlton.svn.x86_64/runtime/gc.o + 33175 4 52 33231 81cf mlton.svn.HEAD/runtime/gc.o + 52318 1004 31040 84362 1498a mlton.svn.x86_64/runtime/bytecode/interpret.o + 34381 1004 31040 66425 10379 mlton.svn.HEAD/bytecode/interpret.o + 129625 1185 34399 165209 28559 mlton.svn.x86_64/build/lib/self/libmlton.a + 91606 1136 33303 126045 1ec5d mlton.svn.HEAD/build/lib/self/libmlton.a + +and on the Pentium system: + + text data bss dec hex filename + 37098 16 400 37514 928a mlton.svn.x86_64/runtime/gc.o + 29645 16 36 29697 7401 mlton.svn.HEAD/runtime/gc.o + 35451 1004 31424 67879 10927 mlton.svn.x86_64/runtime/bytecode/interpret.o + 32041 1004 31040 64085 fa55 mlton.svn.HEAD/bytecode/interpret.o + 91314 1232 82490 175036 2abbc mlton.svn.x86_64/build/lib/self/libmlton.a + 78982 1172 33239 113393 1baf1 mlton.svn.HEAD/build/lib/self/libmlton.a + + +Compile time: + +On the Opteron system, compile times are on average 1.7s longer on the +x86_64 branch than on HEAD (for all codegens), with no compile time +more than 2s longer. I believe that this is mainly explained by the +revised Basis Library, which is nearly 10000 lines longer (39419 lines +for x86_64, 29604 lines for HEAD), and makes aggressive use of +functors. When compiling the program "val () = ()", which includes +type-checking the Basis Library, the x86_64 branch (on Opteron) +requires + + parseAndElaborate starting + parseAndElaborate finished in 2.47 + 1.50 (38% GC) + +while HEAD requires + + parseAndElaborate starting + parseAndElaborate finished in 1.33 + 0.97 (42% GC) + + +Benchmark Data: + +FedoraCore 4; gcc 4.0.2; AMD Opteron 2GHz; 4GB memory + +MLton0 -- /home/fluet/mlton/mlton.svn.HEAD/build/bin/mlton -codegen native +MLton1 -- /home/fluet/mlton/mlton.svn.HEAD/build/bin/mlton -codegen c +MLton2 -- /home/fluet/mlton/mlton.svn.HEAD/build/bin/mlton -codegen bytecode +MLton3 -- /home/fluet/mlton/mlton.svn.x86_64/build/bin/mlton -codegen native +MLton4 -- /home/fluet/mlton/mlton.svn.x86_64/build/bin/mlton -codegen c +MLton5 -- /home/fluet/mlton/mlton.svn.x86_64/build/bin/mlton -codegen bytecode +run time ratio +benchmark MLton0 MLton1 MLton2 MLton3 MLton4 MLton5 +barnes-hut 1.00 1.05 35.52 0.99 1.05 39.91 +boyer 1.00 1.45 48.58 0.90 1.34 54.04 +checksum 1.00 0.94 74.71 2.31 4.35 109.26 +count-graphs 1.00 1.05 71.94 1.63 1.77 118.20 +DLXSimulator 1.00 1.13 42.71 1.04 1.19 47.86 +fft 1.00 1.06 11.10 0.98 1.06 12.40 +fib 1.00 1.49 45.77 1.00 1.63 51.21 +flat-array 1.00 2.38 * 0.97 2.54 139.95 +hamlet 1.00 2.46 52.35 1.01 2.68 58.79 +imp-for 1.00 0.92 111.76 1.01 1.30 124.50 +knuth-bendix 1.00 1.97 82.38 1.01 2.02 92.02 +lexgen 1.00 1.25 63.31 0.97 1.15 69.67 +life 1.00 1.03 79.25 0.97 1.02 89.04 +logic 1.00 1.49 44.24 1.00 1.51 49.64 +mandelbrot 1.00 1.24 76.40 1.01 1.46 86.30 +matrix-multiply 1.00 1.34 71.18 1.00 1.66 79.63 +md5 1.00 1.31 33.23 1.41 2.10 43.49 +merge 1.00 1.17 29.43 0.96 1.12 32.95 +mlyacc 1.00 1.28 37.96 1.02 1.29 42.41 +model-elimination 1.00 1.61 39.69 1.00 1.54 44.53 +mpuz 1.00 1.02 71.92 1.01 2.08 84.50 +nucleic 1.00 1.09 34.95 0.98 1.09 39.47 +output1 1.00 2.34 117.37 1.00 1.72 131.77 +peek 1.00 0.58 86.42 1.01 0.58 96.18 +psdes-random 1.00 1.53 137.87 1.04 1.54 153.87 +ratio-regions 1.00 1.21 55.21 0.99 1.22 61.90 +ray 1.00 1.15 28.64 1.08 1.20 32.52 +raytrace 1.00 1.56 55.36 1.01 1.52 62.11 +simple 1.00 1.59 50.06 0.99 2.00 56.12 +smith-normal-form 1.00 1.00 1.55 1.00 1.00 1.65 +tailfib 1.00 2.16 125.85 1.00 3.29 141.95 +tak 1.00 1.21 44.07 1.00 1.26 49.04 +tensor 1.00 2.73 221.51 1.00 2.34 249.18 +tsp 1.00 1.07 32.75 0.99 1.10 36.47 +tyan 1.00 1.23 49.00 0.99 1.36 54.39 +vector-concat 1.00 2.10 117.04 1.00 2.41 131.42 +vector-rev 1.00 2.20 108.94 1.00 2.22 123.01 +vliw 1.00 1.58 38.45 0.95 1.77 42.15 +wc-input1 1.00 1.45 66.78 1.00 1.01 72.56 +wc-scanStream 1.00 1.38 85.70 1.01 1.29 96.10 +zebra 1.00 0.79 59.80 1.02 0.81 69.07 +zern 1.00 1.37 51.00 0.99 1.93 57.92 +size +benchmark MLton0 MLton1 MLton2 MLton3 MLton4 MLton5 +barnes-hut 105,267 104,417 165,416 139,837 138,215 232,889 +boyer 140,514 159,758 235,153 177,957 197,533 291,874 +checksum 56,054 56,294 95,329 89,801 93,425 153,298 +count-graphs 68,882 76,202 127,057 106,213 111,337 182,690 +DLXSimulator 135,234 146,354 229,221 169,092 176,216 287,985 +fft 67,065 75,089 119,474 100,762 108,282 175,074 +fib 49,670 56,438 95,369 86,841 92,845 151,778 +flat-array 49,710 56,514 95,425 86,913 92,665 151,906 +hamlet 1,257,401 1,436,385 2,205,344 1,278,403 1,468,331 2,251,676 +imp-for 49,542 56,306 95,497 86,713 92,393 151,938 +knuth-bendix 115,194 124,202 187,597 150,372 155,792 247,873 +lexgen 208,859 220,971 322,626 242,029 254,149 383,194 +life 68,046 74,486 124,033 105,377 110,749 180,674 +logic 108,498 123,142 198,321 146,089 159,877 255,202 +mandelbrot 49,606 56,666 95,385 86,921 92,777 151,938 +matrix-multiply 50,146 56,970 96,281 87,413 92,977 152,818 +md5 83,618 85,762 131,941 120,604 123,072 194,257 +merge 51,274 57,790 97,689 88,469 94,061 154,178 +mlyacc 511,891 565,983 795,250 546,353 602,813 856,506 +model-elimination 643,424 768,560 1,045,115 662,174 784,430 1,096,923 +mpuz 52,582 59,982 100,817 89,649 96,245 157,218 +nucleic 200,330 159,021 226,891 237,861 195,196 286,321 +output1 86,748 90,724 136,647 121,316 120,832 196,545 +peek 82,330 84,514 130,445 117,076 117,056 190,769 +psdes-random 50,302 57,286 96,545 87,489 93,189 153,026 +ratio-regions 75,846 83,366 136,993 112,873 120,301 192,674 +ray 189,999 206,069 294,804 210,841 221,443 345,525 +raytrace 269,012 311,606 437,745 292,472 324,700 490,412 +simple 229,022 252,368 336,575 262,402 287,880 398,698 +smith-normal-form 187,722 210,750 264,629 223,784 245,772 330,081 +tailfib 49,334 56,242 94,961 86,505 92,329 151,394 +tak 49,750 56,386 95,377 86,953 92,561 151,842 +tensor 103,625 112,809 174,708 139,227 145,515 239,952 +tsp 88,194 89,620 142,687 122,964 124,362 207,232 +tyan 140,858 155,018 234,685 176,684 184,844 295,409 +vector-concat 50,934 57,954 97,505 88,137 94,241 153,986 +vector-rev 50,194 57,094 96,289 87,397 93,365 152,770 +vliw 400,590 475,066 682,121 415,992 492,872 727,701 +wc-input1 107,822 111,206 171,417 142,588 144,564 235,201 +wc-scanStream 115,102 121,150 183,745 149,936 151,548 247,521 +zebra 147,134 149,246 256,645 181,800 183,968 316,545 +zern 96,747 104,479 153,564 113,951 121,011 198,699 +compile time +benchmark MLton0 MLton1 MLton2 MLton3 MLton4 MLton5 +barnes-hut 3.67 5.91 3.54 5.39 7.62 5.40 +boyer 4.03 8.59 3.65 5.66 10.19 5.28 +checksum 2.73 2.91 2.74 4.41 4.59 4.48 +count-graphs 3.08 4.21 3.00 4.73 5.85 4.66 +DLXSimulator 4.23 7.94 3.89 5.89 9.70 5.64 +fft 2.96 3.49 2.92 4.66 5.17 4.65 +fib 2.72 2.91 2.73 4.37 4.55 4.40 +flat-array 2.72 2.92 2.74 4.42 4.57 4.40 +hamlet 46.21 100.44 42.05 45.03 98.89 40.30 +imp-for 2.76 2.94 2.75 4.44 4.61 4.46 +knuth-bendix 3.52 6.53 3.31 5.20 8.28 5.05 +lexgen 4.92 11.05 4.24 6.63 12.94 6.05 +life 2.98 4.07 2.89 4.66 5.73 4.61 +logic 3.59 6.10 3.26 5.21 7.76 4.92 +mandelbrot 2.73 2.93 2.73 4.42 4.64 4.45 +matrix-multiply 2.76 2.97 2.74 4.43 4.66 4.49 +md5 3.07 4.14 3.01 4.80 6.09 4.80 +merge 2.75 2.98 2.74 4.39 4.65 4.42 +mlyacc 10.98 28.62 8.40 12.62 30.30 9.86 +model-elimination 11.25 36.90 8.95 12.91 38.79 10.63 +mpuz 2.79 3.13 2.76 4.45 4.81 4.45 +nucleic 5.88 12.55 5.40 7.36 14.18 7.08 +output1 3.04 4.26 2.99 4.74 6.03 4.73 +peek 2.98 4.03 2.95 4.76 5.89 4.73 +psdes-random 2.73 2.94 2.74 4.40 4.62 4.43 +ratio-regions 3.27 4.71 3.11 4.89 6.32 4.81 +ray 4.39 9.19 3.95 6.14 11.10 5.78 +raytrace 6.15 15.08 5.24 7.86 16.82 7.11 +simple 5.07 11.42 4.42 6.76 13.30 6.15 +smith-normal-form 4.37 11.58 3.92 6.14 13.51 5.73 +tailfib 2.72 2.89 2.72 4.36 4.56 4.40 +tak 2.72 2.89 2.71 4.38 4.59 4.40 +tensor 3.78 6.03 3.63 5.55 8.00 5.50 +tsp 3.19 4.47 3.11 4.93 6.39 4.88 +tyan 4.13 8.46 3.77 5.83 10.41 5.55 +vector-concat 2.73 2.98 2.73 4.41 4.62 4.41 +vector-rev 2.72 2.93 2.71 4.37 4.59 4.39 +vliw 8.26 22.55 6.72 9.85 24.40 8.39 +wc-input1 3.39 5.73 3.26 5.10 7.46 5.06 +wc-scanStream 3.50 5.91 3.32 5.20 7.66 5.13 +zebra 4.13 8.83 3.62 5.75 10.52 5.34 +zern 3.04 3.80 2.99 4.74 5.63 4.78 +run time +benchmark MLton0 MLton1 MLton2 MLton3 MLton4 MLton5 +barnes-hut 14.30 15.05 507.90 14.21 14.99 570.63 +boyer 18.04 26.23 876.42 16.21 24.16 974.97 +checksum 42.48 40.08 3173.59 97.97 184.62 4641.33 +count-graphs 20.80 21.87 1496.06 33.84 36.84 2458.24 +DLXSimulator 17.77 20.10 758.85 18.52 21.07 850.44 +fft 14.48 15.29 160.74 14.16 15.32 179.61 +fib 34.68 51.60 1587.41 34.68 56.67 1776.10 +flat-array 7.43 17.68 * 7.23 18.84 1039.24 +hamlet 16.43 40.33 860.05 16.55 44.09 965.80 +imp-for 28.83 26.66 3222.03 29.07 37.34 3589.23 +knuth-bendix 17.29 34.10 1424.23 17.51 34.84 1590.71 +lexgen 20.57 25.65 1302.31 19.97 23.67 1433.19 +life 8.93 9.23 707.85 8.65 9.12 795.25 +logic 18.82 27.99 832.67 18.76 28.49 934.14 +mandelbrot 24.40 30.33 1864.51 24.71 35.64 2105.89 +matrix-multiply 3.30 4.43 234.57 3.30 5.48 262.39 +md5 32.37 42.48 1075.62 45.56 67.87 1407.68 +merge 14.47 16.89 425.70 13.82 16.20 476.70 +mlyacc 16.48 21.16 625.73 16.84 21.25 699.21 +model-elimination 28.66 46.19 1137.74 28.66 44.12 1276.43 +mpuz 21.92 22.26 1576.65 22.08 45.68 1852.59 +nucleic 14.80 16.06 517.07 14.48 16.16 584.01 +output1 7.19 16.79 843.77 7.20 12.40 947.25 +peek 34.60 19.99 2990.07 34.79 19.96 3327.80 +psdes-random 15.90 24.29 2192.78 16.47 24.48 2447.26 +ratio-regions 24.02 28.99 1325.99 23.87 29.37 1486.63 +ray 15.73 18.14 450.44 17.05 18.88 511.61 +raytrace 16.37 25.59 906.21 16.55 24.86 1016.67 +simple 20.16 32.05 1009.38 20.03 40.41 1131.65 +smith-normal-form 10.32 10.32 15.96 10.31 10.32 17.07 +tailfib 19.36 41.81 2436.39 19.36 63.77 2748.18 +tak 12.92 15.70 569.51 12.92 16.24 633.76 +tensor 17.30 47.15 3831.05 17.30 40.45 4309.63 +tsp 19.84 21.15 649.58 19.54 21.86 723.41 +tyan 18.70 22.97 916.13 18.60 25.49 1016.87 +vector-concat 30.16 63.24 3530.57 30.21 72.83 3964.18 +vector-rev 18.61 40.95 2027.41 18.54 41.38 2289.30 +vliw 18.69 29.49 718.62 17.68 33.00 787.79 +wc-input1 27.42 39.70 1830.85 27.33 27.72 1989.39 +wc-scanStream 14.00 19.33 1200.10 14.12 18.02 1345.82 +zebra 26.26 20.82 1570.44 26.68 21.17 1814.11 +zern 17.18 23.60 876.26 16.94 33.15 995.14 + + +RedHat; gcc 3.2.2; Intel Pentium 1.1GHz; 2GB memory + +MLton0 -- /home/fluet/mlton/mlton.svn.HEAD/build/bin/mlton -codegen native +MLton1 -- /home/fluet/mlton/mlton.svn.HEAD/build/bin/mlton -codegen c +MLton2 -- /home/fluet/mlton/mlton.svn.x86_64/build/bin/mlton -codegen native +MLton3 -- /home/fluet/mlton/mlton.svn.x86_64/build/bin/mlton -codegen c +run time ratio +benchmark MLton0 MLton1 MLton2 MLton3 +barnes-hut 1.00 1.03 1.05 1.16 +boyer 1.00 1.17 1.04 1.22 +checksum 1.00 0.83 2.18 3.15 +count-graphs 1.00 1.44 1.74 2.42 +DLXSimulator 1.00 1.07 1.13 1.20 +fft 1.00 1.04 1.01 1.17 +fib 1.00 1.35 1.00 1.32 +flat-array 1.00 1.49 1.08 1.50 +hamlet 1.00 2.01 1.09 2.13 +imp-for 1.00 1.67 1.00 1.30 +knuth-bendix 1.00 1.98 1.00 2.12 +lexgen 1.00 1.34 1.08 1.39 +life 1.00 1.25 1.09 1.30 +logic 1.00 1.30 1.20 1.53 +mandelbrot 1.00 1.08 1.00 1.04 +matrix-multiply 1.00 1.08 1.00 0.99 +md5 1.00 1.39 1.47 2.24 +merge 1.00 1.00 1.00 1.00 +mlyacc 1.00 1.30 1.08 1.38 +model-elimination 1.00 1.35 1.11 1.43 +mpuz 1.00 1.63 0.97 1.91 +nucleic 1.00 1.06 1.02 1.10 +output1 1.00 1.73 0.94 1.57 +peek 1.00 1.98 1.00 1.39 +psdes-random 1.00 0.93 1.00 0.98 +ratio-regions 1.00 1.39 1.01 1.42 +ray 1.00 1.05 0.99 1.25 +raytrace 1.00 1.44 1.00 1.49 +simple 1.00 1.53 0.82 1.60 +smith-normal-form 1.00 1.00 1.07 1.08 +tailfib 1.00 2.42 1.00 2.40 +tak 1.00 1.12 1.01 1.05 +tensor 1.00 2.87 1.00 1.83 +tsp 1.00 1.46 1.04 1.51 +tyan 1.00 1.18 1.25 1.36 +vector-concat 1.00 1.48 0.99 1.20 +vector-rev 1.00 1.20 0.93 1.01 +vliw 1.00 1.36 1.04 1.55 +wc-input1 1.00 1.90 1.09 1.55 +wc-scanStream 1.00 1.38 1.04 1.46 +zebra 1.00 1.20 1.12 1.34 +zern 1.00 1.24 1.12 1.54 +size +benchmark MLton0 MLton1 MLton2 MLton3 +barnes-hut 97,508 97,306 120,294 116,848 +boyer 136,927 142,863 160,418 165,470 +checksum 51,663 51,311 71,706 73,842 +count-graphs 65,295 73,315 88,674 95,194 +DLXSimulator 127,763 136,771 149,829 154,097 +fft 62,846 70,210 82,509 88,137 +fib 46,083 51,327 69,286 72,846 +flat-array 46,123 51,323 69,358 73,914 +hamlet 1,254,374 1,363,870 1,264,408 1,344,664 +imp-for 45,955 51,099 69,158 72,738 +knuth-bendix 107,539 125,899 130,949 146,065 +lexgen 202,036 233,364 223,350 243,438 +life 64,491 67,455 87,870 89,438 +logic 104,943 99,311 128,614 121,806 +mandelbrot 46,019 51,251 69,318 72,890 +matrix-multiply 46,559 51,859 69,810 73,490 +md5 76,019 75,419 100,965 99,785 +merge 47,679 52,663 70,914 74,478 +mlyacc 505,988 610,056 528,634 649,166 +model-elimination 635,421 712,925 643,211 701,051 +mpuz 48,987 55,991 72,110 77,310 +nucleic 196,751 149,485 220,274 171,076 +output1 79,133 77,813 101,909 98,473 +peek 74,683 77,835 97,653 98,825 +psdes-random 46,715 52,127 69,934 73,782 +ratio-regions 72,275 87,903 95,350 106,166 +ray 180,588 193,178 190,398 206,080 +raytrace 260,753 317,931 272,662 323,609 +simple 220,727 257,329 242,305 269,807 +smith-normal-form 180,099 188,743 204,361 211,045 +tailfib 45,747 51,067 68,950 72,730 +tak 46,163 51,307 69,398 72,890 +tensor 95,986 105,482 119,796 127,380 +tsp 80,579 81,508 103,501 104,954 +tyan 133,243 143,675 157,293 170,973 +vector-concat 47,379 52,643 70,582 74,330 +vector-rev 46,607 51,767 69,842 73,342 +vliw 391,203 452,871 395,557 450,293 +wc-input1 100,239 107,207 123,197 128,853 +wc-scanStream 107,511 107,671 130,497 129,437 +zebra 139,535 137,751 162,385 159,665 +zern 88,236 95,996 95,376 101,680 +compile time +benchmark MLton0 MLton1 MLton2 MLton3 +barnes-hut 9.28 13.52 14.43 19.60 +boyer 9.55 28.24 15.23 34.07 +checksum 6.51 6.88 11.99 12.31 +count-graphs 7.30 9.48 12.74 14.96 +DLXSimulator 10.03 18.45 15.63 23.99 +fft 6.98 7.97 12.60 13.52 +fib 6.43 6.80 11.88 12.50 +flat-array 6.45 6.78 11.96 14.45 +hamlet 114.74 240.97 144.92 274.80 +imp-for 6.57 6.88 12.00 12.28 +knuth-bendix 8.31 14.22 14.11 20.17 +lexgen 11.86 25.81 17.46 31.33 +life 7.10 9.10 12.50 14.70 +logic 8.52 14.08 14.15 19.53 +mandelbrot 6.44 6.86 12.02 12.35 +matrix-multiply 6.57 6.92 12.08 12.48 +md5 7.29 9.64 12.99 15.69 +merge 6.55 6.93 11.98 12.49 +mlyacc 27.38 74.39 34.33 79.63 +model-elimination 28.79 85.30 36.07 89.53 +mpuz 6.60 7.31 12.11 12.71 +nucleic 13.67 39.16 19.36 44.77 +output1 7.26 9.64 12.94 15.49 +peek 7.10 9.18 12.86 14.92 +psdes-random 6.49 6.80 12.00 12.47 +ratio-regions 7.77 10.97 13.27 16.10 +ray 10.59 20.62 16.37 26.32 +raytrace 14.88 36.18 21.19 42.23 +simple 12.83 30.33 18.15 33.79 +smith-normal-form 10.53 79.19 16.41 97.25 +tailfib 6.69 7.00 13.06 13.25 +tak 7.41 9.00 14.06 12.38 +tensor 9.42 14.23 16.44 20.07 +tsp 7.68 10.41 13.33 16.61 +tyan 10.74 20.20 16.64 26.49 +vector-concat 6.56 7.31 12.01 12.41 +vector-rev 6.96 8.09 15.08 12.44 +vliw 24.07 52.93 27.06 57.14 +wc-input1 8.39 13.38 15.94 23.38 +wc-scanStream 8.23 13.28 14.53 20.53 +zebra 11.06 17.77 15.57 23.29 +zern 7.45 8.66 13.06 16.02 +run time +benchmark MLton0 MLton1 MLton2 MLton3 +barnes-hut 44.53 45.98 46.83 51.87 +boyer 55.60 65.19 57.62 68.05 +checksum 97.34 80.59 211.83 306.25 +count-graphs 40.15 57.72 69.80 97.06 +DLXSimulator 85.24 91.25 96.11 102.38 +fft 35.98 37.38 36.41 42.09 +fib 70.23 94.84 70.23 92.87 +flat-array 24.93 37.08 26.86 37.37 +hamlet 50.91 102.55 55.62 108.50 +imp-for 46.81 78.06 46.80 61.02 +knuth-bendix 38.03 75.16 37.99 80.62 +lexgen 44.15 58.97 47.56 61.29 +life 14.89 18.63 16.18 19.41 +logic 53.38 69.48 64.10 81.84 +mandelbrot 55.98 60.45 55.97 58.03 +matrix-multiply 7.47 8.07 7.50 7.37 +md5 53.16 73.84 78.02 118.96 +merge 77.94 77.81 77.99 77.71 +mlyacc 40.97 53.38 44.35 56.66 +model-elimination 77.74 104.80 86.44 111.25 +mpuz 41.84 68.04 40.67 80.00 +nucleic 42.22 44.77 43.24 46.29 +output1 16.02 27.75 15.08 25.12 +peek 44.63 88.53 44.52 62.01 +psdes-random 38.86 36.12 38.85 38.19 +ratio-regions 51.77 71.99 52.52 73.43 +ray 33.97 35.83 33.70 42.58 +raytrace 42.30 61.08 42.47 63.03 +simple 60.46 92.79 49.83 96.88 +smith-normal-form 35.23 35.25 37.70 38.20 +tailfib 43.77 105.75 43.79 104.84 +tak 27.60 30.86 27.76 28.95 +tensor 58.98 169.31 59.06 107.94 +tsp 59.66 87.04 62.28 90.29 +tyan 59.12 69.47 73.83 80.61 +vector-concat 85.93 126.95 85.20 102.89 +vector-rev 122.82 147.47 113.88 123.68 +vliw 53.94 73.27 56.20 83.77 +wc-input1 39.13 74.19 42.66 60.60 +wc-scanStream 32.78 45.37 34.23 48.01 +zebra 43.41 51.91 48.45 58.28 +zern 43.72 54.23 48.77 67.33 Added: mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/exec-summary.0.txt =================================================================== --- mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/exec-summary.0.txt 2006-10-22 02:26:17 UTC (rev 4745) +++ mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/exec-summary.0.txt 2006-10-22 02:33:18 UTC (rev 4746) @@ -0,0 +1,47 @@ + +Notes on the status of the x86_64 port of MLton. +======================================================================= + +Summary: + +The runtime system (i.e., garbage collector and related services) has +been rewritten to be configurable along two independent axes: the +native pointer size and the ML heap object pointer size. There are no +known functionality or performance regressions with respect to the +rewritten runtime and the mainline runtime. + +The next step will be modify the Basis Library implementation (on both +the SML and C sides) to be agnostic to the native representation of +primitive C-types (e.g., int, long); this is important for getting the +right representation for file descriptors, etc. This step ensures +that the Basis Library implementation may be shared between 32-bit and +64-bit systems. + +Following that, it should be possible to push changes through the +compiler proper to support a C-codegen in which all pointers are +64-bit. After shaking out bugs there, we should be able to consider +supporting smaller ML-pointer representations and a simple native +codegen. + +Timetable: + +It is expected that the Basis Library changes and the C-codegen will +be completed by March 1. + + +Technical Question: + +One of the native representations that changes from a 32-bit system to +a 64-bit system is the GNU MP representation of arbitrary precision +integers. Hence, the MLton.IntInf representation datatype + + datatype rep = + Big of Word.word Vector.vector + | Small of Int.int + +may not suffice (in the situations where Int.int and/or Word.word are +32-bit but the host system is 64-bit). We are considering the best +way to accomodate IntInf in the 64-bit setting, but we recall that +Polyspace has used MLton.IntInf.rep in the past, and wanted to ask if +there were any particular requirements on maintaining or changing the +interface. Added: mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/exec-summary.1.txt =================================================================== --- mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/exec-summary.1.txt 2006-10-22 02:26:17 UTC (rev 4745) +++ mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/exec-summary.1.txt 2006-10-22 02:33:18 UTC (rev 4746) @@ -0,0 +1,61 @@ + +Notes on the status of the x86_64 port of MLton. +======================================================================= + +Summary: + +The runtime system (i.e., garbage collector and related services) has +been rewritten to be configurable along two independent axes: the +native pointer size and the ML heap object pointer size. There are no +known functionality or performance regressions with respect to the +rewritten runtime and the mainline runtime. + +The Basis Library has been refactored so that it is compile-time +configurable on the following axes: + + OBJPTR -- size of an object pointer (32-bits or 64-bits) + HEADER -- size of an object header (32-bits or 64-bits) + SEQINDEX -- size of an array/vector length (32-bits or 64-bits) + + DEFAULT_CHAR -- size of Char.char (8-bits; no choice according to spec) + DEFAULT_INT -- size of Int.int (32-bits, 64-bits, and IntInf.int) + DEFAULT_REAL -- size of Real.real (32-bits, 64-bits) + DEFAULT_WORD -- size of Word.word (32-bits, 64-bits) + + C_TYPES -- sizes of various primitive C types + +The object pointer and object header are needed for the IntInf +implemention. Configuring the default sizes support both adopting +64-bit integers and words as the default on 64-bit platforms, but also +supports retaining 32-bit integers and words as the default on 64-bit +platforms. The sizes of primitive C types are determined by the +target architecture and operating system. This ensures that the Basis +Library uses the right representation for file descriptors, etc., and +ensures that the implementation may be shared between 32-bit and +64-bit systems. There are no known functionality or performance +regressions with respect to the refactored Basis Library +implementation and the mainline implementation. + +The next step is to push changes through the compiler proper to +support a C-codegen in which all pointers are 64-bit. After shaking +out bugs there, we should be able to consider supporting smaller +ML-pointer representations and a simple native codegen. + + +MLton.IntInf changes: + +As noted above, the object pointer size is needed by the IntInf +implementation, which represents an IntInf.int either as a pointer to +a vector of GNU MP mp_limb_t objects or as the upper bits of a +pointer. Since the representation of mp_limb_t changes from a 32-bit +system to a 64-bit system, and the size of an object pointer may be +compile-time configurable, we have changed the MLTON_INTINF signature +to have the following: + + structure BigWord : WORD + structure SmallInt : INTEGER + + datatype rep = + Big of BigWord.word vector + | Small of SmallInt.int + val rep: t -> rep Copied: mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/mltongc.txt (from rev 4742, mlton/branches/on-20050822-x86_64-branch/runtime/gc/mltongc.txt) Added: mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/semantics.txt =================================================================== --- mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/semantics.txt 2006-10-22 02:26:17 UTC (rev 4745) +++ mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/semantics.txt 2006-10-22 02:33:18 UTC (rev 4746) @@ -0,0 +1,28 @@ +Structure Val From To Semantics +------------------------------------------------------------------------------- +Word fromInt int word lowbits or sign-extend +Word fromIntZ int word lowbits of zero-extend +Word fromWord word word lowbits or zero-extend +Word fromWordX word word lowbits of sign-extend +Word toInt word int overflow check, unsigned +Word toIntX word int overflow check, signed +Word toWord word word lowbits or zero-extend +Word toWordX word word lowbits or sign-extend + +Int fromInt int int overflow check, signed +Int fromWord word int overflow check, unsigned +Int fromWordX word int overflow check, signed +Int toInt int int overflow check, signed +Int toWord int word lowbits or zero-extend +Int toWordX int word lowbits or sign-extend + + +From: int, word +To: int, word +Semantics: lowbits or sign-extend, + lowbits or zero-extend, + overflow check, unsigned + overflow check, signed + + +Primitives are all: lowbits or sign-extend, lowbits or zero-extend Added: mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/status.0.txt =================================================================== --- mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/status.0.txt 2006-10-22 02:26:17 UTC (rev 4745) +++ mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/status.0.txt 2006-10-22 02:33:18 UTC (rev 4746) @@ -0,0 +1,87 @@ + +Notes on the status of the x86_64 port of MLton. +======================================================================= + +Sources: + +Work is progressing on the x86_64 branch; interested parties may check +out the latest revision with: + +svn co svn://mlton.org/mlton/branches/on-20050822-x86_64-branch mlton.x86_64 + +and view the sources on the web at: + +http://mlton.org/cgi-bin/viewsvn.cgi/mlton/branches/on-20050822-x86_64-branch/ + + +Background: + +(* Representing 64-bit pointers. *) +http://mlton.org/pipermail/mlton/2004-October/026162.html +(* MLton GC overview *) +http://mlton.org/pipermail/mlton/2005-July/027585.html + + +Summary: + +Thus far, the garbage collector (and related services) have been +rewritten to be native pointer size agnostic with configurable heap +object pointer representation. There are no known regressions with +respect to the rewritten GC and the present 32-bit compiler. The next +step will be to make the Basis Library implementation agnostic to the +native representation of primitive C-types (e.g., int, char*, etc.). +This will ensure that the Basis Library implementation may be shared +among 32-bit and 64-bit systems. Following that, I believe that it +will be possible to push changes through the compiler proper to +support a C-codegen in which all pointers are 64-bit. After shaking +out bugs there, we should be able to consider supporting smaller +ML-pointer representations. + + +Details: + +Thus far, code modifications have been limited to the runtime/ +directory: + +http://mlton.org/cgi-bin/viewsvn.cgi/mlton/branches/on-20050822-x86_64-branch/runtime/ + +The new gc/ sub-directory breaks down the GC implementation into +smaller pieces. For efficiency, they are #include-ed together to form +a single compilation unit to feed to the C compiler. + +A key design decision has been to implement the GC in a manner that is +agnostic to the native pointer size and to the desired ML-pointer +representation. The file model.h encapsulates the key attributes that +describe an ML-pointer representation, and the files objptr.{h,c} +encapsulate the conversions between native pointers and ML-pointers. +In most places, such conversions are relatively routine. One major +exception is that some care must be taken with threading of internal +pointers for the Jonker's mark-compact GC, since it must compensate +for the possibility that an ML-pointer is not the same size as an +ML-header. + +Similarly, any assumptions about the native WORD_SIZE has been +removed. All object sizes are measured in 8-bit bytes and stored in +size_t variables. Statistics are gathered in uintmax_t and intmax_t +variables. + +The C-side of the Basis Library implementation is entirely agnostic to +the representation of ML-objects (pointers, headers, etc.). That is, +the FFI assumes that all ML-objects are passed by their native pointer +representation. Consequently, all functions exported by the GC to the +Basis Library are expressed in terms of native pointers. + +The one, and only, exception is that basis/IntInf.c requires some +additional information about ML-header sizes, the layout of the +GC_state struct, etc. It isn't clear that there is signficant benefit +to be had by making the implementation agnostic to these decisions. + +Some decisions need to be made about the representation and +implementation of IntInf.int. The salient point is that on a 64-bit +system, a GMP limb is represented as a 64-bit object. + + +With regards to the next step, I believe it will be worthwile to +follow the technique used in the MLNLFFI-library implemantation. +There, we use two ML Basis path variables (TARGET_ARCH, TARGET_OS) to +choose the correct ML representation for primitive C types. Added: mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/status.1.txt =================================================================== --- mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/status.1.txt 2006-10-22 02:26:17 UTC (rev 4745) +++ mlton/branches/on-20050822-x86_64-branch/doc/x86_64-port-notes/status.1.txt 2006-10-22 02:33:18 UTC (rev 4746) @@ -0,0 +1,299 @@ + +Notes on the status of the x86_64 port of MLton. +======================================================================= + +Sources: + +Work is progressing on the x86_64 branch; interested parties may check +out the latest revision with: + +svn co svn://mlton.org/mlton/branches/on-20050822-x86_64-branch mlton.x86_64 + +and view the sources on the web at: + +http://mlton.org/cgi-bin/viewsvn.cgi/mlton/branches/on-20050822-x86_64-branch/ + + +Background: + +(* Representing 64-bit pointers. *) +http://mlton.org/pipermail/mlton/2004-October/026162.html +(* MLton GC overview *) +http://mlton.org/pipermail/mlton/2005-July/027585.html +(* Runtime rewrite *) +http://mlton.org/pipermail/mlton/2005-December/028421.html + + +Summary: + +Since the last summary, the Basis Library has been refactored so that +it is compile-time configurable on the following axes: + + OBJPTR -- size of an object pointer (32-bits or 64-bits) + HEADER -- size of an object header (32-bits or 64-bits) + SEQINDEX -- size of an array/vector length (32-bits or 64-bits) + + DEFAULT_CHAR -- size of Char.char (8-bits; no choice according to spec) + DEFAULT_INT -- size of Int.int (32-bits, 64-bits, and IntInf.int) + DEFAULT_REAL -- size of Real.real (32-bits, 64-bits) + DEFAULT_WORD -- size of Word.word (32-bits, 64-bits) + + C_TYPES -- sizes of various primitive C types + +The object pointer and object header are needed for the IntInf +implemention. Configuring the default sizes support both adopting +64-bit integers and words as the default on 64-bit platforms, but also +supports retaining 32-bit integers and words as the default on 64-bit +platforms. The sizes of primitive C types are determined by the +target architecture and operating system. This ensures that the Basis +Library uses the right representation for file descriptors, etc., and +ensures that the implementation may be shared between 32-bit and +64-bit systems. + + +MLton.IntInf changes: + +As noted above, the object pointer size is needed by the IntInf +implementation, which represents an IntInf.int either as a pointer to +a vector of GNU MP mp_limb_t objects or as the upper bits of a +pointer. Since the representation of mp_limb_t changes from a 32-bit +system to a 64-bit system, and the size of an object pointer may be +compile-time configurable, we have changed the MLTON_INTINF signature +to have the following: + + structure BigWord : WORD + structure SmallInt : INTEGER + + datatype rep = + Big of BigWord.word vector + | Small of SmallInt.int + val rep: t -> rep + + +Technical Details: + +The key techniques used in the refactoring of the Basis Library is +aggressive use of ML Basis path variables, successive rebindings of +structures, and special 'Choose' functors. I'll describe each of +these a little below. + +The Basis Library implementation is organized as a large ML Basis +project. In order to establish the appropriate mappings between C +primitive types (int, long long int, etc.) and ML types (Int32.int, +Int64.int, etc), we use the $(TARGET_ARCH) and $(TARGET_OS) path +variables to elaborate a target specific c-types.sml file: + + <basis>/config/c/$(TARGET_ARCH)-$(TARGET_OS)/c-types.sml + +The c-types.sml file is generated automatically for each target +system, using the runtime/gen/gen-types.c program, and looks something +like: + +(* C *) +structure C_Char = struct open Int8 type t = int end +functor C_Char_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int8 (A) +structure C_SChar = struct open Int8 type t = int end +functor C_SChar_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int8 (A) +structure C_UChar = struct open Word8 type t = word end +... +structure C_Size = struct open Word32 type t = word end +functor C_Size_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +... +structure C_Off = struct open Int64 type t = int end +functor C_Off_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int64 (A) +... +structure C_UId = struct open Word32 type t = word end +functor C_UId_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +... +(* from "gmp.h" *) +structure C_MPLimb = struct open Word32 type t = word end +functor C_MPLimb_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +Note that each C type has a corresponding structure which is bound to +an Int<N> or Word<N> structure of the appropriate signedness and size. +The extra binding of "type t = int" or "type t = word" ensures that +the Basis Library may refer to C_TYPE.t, rather than C_TYPE.int or +C_TYPE.word, for types whose signedness isn't specified by the +standard. (For example, uid_t and gid_t are only required to be +integral types; in glibc, they happen to be unsigned.) + +When elaborating the MLB file that implements the Basis Library, we +include + + <basis>/config/c/$(TARGET_ARCH)-$(TARGET_OS)/c-types.sml + +multiple times, to rebind the C_TYPE structures to successively more +complete implementations of the ML structures. (For example, we need +C_MPLimb to implement IntInf, but we need IntInf to implement +Word32.toLargeInt. Hence, we first bind C_MPLimb to a minimal, +primitive structure, which provides enough to implement a little bit +of IntInf, which in turn provides enough to implement +Word32.toLargeInt, which we then rebind to C_MPLimb.) + +In a similar manner, we successively bind the default Int structure +via: + + <basis>/config/default/$(DEFAULT_INT) + +where the $(DEFAULT_INT) path variable denotes a file that looks +something like: + +structure Int = Int32 +type int = Int.int + +functor Int_ChooseInt (A: CHOOSE_INT_ARG) : + sig val f : Int.int A.t end = + ChooseInt_Int32 (A) + +The 'Choose' functors are the mechanism by which we ensure that the +majority of the Basis Library implemenation may be shared, while +remaining "parametric" in the primitive C types and the default ML +types. Consider, for example, the INTEGER signature: + +signature INTEGER = + sig + type int + + val fromInt: Int.int -> int + val toInt: int -> Int.int + + ... + end + +How may we efficiently implement the Int8, Int16, Int32, and Int64 +structures, when the bindings for Int<N>.{from,to}Int must be +different for the different choices of Int.int? The solution adopted +is to ensure that each "pre-implementation" of Int<N> knows how to +convert to and from each possible choice of Int.int. That is, we have + +signature PRE_INTEGER = + sig + type int + + val fromInt8: Primitive.Int8.int -> int + val fromInt16: Primitive.Int16.int -> int + val fromInt32: Primitive.Int32.int -> int + val fromInt64: Primitive.Int64.int -> int + val fromIntInf: Primitive.IntInf.int -> int + val toInt8: int -> Primitive.Int8.int + val toInt16: int -> Primitive.Int16.int + val toInt32: int -> Primitive.Int32.int + val toInt64: int -> Primitive.Int64.int + val toIntInf: int -> Primitive.IntInf.int + + ... + end + +We use a functor to convert each PRE_INTEGER to an INTEGER; within +this functor, we use the Int_ChooseInt functor to select the +appropriate conversion: + +functor Int (structure I : PRE_INTEGER) : INTEGER = + struct + type int = I.int + + local + structure S = + Int_ChooseInt + (type 'a = 'a -> int + val fInt8 = I.fromInt8 + val fInt16 = I.fromInt16 + val fInt32 = I.fromInt32 + val fInt64 = I.fromInt64 + val fIntInf = I.fromIntInf) + in + val fromInt = S.f + end + + local + structure S = + Int_ChooseInt + (type 'a = int -> 'a + val fInt8 = I.toInt8 + val fInt16 = I.toInt16 + val fInt32 = I.toInt32 + val fInt64 = I.toInt64 + val fIntInf = I.toIntInf) + in + val toInt = S.f + end + + ... +end + +The implementation of the 'Choose' functors is the obvious one: + +signature CHOOSE_INT_ARG = + sig + type 'a t + val fInt8: Int8.int t + val fInt16: Int16.int t + val fInt32: Int32.int t + val fInt64: Int64.int t + val fIntInf: IntInf.int t + end + +functor ChooseInt_Int8 (A : CHOOSE_INT_ARG) : + sig val f : Int8.int A.t end = + struct val f = A.fInt8 end +functor ChooseInt_Int16 (A : CHOOSE_INT_ARG) : + sig val f : Int16.int A.t end = + struct val f = A.fInt16 end +functor ChooseInt_Int32 (A : CHOOSE_INT_ARG) : + sig val f : Int32.int A.t end = + struct val f = A.fInt32 end +functor ChooseInt_Int64 (A : CHOOSE_INT_ARG) : + sig val f : Int64.int A.t end = + struct val f = A.fInt64 end +functor ChooseInt_IntInf (A : CHOOSE_INT_ARG) : + sig val f : IntInf.int A.t end = + struct val f = A.fIntInf end + +As a convenience mechanism, the $(DEFAULT_CHAR), $(DEFAULT_INT), +$(DEFAULT_REAL), and $(DEFAULT_WORD) path variables are set by the +compiler, and may be controlled by a compiler flag: + + -default-type type + Specify the default binding for a primitive type. For example, + '-default-type word64' causes the top-level type word and the + top-level structure Word in the Basis Library to be equal to + Word64.word and Word64:WORD, respectively. Similarly, + '-default-type intinf' causes the top-level type int and the + top-level structure Int in the Basis Library to be equal to + IntInf.int and IntInf:INTEGER, respectively. + +As should be evident from the above, we only support power-of-two +sized defaults. Also, the Basis Library specification doesn't allow +Char.char to be larger than 8bits, so '-default-type char8' is the +only option allowed for char. While '-default-int int8' is allowed, +it probably isn't a good idea to set the default integer and word +sizes to less than 32-bits, but it ought to be useful to set integers +to IntInf.int. + + +Platform Porters/Maintainers: + +Before merging the runtime and Basis Library changes in to HEAD, we +would like to ensure that things are too broken on other platforms; +I only have easy access to x86-linux and amd64-linux. + +It would be very helpful if individuals on other platforms (BSD and +Darwin and Solaris particularly) could checkout the x86_64 branch and +try to compile the runtime: + + make runtime + +I'm specifically interested in the files c-types.h and c-types.sml +(automatically copied to +basis-library/config/c/$(TARGET_ARCH)-$(TARGET_OS)/), where the sizes +and signedness of the C typedefs might be different from x86-linux. +Second, I'm interested in any constants that aren't present on +different platforms. I've been following the Single UNIX +Specification (as a superset of Posix, XOpen, and other standards). +I'm guessing that we'll have to drop a few more things to get to the +intersection of our platforms. + +Finally, the platform/* specific stuff will need to be ported. Most +of that should be straightforward, following what I've done to linux; +essentially, changed some naming schemes, discharge all the gcc +warnings, etc. Cygwin and MinGW will be the biggest challenges. Deleted: mlton/branches/on-20050822-x86_64-branch/runtime/TODO =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/TODO 2006-10-22 02:26:17 UTC (rev 4745) +++ mlton/branches/on-20050822-x86_64-branch/runtime/TODO 2006-10-22 02:33:18 UTC (rev 4746) @@ -1,60 +0,0 @@ - -* Why does hash-table use malloc/free while generational maps use mmap/munmap? - -* Use C99 <assert.h> instead of util/assert.{c,h} - - -(* make-pdf stuff; not really x86_64 specific *) -http://mlton.org/pipermail/mlton/2006-May/028840.html - + http://mlton.org/pipermail/mlton/2006-June/028866.html - -(* drop ML 'bool' from FFI and add C 'bool' *) -http://mlton.org/pipermail/mlton/2006-June/028927.html - + http://mlton.org/pipermail/mlton/2006-June/028940.html - -(* platform dependent c-types.h; change <build>/ layout *) -http://mlton.org/pipermail/mlton/2006-June/028943.html - + http://mlton.org/pipermail/mlton/2006-June/028948.html - + Revision 4665 -- build/lib/<target>/include - -(* Add basis-ffi.h to SVN; create .PHONY target to regenerate. *) -http://mlton.org/pipermail/mlton/2006-June/028946.html - + http://mlton.org/pipermail/mlton/2006-June/028947.html - -(* Real/Word primitives; could delay *) -http://mlton.org/pipermail/mlton/2006-July/028963.html - + Rename primitives to indicate that these are not bit-wise identities - Real_toWord, Real_toReal, Word_toReal - and add primitives - Real_toWord, Word_toReal - that correspond to bit-wise identities. - + Revision 4672 -- nextAfter - -(* PackWord primitives; could delay *) -http://mlton.org/pipermail/mlton/2006-May/028833.html - + http://mlton.org/pipermail/mlton-user/2004-November/000556.html - + http://mlton.org/pipermail/mlton/2004-November/026246.html - -(* Fields in GC_state *) -http://mlton.org/pipermail/mlton/2006-July/028965.html - -(* Char signedness *) -http://mlton.org/pipermail/mlton/2006-July/028970.html - + http://mlton.org/pipermail/mlton/2006-July/028982.html - -(* auto-gen GC specific runtime imports *) -http://mlton.org/pipermail/mlton/2006-July/028975.html - -Another minor thing I think we should do: - * rename arch amd64 to x86_64, to be consistent with gcc target - - - -basis/MLton/allocTooLarge.c - - - - -Revision 4658 -- convert 'int' to 'bool' by comparision with zero - -- revert when dropping 'bool' from FFI; comparision - with zero will happen on the ML side. Deleted: mlton/branches/on-20050822-x86_64-branch/runtime/gc/mltongc.txt =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/mltongc.txt 2006-10-22 02:26:17 UTC (rev 4745) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/mltongc.txt 2006-10-22 02:33:18 UTC (rev 4746) @@ -1,319 +0,0 @@ - -Notes on the MLton garbage collection system. Until the "Thoughts on -64-bits" section, a word is considered to be 32-bits. - -Garbage Collector -================= - -MLton implements a relatively simple garbage collection strategy, that -nonetheless adapts itself readily to different scenarios of memory usage. - -All ML objects (including ML execution stacks) are allocated in a -contiguous heap. The heap has the following general layout: - - --------------------------------------------------- - | old generation | to space | nursery | - --------------------------------------------------- - ^ ^ ^ ^ - start back frontier limit - -New ML objects are allocated in the nursery at the frontier. Upon -exhausting the nursery (i.e., when limit - frontier is insufficient -for the next object allocation), a garbage collection is initiated. - -It should be noted that in the absence of memory pressure, the -to-space is of zero size and the old-generation is simply the live -data from the last garbage collection. Hence, generational garbage -collection is only enabled when the program display sufficiently high -memory usage. - -In the common, non-generational scenario, a garbage collection -involves one of two major garbage collection strategies. If there is -sufficient memory to allocate a second heap of approximately the same -size as the current heap, then a Cheney Copy garbage collection is -performed. (In practice, the second heap is already allocated and the -two semi-spaces are swapped at each Cheney Copy.) If there is -insufficient memory for a second semi-space, then a Mark Compact -garbage collection is performed. - -After a Mark Compact garbage collection, or if the live ratio is low -enough, the runtime switches to a generational collection. In this -scenario, the current live data becomes the old-generation, while the -remaining space is split into the to-space and the nursery. A minor -garbage collection copies live objects from the nursery to the -beginning of to-space, thereby extending the old-generation and -shrinking the space available for the to-space and the nursery. -Eventually, the nursery becomes too small to accomodate new object -allocations, and a major garbage collection is intiated. - -The MLton garbage collector additionally supports weak pointers and -object finalizers, hash-consing (sharing) of both the entire heap and -the heap reachable from individual objects, computing the dynamic size -of objects, and provides some runtime support for profiling. - -In the sequel we will refer to pointers to objects in the ML heap as -"heap pointers". Note that a valid heap pointer is always bounded by -the start pointer and the limit pointer of the current heap. Hence, -heap pointers admit representations other than the native pointer -representation. Furthermore, precise garbage collection requires -identifying all heap pointers in ML objects. - -There are four kinds of ML objects: array, normal (fixed size), stack, -and weak. Each object has a header (currently, a 32-bit word), which -immediately precedes the object data. A heap pointer always denotes -the address following the header (i.e., the first data word); there -are no heap pointers to object interiors. - - -A header word has the following bit layout: - - 00 : 1 - 01 - 19 : type index bits - 20 - 30 : counter bits, used by mark compact GC - 31 : mark bit, used by mark compact GC - -Normal objects have the following layout: - - header word :: - (non heap-pointers)* :: - (heap pointers)* - -Note that the non heap-pointers denote a sequence of primitive data -values. These data values need not map directly to values of the -native word size. MLton's aggressive representation strategies may -pack multiple primitive values into the same native word. Likewise, a -primitive value may span multiple native words (e.g., Word64.word). - -Array objects have the following layout: - - counter word :: - length word :: - header word :: - ( (non heap-pointers)* :: (heap pointers)* )* - -The counter word is used by mark compact GC. The length word is the -number of elements in the array. Array elements have the same -individual layout as normal objects, omitting the header word. - -Stack objects have the following layout: - - header word :: - markTop pointer :: - markIndex word :: - reserved word :: - used word :: - ... reserved bytes ... - -The markTop pointer and markIndex word are used by mark compact GC. -The reserved word gives the number of bytes for the stack (before the -next ML object). The used word gives the number of bytes currently -used by the stack. The sequence of reserved bytes correspond to ML -stack frames, which will be discussed in more detail below. - -Weak objects have the following layout: - - header word :: - unused word :: - link word :: - heap-pointer - - -The type index of a header word is an index into an array, where each -element describes the layout of an object. The 19 bits available for -the type index means that there are only 2^19 different object layouts -per program. The "hello-world" program yields 37 object types in the -array, though there are only 19 distinct object types. - -The type index array is declared as follows: - - typedef enum { - ARRAY_TAG, - NORMAL_TAG, - STACK_TAG, - WEAK_TAG, - } GC_ObjectTypeTag; - - typedef struct { - GC_Ob... [truncated message content] |
|
From: Matthew F. <fl...@ml...> - 2006-10-21 19:26:17
|
Update TODO
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/TODO
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/TODO
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/TODO 2006-10-22 01:57:45 UTC (rev 4744)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/TODO 2006-10-22 02:26:17 UTC (rev 4745)
@@ -1,5 +1,4 @@
-* what type should be used for the size field in GC_heap? I'm using
- size_t currently, since that is the type needed by malloc.
+
* Why does hash-table use malloc/free while generational maps use mmap/munmap?
* Use C99 <assert.h> instead of util/assert.{c,h}
@@ -16,6 +15,7 @@
(* platform dependent c-types.h; change <build>/ layout *)
http://mlton.org/pipermail/mlton/2006-June/028943.html
+ http://mlton.org/pipermail/mlton/2006-June/028948.html
+ + Revision 4665 -- build/lib/<target>/include
(* Add basis-ffi.h to SVN; create .PHONY target to regenerate. *)
http://mlton.org/pipermail/mlton/2006-June/028946.html
@@ -54,10 +54,7 @@
-Revision 4670 -- signalsIsPending
-Revision 4665 -- build/lib/<target>/include
-
Revision 4658 -- convert 'int' to 'bool' by comparision with zero
-- revert when dropping 'bool' from FFI; comparision
with zero will happen on the ML side.
|
|
From: Matthew F. <fl...@ml...> - 2006-10-21 18:57:46
|
Don't use ML name for non-exported value; down the road, perhaps we should put in some static checks for ensuring the consistency of gcState values which are used via lookup-constants.fun
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/TODO
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/signals.h
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/TODO
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/TODO 2006-10-22 00:24:34 UTC (rev 4743)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/TODO 2006-10-22 01:57:45 UTC (rev 4744)
@@ -5,12 +5,59 @@
* Use C99 <assert.h> instead of util/assert.{c,h}
-Rename primitives to indicate that these are not bit-wise identities
- Real_toWord
- Real_toReal
- Word_toReal
-and add primitives
- Real_toWord, Word_toReal
-that correspond to bit-wise identities.
+(* make-pdf stuff; not really x86_64 specific *)
+http://mlton.org/pipermail/mlton/2006-May/028840.html
+ + http://mlton.org/pipermail/mlton/2006-June/028866.html
+(* drop ML 'bool' from FFI and add C 'bool' *)
+http://mlton.org/pipermail/mlton/2006-June/028927.html
+ + http://mlton.org/pipermail/mlton/2006-June/028940.html
+
+(* platform dependent c-types.h; change <build>/ layout *)
+http://mlton.org/pipermail/mlton/2006-June/028943.html
+ + http://mlton.org/pipermail/mlton/2006-June/028948.html
+
+(* Add basis-ffi.h to SVN; create .PHONY target to regenerate. *)
+http://mlton.org/pipermail/mlton/2006-June/028946.html
+ + http://mlton.org/pipermail/mlton/2006-June/028947.html
+
+(* Real/Word primitives; could delay *)
+http://mlton.org/pipermail/mlton/2006-July/028963.html
+ + Rename primitives to indicate that these are not bit-wise identities
+ Real_toWord, Real_toReal, Word_toReal
+ and add primitives
+ Real_toWord, Word_toReal
+ that correspond to bit-wise identities.
+ + Revision 4672 -- nextAfter
+
+(* PackWord primitives; could delay *)
+http://mlton.org/pipermail/mlton/2006-May/028833.html
+ + http://mlton.org/pipermail/mlton-user/2004-November/000556.html
+ + http://mlton.org/pipermail/mlton/2004-November/026246.html
+
+(* Fields in GC_state *)
+http://mlton.org/pipermail/mlton/2006-July/028965.html
+
+(* Char signedness *)
+http://mlton.org/pipermail/mlton/2006-July/028970.html
+ + http://mlton.org/pipermail/mlton/2006-July/028982.html
+
+(* auto-gen GC specific runtime imports *)
+http://mlton.org/pipermail/mlton/2006-July/028975.html
+
+Another minor thing I think we should do:
+ * rename arch amd64 to x86_64, to be consistent with gcc target
+
+
+
basis/MLton/allocTooLarge.c
+
+
+
+Revision 4670 -- signalsIsPending
+
+Revision 4665 -- build/lib/<target>/include
+
+Revision 4658 -- convert 'int' to 'bool' by comparision with zero
+ -- revert when dropping 'bool' from FFI; comparision
+ with zero will happen on the ML side.
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/signals.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/signals.h 2006-10-22 00:24:34 UTC (rev 4743)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/signals.h 2006-10-22 01:57:45 UTC (rev 4744)
@@ -16,7 +16,7 @@
/* TRUE iff a signal has been received but not handled by the
* mutator.
*/
- volatile Word32_t signalIsPending;
+ volatile uint32_t signalIsPending;
/* The signals for which a mutator signal handler needs to run in
* order to handle the signal.
*/
|
|
From: Matthew F. <fl...@ml...> - 2006-10-21 17:24:38
|
Use ML name for functions imported by Basis Library implementation
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c 2006-10-21 19:22:49 UTC (rev 4742)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c 2006-10-22 00:24:34 UTC (rev 4743)
@@ -244,13 +244,13 @@
writeNewline (f);
}
-void GC_profileWrite (GC_state s, GC_profileData p, const char *fileName) {
+void GC_profileWrite (GC_state s, GC_profileData p, NullString8_t fileName) {
FILE *f;
const char* kind;
if (DEBUG_PROFILE)
fprintf (stderr, "GC_profileWrite\n");
- f = fopen_safe (fileName, "wb");
+ f = fopen_safe ((const char*)fileName, "wb");
writeString (f, "MLton prof\n");
kind = "";
switch (s->profiling.kind) {
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h 2006-10-21 19:22:49 UTC (rev 4742)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h 2006-10-22 00:24:34 UTC (rev 4743)
@@ -116,7 +116,7 @@
void GC_setProfileCurrent (GC_state s, GC_profileData p);
GC_profileData GC_profileMalloc (GC_state s);
-void GC_profileWrite (GC_state s, GC_profileData p, const char *fileName);
+void GC_profileWrite (GC_state s, GC_profileData p, NullString8_t fileName);
void GC_profileFree (GC_state s, GC_profileData p);
void GC_profileDone (GC_state s);
|
|
From: Vesa K. <ve...@ml...> - 2006-10-21 12:22:51
|
Documentation.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/int-inf.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/integer.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sig
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig 2006-10-21 13:33:16 UTC (rev 4741)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig 2006-10-21 19:22:49 UTC (rev 4742)
@@ -9,7 +9,7 @@
*)
signature CHAR = sig
include CHAR
-
+
(** == Bounds == *)
val minOrd : Int.int
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sig 2006-10-21 13:33:16 UTC (rev 4741)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sig 2006-10-21 19:22:49 UTC (rev 4742)
@@ -16,7 +16,18 @@
type ('a, 'b) emb = ('a, 'b) emb
val id : ('a, 'a) emb
+ (**
+ * The identity embedding. This is always equivalent to {(fn a => a,
+ * SOME)}.
+ *)
val to : ('a, 'b) emb -> 'a -> 'b
+ (**
+ * Extracts the injection part of the given embedding.
+ *)
+
val from : ('a, 'b) emb -> 'b -> 'a option
+ (**
+ * Extracts the projection part of the given embedding.
+ *)
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/int-inf.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/int-inf.sig 2006-10-21 13:33:16 UTC (rev 4741)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/int-inf.sig 2006-10-21 19:22:49 UTC (rev 4742)
@@ -13,19 +13,53 @@
(** == Bounds == *)
val bounds : (int * int) option
+ (**
+ * Pair of the minimal and maximal integers, respectively,
+ * representable by {int}. If {minInt = NONE} and {maxInt = NONE},
+ * this is also {NONE}. Otherwise this is {SOME (valOf minInt, valOf
+ * maxInt)}.
+ *)
(** == Embeddings == *)
val embString : (int, string) emb
+ (**
+ * An embedding of integers into strings. It is always equivalent to
+ * {(toString, fromString)}.
+ *)
(** == Isomorphisms == *)
val isoInt : (int, Int.int) iso
+ (**
+ * An isomorphism between integers of type {int} and the default
+ * integer type. It is always equivalent to {(toInt, fromInt)}. Note
+ * that one of the injection and projection parts may be partial.
+ *)
+
val isoLarge : (int, LargeInt.int) iso
+ (**
+ * An isomorphism between integers of type {int} and integers of type
+ * {LargeInt.int}. It is always equivalent to {(toLarge, fromLarge)}.
+ * Note that the projection part may be partial.
+ *)
(** == Predicates == *)
val isEven : int -> bool
+ (**
+ * Returns true if the given integer is of the form {2*n} for some
+ * integer {n}.
+ *)
+
val isOdd : int -> bool
+ (**
+ * Returns true if the given integer is of the form {2*n+1} for some
+ * integer {n}.
+ *)
+
val isZero : int -> bool
+ (**
+ * Returns true if the given integer is {0}.
+ *)
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/integer.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/integer.sig 2006-10-21 13:33:16 UTC (rev 4741)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/integer.sig 2006-10-21 19:22:49 UTC (rev 4742)
@@ -13,19 +13,53 @@
(** == Bounds == *)
val bounds : (int * int) option
+ (**
+ * Pair of the minimal and maximal integers, respectively,
+ * representable by {int}. If {minInt = NONE} and {maxInt = NONE},
+ * this is also {NONE}. Otherwise this is {SOME (valOf minInt, valOf
+ * maxInt)}.
+ *)
(** == Embeddings == *)
val embString : (int, string) emb
+ (**
+ * An embedding of integers into strings. It is always equivalent to
+ * {(toString, fromString)}.
+ *)
(** == Isomorphisms == *)
val isoInt : (int, Int.int) iso
+ (**
+ * An isomorphism between integers of type {int} and the default
+ * integer type. It is always equivalent to {(toInt, fromInt)}. Note
+ * that one of the injection and projection parts may be partial.
+ *)
+
val isoLarge : (int, LargeInt.int) iso
+ (**
+ * An isomorphism between integers of type {int} and integers of type
+ * {LargeInt.int}. It is always equivalent to {(toLarge, fromLarge)}.
+ * Note that the projection part may be partial.
+ *)
(** == Predicates == *)
val isEven : int -> bool
+ (**
+ * Returns true if the given integer is of the form {2*n} for some
+ * integer {n}.
+ *)
+
val isOdd : int -> bool
+ (**
+ * Returns true if the given integer is of the form {2*n+1} for some
+ * integer {n}.
+ *)
+
val isZero : int -> bool
+ (**
+ * Returns true if the given integer is {0}.
+ *)
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sig 2006-10-21 13:33:16 UTC (rev 4741)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sig 2006-10-21 19:22:49 UTC (rev 4742)
@@ -17,7 +17,18 @@
type ('a, 'b) iso = ('a, 'b) iso
val id : ('a, 'a) iso
+ (**
+ * The identity isomorphism. This is always equivalent to {(fn a => a,
+ * fn a => a)}.
+ *)
val to : ('a, 'b) iso -> 'a -> 'b
+ (**
+ * Extracts the injection part of the given isomorphism.
+ *)
+
val from : ('a, 'b) iso -> 'b -> 'a
+ (**
+ * Extracts the projection part of the given isomorphism.
+ *)
end
|
|
From: Vesa K. <ve...@ml...> - 2006-10-21 06:33:19
|
Documentation.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/array.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/array.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/mono-array.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vector.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/readme.txt
U mltonlib/trunk/com/ssh/extended-basis/unstable/string.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sig
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/array.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/array.sig 2006-10-21 00:26:40 UTC (rev 4740)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/array.sig 2006-10-21 13:33:16 UTC (rev 4741)
@@ -13,12 +13,40 @@
(** == Conversions == *)
val fromVector : 'a vector -> 'a array
+ (**
+ * Creates a new array from the given vector. Specifically, the
+ * expression {fromVector v} is equivalent to the expression
+ *
+ *> tabulate (Vector.length v, fn i => Vector.sub (v, i))
+ *)
val toList : 'a array -> 'a list
+ (**
+ * Generates a list from the given array. Specifically, the result of
+ * {toList a} is equivalent to {foldr op :: [] a}.
+ *)
+
val toVector : 'a array -> 'a vector
+ (**
+ * Generates a vector from the given array. Specifically, the result
+ * of {toVector a} is equivalent to
+ *
+ *> Vector.tabulate (length a, fn i => sub (a, i))
+ *)
(** == Isomorphisms == *)
val isoList : ('a array, 'a list) iso
+ (**
+ * An isomorphism between arrays and lists. It is always equivalent to
+ * {(toList, fromList)}. Note that the isomorphism does not preserve
+ * identity.
+ *)
+
val isoVector : ('a array, 'a vector) iso
+ (**
+ * An isomorphism between arrays and vectors. It is always equivalent
+ * to {(toVector, fromVector)}. Note that the isomorphism does not
+ * preserve identity.
+ *)
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/array.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/array.sml 2006-10-21 00:26:40 UTC (rev 4740)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/array.sml 2006-10-21 13:33:16 UTC (rev 4741)
@@ -9,7 +9,7 @@
*)
structure Array : ARRAY = struct
open Array
- fun toList v = foldr op :: [] v
+ fun toList a = foldr op :: [] a
val isoList = (toList, fromList)
val toVector = vector
fun fromVector v = tabulate (Vector.length v, fn i => Vector.sub (v, i))
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig 2006-10-21 00:26:40 UTC (rev 4740)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig 2006-10-21 13:33:16 UTC (rev 4741)
@@ -33,7 +33,7 @@
val isoInt : (char, Int.int) iso
(**
- * The isomorphism between characters and character codes. It always
+ * An isomorphism between characters and character codes. It always
* equals {(ord, chr)}. Note that the projection part of the
* isomorphism, namely {chr}, is likely to be a partial function.
*)
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/mono-array.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mono-array.sig 2006-10-21 00:26:40 UTC (rev 4740)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mono-array.sig 2006-10-21 13:33:16 UTC (rev 4741)
@@ -13,15 +13,68 @@
(** == Conversions == *)
val fromPoly : elem Array.array -> array
+ (**
+ * Creates a new monomorphic array from the given polymorphic array.
+ * Specifically, the expression {fromPoly a} is equivalent to the
+ * expression
+ *
+ *> tabulate (Array.length a, fn i => Array.sub (a, i))
+ *)
+
val fromVector : vector -> array
+ (**
+ * Creates a new array from the given vector. Specifically, the
+ * expression {fromVector v} is equivalent to the expression
+ *
+ *> tabulate (Vector.length v, fn i => Vector.sub (v, i))
+ *)
val toList : array -> elem list
+ (**
+ * Generates a list from the given array. Specifically, the result of
+ * {toList a} is equivalent to {foldr op :: [] a}.
+ *)
+
val toPoly : array -> elem Array.array
+ (**
+ * Creates a new polymorphic array from the given monomorphic array.
+ * Specifically, the expression {toPoly a} is equivalent to the
+ * expression
+ *
+ *> Array.tabulate (length a, fn i => Array.sub (a, i))
+ *)
+
val toVector : array -> vector
+ (**
+ * Generates a vector from the given array. Specifically, the result
+ * of {toVector a} is equivalent to
+ *
+ *> MonoVector.tabulate (length a, fn i => sub (a, i))
+ *
+ * where {MonoVector} refers to the home structure of the monomorphic
+ * {vector} type.
+ *)
(** == Isomorphisms == *)
val isoList : (array, elem list) iso
+ (**
+ * An isomorphism between arrays and lists. It is always equivalent to
+ * {(toList, fromList)}. Note that the isomorphism does not preserve
+ * identity.
+ *)
+
val isoPoly : (array, elem Array.array) iso
+ (**
+ * An isomorphism between monomorphic and polymorphic arrays. It is
+ * always equivalent to {(toPoly, fromPoly)}. Note that the
+ * isomorphism does not preserve identity.
+ *)
+
val isoVector : (array, vector) iso
+ (**
+ * An isomorphism between arrays and vectors. It is always equivalent
+ * to {(toVector, fromVector)}. Note that the isomorphism does not
+ * preserve identity.
+ *)
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vector.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vector.sig 2006-10-21 00:26:40 UTC (rev 4740)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vector.sig 2006-10-21 13:33:16 UTC (rev 4741)
@@ -13,12 +13,38 @@
(** == Conversions == *)
val fromPoly : elem Vector.vector -> vector
+ (**
+ * Generates a monomorphic vector from the given polymorphic vector.
+ * Specifically, the result of {fromPoly v} is equivalent to
+ *
+ *> tabulate (Vector.length v, fn i => Vector.sub (v, i))
+ *)
val toList : vector -> elem list
+ (**
+ * Generates a list from the given vector. Specifically, the result of
+ * {toList v} is equivalent to {foldr op :: [] v}.
+ *)
+
val toPoly : vector -> elem Vector.vector
+ (**
+ * Generates a new polymorphic vector from the given monomorphic
+ * vector. Specifically, the result of {toPoly v} is equivalent to
+ *
+ *> Vector.tabulate (length v, fn i => Vector.sub (v, i))
+ *)
(** == Isomorphisms == *)
val isoList : (vector, elem list) iso
+ (**
+ * An isomorphism between vectors and lists. It is always equivalent
+ * to {(toList, fromList)}.
+ *)
+
val isoPoly : (vector, elem Vector.vector) iso
+ (**
+ * An isomorphism between monomorphic and polymorphic vectors. It is
+ * always equivalent to {(toPoly, fromPoly)}.
+ *)
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/readme.txt
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/readme.txt 2006-10-21 00:26:40 UTC (rev 4740)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/readme.txt 2006-10-21 13:33:16 UTC (rev 4741)
@@ -36,12 +36,11 @@
easier to use.
On the other hand, it probably doesn't make sense to put everything
- into such extended basis library. As a rule of thumb, things that
- naturally belong (fuzzy, yes) to specific basis library modules and
- what those things depend on should go into such an extended basis lib.
- Everything else, even if looks like stuff that could be in a basis lib,
- but there is no module in *the* basis lib for it, should go into other
- libraries.
+ into this library. As a rule of thumb, things that naturally belong
+ (fuzzy, yes) to specific basis library modules and what those things
+ depend on should go into this library. Everything else, even if looks
+ like stuff that could be in a basis library, but there is no module in
+ *the* basis library for it, should go into other libraries.
References
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/string.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/string.sig 2006-10-21 00:26:40 UTC (rev 4740)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/string.sig 2006-10-21 13:33:16 UTC (rev 4741)
@@ -13,11 +13,24 @@
(** == Embeddings == *)
val embCString : (string, string) emb
+ (**
+ * An embedding of strings into C-style string literals. It is always
+ * equivalent to {(toCString, fromCString)}.
+ *)
+
val embString : (string, string) emb
+ (**
+ * An embedding of strings into SML-style string literals. It is
+ * always equivalent to {(toString, fromString)}.
+ *)
(** == Isomorphisms == *)
val isoList : (string, char list) iso
+ (**
+ * An isomorphism between strings and lists. It is always equivalent
+ * to {(toList, fromList)}.
+ *)
(** == {MONO_VECTOR} == *)
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sig 2006-10-21 00:26:40 UTC (rev 4740)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sig 2006-10-21 13:33:16 UTC (rev 4741)
@@ -13,8 +13,16 @@
(** == Conversions == *)
val toList : 'a vector -> 'a list
+ (**
+ * Generates a list from the given vector. Specifically, the result of
+ * {toList v} is equivalent to {foldr op :: [] v}.
+ *)
(** == Isomorphisms == *)
val isoList : ('a vector, 'a list) iso
+ (**
+ * An isomorphism between vectors and lists. It is always equivalent
+ * to {(toList, fromList)}.
+ *)
end
|
|
From: Vesa K. <ve...@ml...> - 2006-10-20 17:26:50
|
Switched to emb/iso -prefixes from Emb/Iso -suffices. Prefixes seem more
consistent with the basis library style.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/array.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/array.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/int-inf.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/integer.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/mk-integer-ext.fun
U mltonlib/trunk/com/ssh/extended-basis/unstable/mk-mono-array-ext.fun
U mltonlib/trunk/com/ssh/extended-basis/unstable/mk-mono-vector-ext.fun
U mltonlib/trunk/com/ssh/extended-basis/unstable/mk-real-ext.fun
U mltonlib/trunk/com/ssh/extended-basis/unstable/mk-text-ext.fun
U mltonlib/trunk/com/ssh/extended-basis/unstable/mk-word-ext.fun
U mltonlib/trunk/com/ssh/extended-basis/unstable/mono-array.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vector.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/real.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/string.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/word.sig
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/array.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/array.sig 2006-10-20 21:22:57 UTC (rev 4739)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/array.sig 2006-10-21 00:26:40 UTC (rev 4740)
@@ -19,6 +19,6 @@
(** == Isomorphisms == *)
- val listIso : ('a array, 'a list) iso
- val vectorIso : ('a array, 'a vector) iso
+ val isoList : ('a array, 'a list) iso
+ val isoVector : ('a array, 'a vector) iso
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/array.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/array.sml 2006-10-20 21:22:57 UTC (rev 4739)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/array.sml 2006-10-21 00:26:40 UTC (rev 4740)
@@ -10,8 +10,8 @@
structure Array : ARRAY = struct
open Array
fun toList v = foldr op :: [] v
- val listIso = (toList, fromList)
+ val isoList = (toList, fromList)
val toVector = vector
fun fromVector v = tabulate (Vector.length v, fn i => Vector.sub (v, i))
- val vectorIso = (toVector, fromVector)
+ val isoVector = (toVector, fromVector)
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig 2006-10-20 21:22:57 UTC (rev 4739)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig 2006-10-21 00:26:40 UTC (rev 4740)
@@ -31,7 +31,7 @@
(** == Isomorphisms == *)
- val intIso : (char, Int.int) iso
+ val isoInt : (char, Int.int) iso
(**
* The isomorphism between characters and character codes. It always
* equals {(ord, chr)}. Note that the projection part of the
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/int-inf.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/int-inf.sig 2006-10-20 21:22:57 UTC (rev 4739)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/int-inf.sig 2006-10-21 00:26:40 UTC (rev 4740)
@@ -16,12 +16,12 @@
(** == Embeddings == *)
- val stringEmb : (int, string) emb
+ val embString : (int, string) emb
(** == Isomorphisms == *)
- val intIso : (int, Int.int) iso
- val largeIso : (int, LargeInt.int) iso
+ val isoInt : (int, Int.int) iso
+ val isoLarge : (int, LargeInt.int) iso
(** == Predicates == *)
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/integer.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/integer.sig 2006-10-20 21:22:57 UTC (rev 4739)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/integer.sig 2006-10-21 00:26:40 UTC (rev 4740)
@@ -16,12 +16,12 @@
(** == Embeddings == *)
- val stringEmb : (int, string) emb
+ val embString : (int, string) emb
(** == Isomorphisms == *)
- val intIso : (int, Int.int) iso
- val largeIso : (int, LargeInt.int) iso
+ val isoInt : (int, Int.int) iso
+ val isoLarge : (int, LargeInt.int) iso
(** == Predicates == *)
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/mk-integer-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mk-integer-ext.fun 2006-10-20 21:22:57 UTC (rev 4739)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mk-integer-ext.fun 2006-10-21 00:26:40 UTC (rev 4740)
@@ -9,9 +9,9 @@
*)
functor MkIntegerExt (I : INTEGER) = struct
open I
- val intIso = (toInt, fromInt)
- val largeIso = (toLarge, fromLarge)
- val stringEmb = (toString, fromString)
+ val embString = (toString, fromString)
+ val isoInt = (toInt, fromInt)
+ val isoLarge = (toLarge, fromLarge)
fun isZero i = fromInt 0 = i
fun isEven i = isZero (rem (i, fromInt 2))
val isOdd = not o isEven
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/mk-mono-array-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mk-mono-array-ext.fun 2006-10-20 21:22:57 UTC (rev 4739)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mk-mono-array-ext.fun 2006-10-21 00:26:40 UTC (rev 4740)
@@ -13,13 +13,13 @@
where type vector = MonoVector.vector) = struct
open MonoArray
fun toList a = foldr op :: [] a
- val listIso = (toList, fromList)
+ val isoList = (toList, fromList)
val toVector = vector
fun fromVector v =
tabulate (MonoVector.length v, fn i => MonoVector.sub (v, i))
- val vectorIso = (toVector, fromVector)
+ val isoVector = (toVector, fromVector)
fun toPoly a = Array.tabulate (length a, fn i => sub (a, i))
fun fromPoly a = tabulate (Array.length a, fn i => Array.sub (a, i))
- val polyIso = (toPoly, fromPoly)
+ val isoPoly = (toPoly, fromPoly)
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/mk-mono-vector-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mk-mono-vector-ext.fun 2006-10-20 21:22:57 UTC (rev 4739)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mk-mono-vector-ext.fun 2006-10-21 00:26:40 UTC (rev 4740)
@@ -10,9 +10,9 @@
functor MkMonoVectorExt (M : MONO_VECTOR) = struct
open M
fun toList v = foldr op :: [] v
- val listIso = (toList, fromList)
+ val isoList = (toList, fromList)
(* XXX It would be nice to avoid copying in toPoly and fromPoly *)
fun toPoly v = Vector.tabulate (length v, fn i => sub (v, i))
fun fromPoly v = tabulate (Vector.length v, fn i => Vector.sub (v, i))
- val polyIso = (toPoly, fromPoly)
+ val isoPoly = (toPoly, fromPoly)
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/mk-real-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mk-real-ext.fun 2006-10-20 21:22:57 UTC (rev 4739)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mk-real-ext.fun 2006-10-21 00:26:40 UTC (rev 4740)
@@ -10,10 +10,10 @@
functor MkRealExt (R : REAL) = struct
open R
- val decimalEmb = (toDecimal, fromDecimal)
- val intIso = (toInt IEEEReal.TO_NEAREST, fromInt)
- val largeIso = (toLarge, fromLarge IEEEReal.TO_NEAREST)
- val largeIntIso = (toLargeInt IEEEReal.TO_NEAREST, fromLargeInt)
- val manExpIso = (toManExp, fromManExp)
- val stringEmb = (toString, fromString)
+ val embDecimal = (toDecimal, fromDecimal)
+ val embString = (toString, fromString)
+ val isoInt = (toInt IEEEReal.TO_NEAREST, fromInt)
+ val isoLarge = (toLarge, fromLarge IEEEReal.TO_NEAREST)
+ val isoLargeInt = (toLargeInt IEEEReal.TO_NEAREST, fromLargeInt)
+ val isoManExp = (toManExp, fromManExp)
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/mk-text-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mk-text-ext.fun 2006-10-20 21:22:57 UTC (rev 4739)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mk-text-ext.fun 2006-10-21 00:26:40 UTC (rev 4740)
@@ -12,10 +12,10 @@
structure Char = struct
open Char
- val intIso = (ord, chr)
val minOrd = 0
val boundsChar = (minChar, maxChar)
val boundsOrd = (minOrd, maxOrd)
+ val isoInt = (ord, chr)
end
structure CharVector = MkMonoVectorExt (CharVector)
@@ -25,8 +25,8 @@
structure String = struct
open CharVector String
- val listIso = (explode, implode)
- val cStringEmb = (toCString, fromCString)
- val stringEmb = (toString, fromString)
+ val embCString = (toCString, fromCString)
+ val embString = (toString, fromString)
+ val isoList = (explode, implode)
end
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/mk-word-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mk-word-ext.fun 2006-10-20 21:22:57 UTC (rev 4739)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mk-word-ext.fun 2006-10-21 00:26:40 UTC (rev 4740)
@@ -11,14 +11,14 @@
open W
val toWord = Word.fromLarge o toLarge
val fromWord = fromLarge o Word.toLarge
- val intIso = (toInt, fromInt)
- val intXIso = (toIntX, fromInt)
- val largeIso = (toLarge, fromLarge)
- val largeIntIso = (toLargeInt, fromLargeInt)
- val largeIntXIso = (toLargeIntX, fromLargeInt)
- val largeXIso = (toLargeX, fromLarge)
- val wordIso = (toWord, fromWord)
- val stringEmb = (toString, fromString)
+ val embString = (toString, fromString)
+ val isoInt = (toInt, fromInt)
+ val isoIntX = (toIntX, fromInt)
+ val isoLarge = (toLarge, fromLarge)
+ val isoLargeInt = (toLargeInt, fromLargeInt)
+ val isoLargeIntX = (toLargeIntX, fromLargeInt)
+ val isoLargeX = (toLargeX, fromLarge)
+ val isoWord = (toWord, fromWord)
fun isZero w = fromInt 0 = w
fun isEven w = isZero (andb (fromInt 1, w))
val isOdd = not o isEven
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/mono-array.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mono-array.sig 2006-10-20 21:22:57 UTC (rev 4739)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mono-array.sig 2006-10-21 00:26:40 UTC (rev 4740)
@@ -21,7 +21,7 @@
(** == Isomorphisms == *)
- val listIso : (array, elem list) iso
- val polyIso : (array, elem Array.array) iso
- val vectorIso : (array, vector) iso
+ val isoList : (array, elem list) iso
+ val isoPoly : (array, elem Array.array) iso
+ val isoVector : (array, vector) iso
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vector.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vector.sig 2006-10-20 21:22:57 UTC (rev 4739)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vector.sig 2006-10-21 00:26:40 UTC (rev 4740)
@@ -19,6 +19,6 @@
(** == Isomorphisms == *)
- val listIso : (vector, elem list) iso
- val polyIso : (vector, elem Vector.vector) iso
+ val isoList : (vector, elem list) iso
+ val isoPoly : (vector, elem Vector.vector) iso
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/real.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/real.sig 2006-10-20 21:22:57 UTC (rev 4739)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/real.sig 2006-10-21 00:26:40 UTC (rev 4740)
@@ -12,13 +12,13 @@
(** == Embeddings == *)
- val decimalEmb : (real, IEEEReal.decimal_approx) emb
- val stringEmb : (real, string) emb
+ val embDecimal : (real, IEEEReal.decimal_approx) emb
+ val embString : (real, string) emb
(** == Isomorphisms == *)
- val intIso : (real, Int.int) iso
- val largeIntIso : (real, LargeInt.int) iso
- val largeIso : (real, LargeReal.real) iso
- val manExpIso : (real, {man : real, exp : int}) iso
+ val isoInt : (real, Int.int) iso
+ val isoLarge : (real, LargeReal.real) iso
+ val isoLargeInt : (real, LargeInt.int) iso
+ val isoManExp : (real, {man : real, exp : int}) iso
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/string.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/string.sig 2006-10-20 21:22:57 UTC (rev 4739)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/string.sig 2006-10-21 00:26:40 UTC (rev 4740)
@@ -12,12 +12,12 @@
(** == Embeddings == *)
- val cStringEmb : (string, string) emb
- val stringEmb : (string, string) emb
+ val embCString : (string, string) emb
+ val embString : (string, string) emb
(** == Isomorphisms == *)
- val listIso : (string, char list) iso
+ val isoList : (string, char list) iso
(** == {MONO_VECTOR} == *)
@@ -36,10 +36,10 @@
val foldri : (int * elem * 'a -> 'a) -> 'a -> vector -> 'a
val fromList : elem list -> vector
val fromPoly : elem Vector.vector -> vector
+ val isoPoly : (vector, elem Vector.vector) iso
val length : vector -> int
val mapi : (int * elem -> elem) -> vector -> vector
val maxLen : int
- val polyIso : (vector, elem Vector.vector) iso
val tabulate : int * (int -> elem) -> vector
val toList : vector -> elem list
val toPoly : vector -> elem Vector.vector
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sig 2006-10-20 21:22:57 UTC (rev 4739)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sig 2006-10-21 00:26:40 UTC (rev 4740)
@@ -16,5 +16,5 @@
(** == Isomorphisms == *)
- val listIso : ('a vector, 'a list) iso
+ val isoList : ('a vector, 'a list) iso
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sml 2006-10-20 21:22:57 UTC (rev 4739)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sml 2006-10-21 00:26:40 UTC (rev 4740)
@@ -10,5 +10,5 @@
structure Vector : VECTOR = struct
open Vector
fun toList v = foldr op :: [] v
- val listIso = (toList, fromList)
+ val isoList = (toList, fromList)
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/word.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/word.sig 2006-10-20 21:22:57 UTC (rev 4739)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/word.sig 2006-10-21 00:26:40 UTC (rev 4740)
@@ -24,17 +24,17 @@
(** == Embeddings == *)
- val stringEmb : (word, string) emb
+ val embString : (word, string) emb
(** == Isomorphisms == *)
- val intIso : (word, Int.int) iso
- val intXIso : (word, Int.int) iso
- val largeIntIso : (word, LargeInt.int) iso
- val largeIntXIso : (word, LargeInt.int) iso
- val largeIso : (word, LargeWord.word) iso
- val largeXIso : (word, LargeWord.word) iso
- val wordIso : (word, Word.word) iso
+ val isoInt : (word, Int.int) iso
+ val isoIntX : (word, Int.int) iso
+ val isoLarge : (word, LargeWord.word) iso
+ val isoLargeInt : (word, LargeInt.int) iso
+ val isoLargeIntX : (word, LargeInt.int) iso
+ val isoLargeX : (word, LargeWord.word) iso
+ val isoWord : (word, Word.word) iso
(** == Predicates == *)
|
|
From: Vesa K. <ve...@ml...> - 2006-10-20 14:23:08
|
Switched indentation style.
Separated emb.sig from emb.sml and iso.sig from iso.sml.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/array.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/array.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/basis.mlb
U mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig
A mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/int-inf.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/integer.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/ints-mlton.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/mk-int-inf-ext.fun
U mltonlib/trunk/com/ssh/extended-basis/unstable/mk-integer-ext.fun
U mltonlib/trunk/com/ssh/extended-basis/unstable/mk-mono-array-ext.fun
U mltonlib/trunk/com/ssh/extended-basis/unstable/mk-mono-vector-ext.fun
U mltonlib/trunk/com/ssh/extended-basis/unstable/mk-real-ext.fun
U mltonlib/trunk/com/ssh/extended-basis/unstable/mk-text-ext.fun
U mltonlib/trunk/com/ssh/extended-basis/unstable/mk-word-ext.fun
U mltonlib/trunk/com/ssh/extended-basis/unstable/mono-array.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vector.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vectors-mlton.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/real.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/string.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/text.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/word.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/words-mlton.sml
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/array.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/array.sig 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/array.sig 2006-10-20 21:22:57 UTC (rev 4739)
@@ -7,19 +7,18 @@
(**
* Extended {ARRAY} signature.
*)
-signature ARRAY =
- sig
- include ARRAY
+signature ARRAY = sig
+ include ARRAY
- (** == Conversions == *)
+ (** == Conversions == *)
- val fromVector : 'a vector -> 'a array
+ val fromVector : 'a vector -> 'a array
- val toList : 'a array -> 'a list
- val toVector : 'a array -> 'a vector
+ val toList : 'a array -> 'a list
+ val toVector : 'a array -> 'a vector
- (** == Isomorphisms == *)
+ (** == Isomorphisms == *)
- val listIso : ('a array, 'a list) iso
- val vectorIso : ('a array, 'a vector) iso
- end
+ val listIso : ('a array, 'a list) iso
+ val vectorIso : ('a array, 'a vector) iso
+end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/array.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/array.sml 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/array.sml 2006-10-20 21:22:57 UTC (rev 4739)
@@ -7,13 +7,11 @@
(**
* Extended {Array :> ARRAY} structure.
*)
-
-structure Array : ARRAY =
- struct
- open Array
- fun toList v = foldr op :: [] v
- val listIso = (toList, fromList)
- val toVector = vector
- fun fromVector v = tabulate (Vector.length v, fn i => Vector.sub (v, i))
- val vectorIso = (toVector, fromVector)
- end
+structure Array : ARRAY = struct
+ open Array
+ fun toList v = foldr op :: [] v
+ val listIso = (toList, fromList)
+ val toVector = vector
+ fun fromVector v = tabulate (Vector.length v, fn i => Vector.sub (v, i))
+ val vectorIso = (toVector, fromVector)
+end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/basis.mlb
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/basis.mlb 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/basis.mlb 2006-10-20 21:22:57 UTC (rev 4739)
@@ -12,7 +12,9 @@
$(SML_LIB)/basis/basis.mlb
(* New {Iso :> ISO} and {Emb :> EMB} modules *)
+ iso.sig
iso.sml
+ emb.sig
emb.sml
(* Extended integer modules *)
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig 2006-10-20 21:22:57 UTC (rev 4739)
@@ -7,35 +7,34 @@
(**
* Extended {CHAR} signature.
*)
-signature CHAR =
- sig
- include CHAR
+signature CHAR = sig
+ include CHAR
+
+ (** == Bounds == *)
- (** == Bounds == *)
+ val minOrd : Int.int
+ (**
+ * The least character code. It always equals {0}.
+ *)
- val minOrd : Int.int
- (**
- * The least character code. It always equals {0}.
- *)
+ val boundsChar : char * char
+ (**
+ * Pair of the least and greatest characters. It always equals
+ * {(minChar, maxChar)}.
+ *)
- val boundsChar : char * char
- (**
- * Pair of the least and greatest characters. It always equals
- * {(minChar, maxChar)}.
- *)
+ val boundsOrd : Int.int * Int.int
+ (**
+ * Pair of the least and greatest character codes. It always equals
+ * {(minOrd, maxOrd)}.
+ *)
- val boundsOrd : Int.int * Int.int
- (**
- * Pair of the least and greatest character codes. It always equals
- * {(minOrd, maxOrd)}.
- *)
+ (** == Isomorphisms == *)
- (** == Isomorphisms == *)
-
- val intIso : (char, Int.int) iso
- (**
- * The isomorphism between characters and character codes. It
- * always equals {(ord, chr)}. Note that the projection part of the
- * isomorphism, namely {chr}, is likely to be a partial function.
- *)
- end
+ val intIso : (char, Int.int) iso
+ (**
+ * The isomorphism between characters and character codes. It always
+ * equals {(ord, chr)}. Note that the projection part of the
+ * isomorphism, namely {chr}, is likely to be a partial function.
+ *)
+end
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sig (from rev 4738, mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sml)
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sml 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sig 2006-10-20 21:22:57 UTC (rev 4739)
@@ -0,0 +1,22 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+type ('a, 'b) emb = ('a -> 'b) * ('b -> 'a option)
+(**
+ * Embedding of {'a} into {'b} with injection and projection functions.
+ *)
+
+(**
+ * Signature for the {Emb} structure for embeddings.
+ *)
+signature EMB = sig
+ type ('a, 'b) emb = ('a, 'b) emb
+
+ val id : ('a, 'a) emb
+
+ val to : ('a, 'b) emb -> 'a -> 'b
+ val from : ('a, 'b) emb -> 'b -> 'a option
+end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sml 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sml 2006-10-20 21:22:57 UTC (rev 4739)
@@ -5,27 +5,13 @@
*)
(**
- * Utility module for dealing with embeddings.
+ * Structure for embeddings.
*)
+structure Emb :> EMB = struct
+ type ('a, 'b) emb = ('a, 'b) emb
-signature EMB =
- sig
- type ('a, 'b) emb = ('a -> 'b) * ('b -> 'a option)
+ val id = (fn a => a, SOME)
- val id : ('a, 'a) emb
-
- val to : ('a, 'b) emb -> 'a -> 'b
- val from : ('a, 'b) emb -> 'b -> 'a option
- end
-
-structure Emb :> EMB =
- struct
- type ('a, 'b) emb = ('a -> 'b) * ('b -> 'a option)
-
- val id = (fn a => a, SOME)
-
- fun to (a2b, _) = a2b
- fun from (_, b2a) = b2a
- end
-
-type ('a, 'b) emb = ('a, 'b) Emb.emb
+ fun to (a2b, _) = a2b
+ fun from (_, b2a) = b2a
+end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/int-inf.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/int-inf.sig 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/int-inf.sig 2006-10-20 21:22:57 UTC (rev 4739)
@@ -7,26 +7,25 @@
(**
* Extended {INT_INF} signature.
*)
-signature INT_INF =
- sig
- include INT_INF
+signature INT_INF = sig
+ include INT_INF
- (** == Bounds == *)
+ (** == Bounds == *)
- val bounds : (int * int) option
+ val bounds : (int * int) option
- (** == Embeddings == *)
+ (** == Embeddings == *)
- val stringEmb : (int, string) emb
+ val stringEmb : (int, string) emb
- (** == Isomorphisms == *)
+ (** == Isomorphisms == *)
- val intIso : (int, Int.int) iso
- val largeIso : (int, LargeInt.int) iso
+ val intIso : (int, Int.int) iso
+ val largeIso : (int, LargeInt.int) iso
- (** == Predicates == *)
+ (** == Predicates == *)
- val isEven : int -> bool
- val isOdd : int -> bool
- val isZero : int -> bool
- end
+ val isEven : int -> bool
+ val isOdd : int -> bool
+ val isZero : int -> bool
+end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/integer.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/integer.sig 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/integer.sig 2006-10-20 21:22:57 UTC (rev 4739)
@@ -7,26 +7,25 @@
(**
* Extended {INTEGER} signature.
*)
-signature INTEGER =
- sig
- include INTEGER
+signature INTEGER = sig
+ include INTEGER
- (** == Bounds == *)
+ (** == Bounds == *)
- val bounds : (int * int) option
+ val bounds : (int * int) option
- (** == Embeddings == *)
+ (** == Embeddings == *)
- val stringEmb : (int, string) emb
+ val stringEmb : (int, string) emb
- (** == Isomorphisms == *)
+ (** == Isomorphisms == *)
- val intIso : (int, Int.int) iso
- val largeIso : (int, LargeInt.int) iso
+ val intIso : (int, Int.int) iso
+ val largeIso : (int, LargeInt.int) iso
- (** == Predicates == *)
+ (** == Predicates == *)
- val isEven : int -> bool
- val isOdd : int -> bool
- val isZero : int -> bool
- end
+ val isEven : int -> bool
+ val isOdd : int -> bool
+ val isZero : int -> bool
+end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/ints-mlton.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/ints-mlton.sml 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/ints-mlton.sml 2006-10-20 21:22:57 UTC (rev 4739)
@@ -6,7 +6,7 @@
(** == Extended {INTEGER} and {INT_INF} modules for MLton == *)
-structure Int : INTEGER = MkIntegerExt (Int)
+structure Int : INTEGER = MkIntegerExt (Int)
structure FixedInt : INTEGER = MkIntegerExt (FixedInt)
structure LargeInt : INTEGER = MkIntegerExt (LargeInt)
structure Position : INTEGER = MkIntegerExt (Position)
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sig (from rev 4738, mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sml)
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sml 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sig 2006-10-20 21:22:57 UTC (rev 4739)
@@ -0,0 +1,23 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+type ('a, 'b) iso = ('a -> 'b) * ('b -> 'a)
+(**
+ * Isomorphism between {'a} and {'b} with injection and projection
+ * functions.
+ *)
+
+(**
+ * Signature for the {Iso} structure for isomorphisms.
+ *)
+signature ISO = sig
+ type ('a, 'b) iso = ('a, 'b) iso
+
+ val id : ('a, 'a) iso
+
+ val to : ('a, 'b) iso -> 'a -> 'b
+ val from : ('a, 'b) iso -> 'b -> 'a
+end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sml 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sml 2006-10-20 21:22:57 UTC (rev 4739)
@@ -5,27 +5,13 @@
*)
(**
- * Utility module for dealing with isomorphisms.
+ * Structure for isomorphisms.
*)
+structure Iso :> ISO = struct
+ type ('a, 'b) iso = ('a, 'b) iso
-signature ISO =
- sig
- type ('a, 'b) iso = ('a -> 'b) * ('b -> 'a)
+ val id = (fn a => a, fn a => a)
- val id : ('a, 'a) iso
-
- val to : ('a, 'b) iso -> 'a -> 'b
- val from : ('a, 'b) iso -> 'b -> 'a
- end
-
-structure Iso :> ISO =
- struct
- type ('a, 'b) iso = ('a -> 'b) * ('b -> 'a)
-
- val id = (fn a => a, fn a => a)
-
- fun to (a2b, _) = a2b
- fun from (_, b2a) = b2a
- end
-
-type ('a, 'b) iso = ('a, 'b) Iso.iso
+ fun to (a2b, _) = a2b
+ fun from (_, b2a) = b2a
+end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/mk-int-inf-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mk-int-inf-ext.fun 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mk-int-inf-ext.fun 2006-10-20 21:22:57 UTC (rev 4739)
@@ -7,12 +7,10 @@
(**
* Functor for extending {INT_INF} modules.
*)
-
-functor MkIntInfExt (I : INT_INF) =
- let
+functor MkIntInfExt (I : INT_INF) = struct
+ local
structure E = MkIntegerExt (I)
in
- struct
- open E I
- end
+ open E I
end
+end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/mk-integer-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mk-integer-ext.fun 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mk-integer-ext.fun 2006-10-20 21:22:57 UTC (rev 4739)
@@ -7,18 +7,16 @@
(**
* Functor for extending {INTEGER} modules.
*)
-
-functor MkIntegerExt (I : INTEGER) =
- struct
- open I
- val intIso = (toInt, fromInt)
- val largeIso = (toLarge, fromLarge)
- val stringEmb = (toString, fromString)
- fun isZero i = fromInt 0 = i
- fun isEven i = isZero (rem (i, fromInt 2))
- val isOdd = not o isEven
- val bounds = case (minInt, maxInt) of
- (NONE, NONE) => NONE
- | (SOME min, SOME max) => SOME (min, max)
- | _ => raise Fail "impossible"
- end
+functor MkIntegerExt (I : INTEGER) = struct
+ open I
+ val intIso = (toInt, fromInt)
+ val largeIso = (toLarge, fromLarge)
+ val stringEmb = (toString, fromString)
+ fun isZero i = fromInt 0 = i
+ fun isEven i = isZero (rem (i, fromInt 2))
+ val isOdd = not o isEven
+ val bounds = case (minInt, maxInt) of
+ (NONE, NONE) => NONE
+ | (SOME min, SOME max) => SOME (min, max)
+ | _ => raise Fail "impossible"
+end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/mk-mono-array-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mk-mono-array-ext.fun 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mk-mono-array-ext.fun 2006-10-20 21:22:57 UTC (rev 4739)
@@ -7,21 +7,19 @@
(**
* Functor for extending {MONO_ARRAY} modules.
*)
-
functor MkMonoArrayExt (structure MonoVector : MONO_VECTOR
structure MonoArray : MONO_ARRAY
where type elem = MonoVector.elem
- where type vector = MonoVector.vector) =
- struct
- open MonoArray
- fun toList a = foldr op :: [] a
- val listIso = (toList, fromList)
- val toVector = vector
- fun fromVector v =
- tabulate (MonoVector.length v, fn i => MonoVector.sub (v, i))
- val vectorIso = (toVector, fromVector)
- fun toPoly a = Array.tabulate (length a, fn i => sub (a, i))
- fun fromPoly a = tabulate (Array.length a, fn i => Array.sub (a, i))
- val polyIso = (toPoly, fromPoly)
- end
+ where type vector = MonoVector.vector) = struct
+ open MonoArray
+ fun toList a = foldr op :: [] a
+ val listIso = (toList, fromList)
+ val toVector = vector
+ fun fromVector v =
+ tabulate (MonoVector.length v, fn i => MonoVector.sub (v, i))
+ val vectorIso = (toVector, fromVector)
+ fun toPoly a = Array.tabulate (length a, fn i => sub (a, i))
+ fun fromPoly a = tabulate (Array.length a, fn i => Array.sub (a, i))
+ val polyIso = (toPoly, fromPoly)
+end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/mk-mono-vector-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mk-mono-vector-ext.fun 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mk-mono-vector-ext.fun 2006-10-20 21:22:57 UTC (rev 4739)
@@ -7,14 +7,12 @@
(**
* Functor for extending {MONO_VECTOR} modules.
*)
-
-functor MkMonoVectorExt (M : MONO_VECTOR) =
- struct
- open M
- fun toList v = foldr op :: [] v
- val listIso = (toList, fromList)
- (* XXX It would be nice to avoid copying in toPoly and fromPoly *)
- fun toPoly v = Vector.tabulate (length v, fn i => sub (v, i))
- fun fromPoly v = tabulate (Vector.length v, fn i => Vector.sub (v, i))
- val polyIso = (toPoly, fromPoly)
- end
+functor MkMonoVectorExt (M : MONO_VECTOR) = struct
+ open M
+ fun toList v = foldr op :: [] v
+ val listIso = (toList, fromList)
+ (* XXX It would be nice to avoid copying in toPoly and fromPoly *)
+ fun toPoly v = Vector.tabulate (length v, fn i => sub (v, i))
+ fun fromPoly v = tabulate (Vector.length v, fn i => Vector.sub (v, i))
+ val polyIso = (toPoly, fromPoly)
+end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/mk-real-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mk-real-ext.fun 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mk-real-ext.fun 2006-10-20 21:22:57 UTC (rev 4739)
@@ -8,13 +8,12 @@
* Functor for extending {REAL} modules.
*)
-functor MkRealExt (R : REAL) =
- struct
- open R
- val decimalEmb = (toDecimal, fromDecimal)
- val intIso = (toInt IEEEReal.TO_NEAREST, fromInt)
- val largeIso = (toLarge, fromLarge IEEEReal.TO_NEAREST)
- val largeIntIso = (toLargeInt IEEEReal.TO_NEAREST, fromLargeInt)
- val manExpIso = (toManExp, fromManExp)
- val stringEmb = (toString, fromString)
- end
+functor MkRealExt (R : REAL) = struct
+ open R
+ val decimalEmb = (toDecimal, fromDecimal)
+ val intIso = (toInt IEEEReal.TO_NEAREST, fromInt)
+ val largeIso = (toLarge, fromLarge IEEEReal.TO_NEAREST)
+ val largeIntIso = (toLargeInt IEEEReal.TO_NEAREST, fromLargeInt)
+ val manExpIso = (toManExp, fromManExp)
+ val stringEmb = (toString, fromString)
+end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/mk-text-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mk-text-ext.fun 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mk-text-ext.fun 2006-10-20 21:22:57 UTC (rev 4739)
@@ -7,30 +7,26 @@
(**
* Functor for extending {TEXT} modules.
*)
+functor MkTextExt (T : TEXT) = struct
+ open T
-functor MkTextExt (T : TEXT) =
- struct
- open T
+ structure Char = struct
+ open Char
+ val intIso = (ord, chr)
+ val minOrd = 0
+ val boundsChar = (minChar, maxChar)
+ val boundsOrd = (minOrd, maxOrd)
+ end
- structure Char =
- struct
- open Char
- val intIso = (ord, chr)
- val minOrd = 0
- val boundsChar = (minChar, maxChar)
- val boundsOrd = (minOrd, maxOrd)
- end
+ structure CharVector = MkMonoVectorExt (CharVector)
+ structure CharArray =
+ MkMonoArrayExt (structure MonoArray = CharArray
+ structure MonoVector = CharVector)
- structure CharVector = MkMonoVectorExt (CharVector)
- structure CharArray =
- MkMonoArrayExt (structure MonoArray = CharArray
- structure MonoVector = CharVector)
-
- structure String =
- struct
- open CharVector String
- val listIso = (explode, implode)
- val cStringEmb = (toCString, fromCString)
- val stringEmb = (toString, fromString)
- end
+ structure String = struct
+ open CharVector String
+ val listIso = (explode, implode)
+ val cStringEmb = (toCString, fromCString)
+ val stringEmb = (toString, fromString)
end
+end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/mk-word-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mk-word-ext.fun 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mk-word-ext.fun 2006-10-20 21:22:57 UTC (rev 4739)
@@ -7,22 +7,20 @@
(**
* Functor for extending {WORD} modules.
*)
-
-functor MkWordExt (W : WORD) =
- struct
- open W
- val toWord = Word.fromLarge o toLarge
- val fromWord = fromLarge o Word.toLarge
- val intIso = (toInt, fromInt)
- val intXIso = (toIntX, fromInt)
- val largeIso = (toLarge, fromLarge)
- val largeIntIso = (toLargeInt, fromLargeInt)
- val largeIntXIso = (toLargeIntX, fromLargeInt)
- val largeXIso = (toLargeX, fromLarge)
- val wordIso = (toWord, fromWord)
- val stringEmb = (toString, fromString)
- fun isZero w = fromInt 0 = w
- fun isEven w = isZero (andb (fromInt 1, w))
- val isOdd = not o isEven
- val bounds as (minWord, maxWord) = (fromInt 0, fromInt~1)
- end
+functor MkWordExt (W : WORD) = struct
+ open W
+ val toWord = Word.fromLarge o toLarge
+ val fromWord = fromLarge o Word.toLarge
+ val intIso = (toInt, fromInt)
+ val intXIso = (toIntX, fromInt)
+ val largeIso = (toLarge, fromLarge)
+ val largeIntIso = (toLargeInt, fromLargeInt)
+ val largeIntXIso = (toLargeIntX, fromLargeInt)
+ val largeXIso = (toLargeX, fromLarge)
+ val wordIso = (toWord, fromWord)
+ val stringEmb = (toString, fromString)
+ fun isZero w = fromInt 0 = w
+ fun isEven w = isZero (andb (fromInt 1, w))
+ val isOdd = not o isEven
+ val bounds as (minWord, maxWord) = (fromInt 0, fromInt~1)
+end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/mono-array.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mono-array.sig 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mono-array.sig 2006-10-20 21:22:57 UTC (rev 4739)
@@ -7,22 +7,21 @@
(**
* Extended {MONO_ARRAY} signature.
*)
-signature MONO_ARRAY =
- sig
- include MONO_ARRAY
+signature MONO_ARRAY = sig
+ include MONO_ARRAY
- (** == Conversions == *)
+ (** == Conversions == *)
- val fromPoly : elem Array.array -> array
- val fromVector : vector -> array
+ val fromPoly : elem Array.array -> array
+ val fromVector : vector -> array
- val toList : array -> elem list
- val toPoly : array -> elem Array.array
- val toVector : array -> vector
+ val toList : array -> elem list
+ val toPoly : array -> elem Array.array
+ val toVector : array -> vector
- (** == Isomorphisms == *)
+ (** == Isomorphisms == *)
- val listIso : (array, elem list) iso
- val polyIso : (array, elem Array.array) iso
- val vectorIso : (array, vector) iso
- end
+ val listIso : (array, elem list) iso
+ val polyIso : (array, elem Array.array) iso
+ val vectorIso : (array, vector) iso
+end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vector.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vector.sig 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vector.sig 2006-10-20 21:22:57 UTC (rev 4739)
@@ -7,19 +7,18 @@
(**
* Extended {MONO_VECTOR} signature.
*)
-signature MONO_VECTOR =
- sig
- include MONO_VECTOR
+signature MONO_VECTOR = sig
+ include MONO_VECTOR
- (** == Conversions == *)
+ (** == Conversions == *)
- val fromPoly : elem Vector.vector -> vector
+ val fromPoly : elem Vector.vector -> vector
- val toList : vector -> elem list
- val toPoly : vector -> elem Vector.vector
+ val toList : vector -> elem list
+ val toPoly : vector -> elem Vector.vector
- (** == Isomorphisms *)
+ (** == Isomorphisms == *)
- val listIso : (vector, elem list) iso
- val polyIso : (vector, elem Vector.vector) iso
- end
+ val listIso : (vector, elem list) iso
+ val polyIso : (vector, elem Vector.vector) iso
+end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vectors-mlton.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vectors-mlton.sml 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vectors-mlton.sml 2006-10-20 21:22:57 UTC (rev 4739)
@@ -8,21 +8,21 @@
structure BoolVector : MONO_VECTOR = MkMonoVectorExt (BoolVector)
-structure IntVector : MONO_VECTOR = MkMonoVectorExt (IntVector)
+structure IntVector : MONO_VECTOR = MkMonoVectorExt (IntVector)
structure LargeIntVector : MONO_VECTOR = MkMonoVectorExt (LargeIntVector)
-structure Int8Vector : MONO_VECTOR = MkMonoVectorExt (Int8Vector)
-structure Int16Vector : MONO_VECTOR = MkMonoVectorExt (Int16Vector)
-structure Int32Vector : MONO_VECTOR = MkMonoVectorExt (Int32Vector)
-structure Int64Vector : MONO_VECTOR = MkMonoVectorExt (Int64Vector)
+structure Int8Vector : MONO_VECTOR = MkMonoVectorExt (Int8Vector)
+structure Int16Vector : MONO_VECTOR = MkMonoVectorExt (Int16Vector)
+structure Int32Vector : MONO_VECTOR = MkMonoVectorExt (Int32Vector)
+structure Int64Vector : MONO_VECTOR = MkMonoVectorExt (Int64Vector)
-structure RealVector : MONO_VECTOR = MkMonoVectorExt (RealVector)
+structure RealVector : MONO_VECTOR = MkMonoVectorExt (RealVector)
structure LargeRealVector : MONO_VECTOR = MkMonoVectorExt (LargeRealVector)
-structure Real32Vector : MONO_VECTOR = MkMonoVectorExt (Real32Vector)
-structure Real64Vector : MONO_VECTOR = MkMonoVectorExt (Real64Vector)
+structure Real32Vector : MONO_VECTOR = MkMonoVectorExt (Real32Vector)
+structure Real64Vector : MONO_VECTOR = MkMonoVectorExt (Real64Vector)
-structure WordVector : MONO_VECTOR = MkMonoVectorExt (WordVector)
+structure WordVector : MONO_VECTOR = MkMonoVectorExt (WordVector)
structure LargeWordVector : MONO_VECTOR = MkMonoVectorExt (LargeWordVector)
-structure Word8Vector : MONO_VECTOR = MkMonoVectorExt (Word8Vector)
-structure Word16Vector : MONO_VECTOR = MkMonoVectorExt (Word16Vector)
-structure Word32Vector : MONO_VECTOR = MkMonoVectorExt (Word32Vector)
-structure Word64Vector : MONO_VECTOR = MkMonoVectorExt (Word64Vector)
+structure Word8Vector : MONO_VECTOR = MkMonoVectorExt (Word8Vector)
+structure Word16Vector : MONO_VECTOR = MkMonoVectorExt (Word16Vector)
+structure Word32Vector : MONO_VECTOR = MkMonoVectorExt (Word32Vector)
+structure Word64Vector : MONO_VECTOR = MkMonoVectorExt (Word64Vector)
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/real.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/real.sig 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/real.sig 2006-10-20 21:22:57 UTC (rev 4739)
@@ -7,19 +7,18 @@
(**
* Extended {REAL} signature.
*)
-signature REAL =
- sig
- include REAL
+signature REAL = sig
+ include REAL
- (** == Embeddings == *)
+ (** == Embeddings == *)
- val decimalEmb : (real, IEEEReal.decimal_approx) emb
- val stringEmb : (real, string) emb
+ val decimalEmb : (real, IEEEReal.decimal_approx) emb
+ val stringEmb : (real, string) emb
- (** == Isomorphisms == *)
+ (** == Isomorphisms == *)
- val intIso : (real, Int.int) iso
- val largeIntIso : (real, LargeInt.int) iso
- val largeIso : (real, LargeReal.real) iso
- val manExpIso : (real, {man : real, exp : int}) iso
- end
+ val intIso : (real, Int.int) iso
+ val largeIntIso : (real, LargeInt.int) iso
+ val largeIso : (real, LargeReal.real) iso
+ val manExpIso : (real, {man : real, exp : int}) iso
+end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/string.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/string.sig 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/string.sig 2006-10-20 21:22:57 UTC (rev 4739)
@@ -7,42 +7,41 @@
(**
* Extended {STRING} signature.
*)
-signature STRING =
- sig
- include STRING
+signature STRING = sig
+ include STRING
- (** == Embeddings == *)
+ (** == Embeddings == *)
- val cStringEmb : (string, string) emb
- val stringEmb : (string, string) emb
+ val cStringEmb : (string, string) emb
+ val stringEmb : (string, string) emb
- (** == Isomorphisms == *)
+ (** == Isomorphisms == *)
- val listIso : (string, char list) iso
+ val listIso : (string, char list) iso
- (** == {MONO_VECTOR} == *)
+ (** == {MONO_VECTOR} == *)
- type elem = char
- type vector = string
+ type elem = char
+ type vector = string
- val all : (elem -> bool) -> vector -> bool
- val app : (elem -> unit) -> vector -> unit
- val appi : (int * elem -> unit) -> vector -> unit
- val exists : (elem -> bool) -> vector -> bool
- val find : (elem -> bool) -> vector -> elem option
- val findi : (int * elem -> bool) -> vector -> (int * elem) option
- val foldl : (elem * 'a -> 'a) -> 'a -> vector -> 'a
- val foldli : (int * elem * 'a -> 'a) -> 'a -> vector -> 'a
- val foldr : (elem * 'a -> 'a) -> 'a -> vector -> 'a
- val foldri : (int * elem * 'a -> 'a) -> 'a -> vector -> 'a
- val fromList : elem list -> vector
- val fromPoly : elem Vector.vector -> vector
- val length : vector -> int
- val mapi : (int * elem -> elem) -> vector -> vector
- val maxLen : int
- val polyIso : (vector, elem Vector.vector) iso
- val tabulate : int * (int -> elem) -> vector
- val toList : vector -> elem list
- val toPoly : vector -> elem Vector.vector
- val update : vector * int * elem -> vector
- end
+ val all : (elem -> bool) -> vector -> bool
+ val app : (elem -> unit) -> vector -> unit
+ val appi : (int * elem -> unit) -> vector -> unit
+ val exists : (elem -> bool) -> vector -> bool
+ val find : (elem -> bool) -> vector -> elem option
+ val findi : (int * elem -> bool) -> vector -> (int * elem) option
+ val foldl : (elem * 'a -> 'a) -> 'a -> vector -> 'a
+ val foldli : (int * elem * 'a -> 'a) -> 'a -> vector -> 'a
+ val foldr : (elem * 'a -> 'a) -> 'a -> vector -> 'a
+ val foldri : (int * elem * 'a -> 'a) -> 'a -> vector -> 'a
+ val fromList : elem list -> vector
+ val fromPoly : elem Vector.vector -> vector
+ val length : vector -> int
+ val mapi : (int * elem -> elem) -> vector -> vector
+ val maxLen : int
+ val polyIso : (vector, elem Vector.vector) iso
+ val tabulate : int * (int -> elem) -> vector
+ val toList : vector -> elem list
+ val toPoly : vector -> elem Vector.vector
+ val update : vector * int * elem -> vector
+end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/text.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/text.sig 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/text.sig 2006-10-20 21:22:57 UTC (rev 4739)
@@ -10,31 +10,30 @@
* This signature is just a restament of the {TEXT} signature using the
* extended substructure signatures.
*)
-signature TEXT =
- sig
- structure Char : CHAR
- structure CharArray : MONO_ARRAY
- structure CharArraySlice : MONO_ARRAY_SLICE
- structure CharVector : MONO_VECTOR
- structure CharVectorSlice : MONO_VECTOR_SLICE
- structure String : STRING
- structure Substring : SUBSTRING
- sharing type Char.char
- = CharArray.elem
- = CharArraySlice.elem
- = CharVector.elem
- = CharVectorSlice.elem
- = String.char
- = Substring.char
- sharing type Char.string
- = CharArray.vector
- = CharArraySlice.vector
- = CharVector.vector
- = CharVectorSlice.vector
- = String.string
- = Substring.string
- sharing type CharArray.array
- = CharArraySlice.array
- sharing type CharArraySlice.vector_slice
- = CharVectorSlice.slice
- end
+signature TEXT = sig
+ structure Char : CHAR
+ structure CharArray : MONO_ARRAY
+ structure CharArraySlice : MONO_ARRAY_SLICE
+ structure CharVector : MONO_VECTOR
+ structure CharVectorSlice : MONO_VECTOR_SLICE
+ structure String : STRING
+ structure Substring : SUBSTRING
+ sharing type Char.char
+ = CharArray.elem
+ = CharArraySlice.elem
+ = CharVector.elem
+ = CharVectorSlice.elem
+ = String.char
+ = Substring.char
+ sharing type Char.string
+ = CharArray.vector
+ = CharArraySlice.vector
+ = CharVector.vector
+ = CharVectorSlice.vector
+ = String.string
+ = Substring.string
+ sharing type CharArray.array
+ = CharArraySlice.array
+ sharing type CharArraySlice.vector_slice
+ = CharVectorSlice.slice
+end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sig 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sig 2006-10-20 21:22:57 UTC (rev 4739)
@@ -7,15 +7,14 @@
(**
* Extended {VECTOR} signature.
*)
-signature VECTOR =
- sig
- include VECTOR
+signature VECTOR = sig
+ include VECTOR
- (** == Conversions == *)
+ (** == Conversions == *)
- val toList : 'a vector -> 'a list
+ val toList : 'a vector -> 'a list
- (** == Isomorphisms == *)
+ (** == Isomorphisms == *)
- val listIso : ('a vector, 'a list) iso
- end
+ val listIso : ('a vector, 'a list) iso
+end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sml 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sml 2006-10-20 21:22:57 UTC (rev 4739)
@@ -7,10 +7,8 @@
(**
* Extended {Vector :> VECTOR} structure.
*)
-
-structure Vector : VECTOR =
- struct
- open Vector
- fun toList v = foldr op :: [] v
- val listIso = (toList, fromList)
- end
+structure Vector : VECTOR = struct
+ open Vector
+ fun toList v = foldr op :: [] v
+ val listIso = (toList, fromList)
+end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/word.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/word.sig 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/word.sig 2006-10-20 21:22:57 UTC (rev 4739)
@@ -7,39 +7,38 @@
(**
* Extended {WORD} signature.
*)
-signature WORD =
- sig
- include WORD
+signature WORD = sig
+ include WORD
- (** == Bounds == *)
+ (** == Bounds == *)
- val maxWord : word
- val minWord : word
+ val maxWord : word
+ val minWord : word
- val bounds : word * word
+ val bounds : word * word
- (** == Conversions == *)
+ (** == Conversions == *)
- val fromWord : Word.word -> word
- val toWord : word -> Word.word
+ val fromWord : Word.word -> word
+ val toWord : word -> Word.word
- (** == Embeddings == *)
+ (** == Embeddings == *)
- val stringEmb : (word, string) emb
+ val stringEmb : (word, string) emb
- (** == Isomorphisms == *)
+ (** == Isomorphisms == *)
- val intIso : (word, Int.int) iso
- val intXIso : (word, Int.int) iso
- val largeIntIso : (word, LargeInt.int) iso
- val largeIntXIso : (word, LargeInt.int) iso
- val largeIso : (word, LargeWord.word) iso
- val largeXIso : (word, LargeWord.word) iso
- val wordIso : (word, Word.word) iso
+ val intIso : (word, Int.int) iso
+ val intXIso : (word, Int.int) iso
+ val largeIntIso : (word, LargeInt.int) iso
+ val largeIntXIso : (word, LargeInt.int) iso
+ val largeIso : (word, LargeWord.word) iso
+ val largeXIso : (word, LargeWord.word) iso
+ val wordIso : (word, Word.word) iso
- (** == Predicates == *)
+ (** == Predicates == *)
- val isEven : word -> bool
- val isOdd : word -> bool
- val isZero : word -> bool
- end
+ val isEven : word -> bool
+ val isOdd : word -> bool
+ val isZero : word -> bool
+end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/words-mlton.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/words-mlton.sml 2006-10-20 16:48:08 UTC (rev 4738)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/words-mlton.sml 2006-10-20 21:22:57 UTC (rev 4739)
@@ -6,9 +6,9 @@
(** == Extended {WORD} modules for MLton == *)
-structure Word : WORD = MkWordExt (Word)
+structure Word : WORD = MkWordExt (Word)
structure LargeWord : WORD = MkWordExt (LargeWord)
-structure SysWord : WORD = MkWordExt (SysWord)
+structure SysWord : WORD = MkWordExt (SysWord)
structure Word1 : WORD = MkWordExt (Word1)
structure Word2 : WORD = MkWordExt (Word2)
|