[MLton-commit] r5500

Matthew Fluet fluet at mlton.org
Tue Apr 10 09:24:00 PDT 2007


Eliminate unused identifiers
----------------------------------------------------------------------

U   mlton/trunk/basis-library/arrays-and-vectors/array.sml
U   mlton/trunk/basis-library/arrays-and-vectors/array2.sml
U   mlton/trunk/basis-library/arrays-and-vectors/sequence.fun
U   mlton/trunk/basis-library/integer/int-inf0.sml
U   mlton/trunk/basis-library/integer/pack-word.sml
U   mlton/trunk/basis-library/integer/word.sml
U   mlton/trunk/basis-library/mlton/ffi.sml
U   mlton/trunk/basis-library/net/socket.sml
U   mlton/trunk/basis-library/real/real.sml
U   mlton/trunk/basis-library/system/io.sml
U   mlton/trunk/basis-library/text/string-global.sml
U   mlton/trunk/basis-library/text/string.sml
U   mlton/trunk/basis-library/text/string0.sml
U   mlton/trunk/basis-library/util/integral-comparisons.sml
U   mlton/trunk/basis-library/util/reader.sml

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

Modified: mlton/trunk/basis-library/arrays-and-vectors/array.sml
===================================================================
--- mlton/trunk/basis-library/arrays-and-vectors/array.sml	2007-04-10 16:23:37 UTC (rev 5499)
+++ mlton/trunk/basis-library/arrays-and-vectors/array.sml	2007-04-10 16:23:58 UTC (rev 5500)
@@ -17,13 +17,8 @@
       open A
 
       val op +? = Int.+?
-      val op + = Int.+
-      val op -? = Int.-?
-      val op - = Int.-
       val op < = Int.<
       val op <= = Int.<=
-      val op > = Int.>
-      val op >= = Int.>=
 
       fun wrap2 f = fn (i, x) => f (SeqIndex.toIntUnsafe i, x)
 
@@ -54,7 +49,7 @@
                fun copy (arg as {src, dst, di}) =
                   let val (src', si', len') = base src
                   in
-                    if src' = dst andalso si' < di andalso si' +? len' >= di
+                    if src' = dst andalso si' < di andalso di <= si' +? len' 
                        then let val sl = slice (dst, di, SOME (length src))
                             in 
                                foldri' (fn (i, _, _) => 
@@ -73,7 +68,7 @@
         fun make f arr = f (ArraySlice.full arr)
       in
         fun vector arr = make (ArraySlice.vector) arr
-        fun modifyi' f = make (ArraySlice.modifyi' f)
+        (* fun modifyi' f = make (ArraySlice.modifyi' f) *)
         fun modifyi f = make (ArraySlice.modifyi f)
         fun modify f = make (ArraySlice.modify f)
         fun copy {src, dst, di} = ArraySlice.copy {src = ArraySlice.full src,
@@ -87,7 +82,7 @@
       val array' = new'
       val array = new
 
-      fun update' (arr, i, x) = updateMk' Primitive.Array.updateUnsafe (arr, i, x)
+      (* fun update' (arr, i, x) = updateMk' Primitive.Array.updateUnsafe (arr, i, x) *)
       fun update (arr, i, x) = updateMk Primitive.Array.updateUnsafe (arr, i, x)
       fun unsafeUpdate' (arr, i, x) = unsafeUpdateMk' Primitive.Array.updateUnsafe (arr, i, x)
       fun unsafeUpdate (arr, i, x) = unsafeUpdateMk Primitive.Array.updateUnsafe (arr, i, x)

Modified: mlton/trunk/basis-library/arrays-and-vectors/array2.sml
===================================================================
--- mlton/trunk/basis-library/arrays-and-vectors/array2.sml	2007-04-10 16:23:37 UTC (rev 5499)
+++ mlton/trunk/basis-library/arrays-and-vectors/array2.sml	2007-04-10 16:23:58 UTC (rev 5500)
@@ -99,7 +99,7 @@
             end
       end
 
-      fun wholeRegion (a as {rows, cols, ...}: 'a array): 'a region =
+      fun wholeRegion (a : 'a array): 'a region =
          {base = a, row = 0, col = 0, nrows = NONE, ncols = NONE}
 
       datatype traversal = RowMajor | ColMajor
@@ -145,7 +145,7 @@
           rows = 0,
           cols = 0}
 
-      fun unsafeSpot' (a as {cols, ...}: 'a array, r, c) =
+      fun unsafeSpot' ({cols, ...}: 'a array, r, c) =
          r *? cols +? c
       fun spot' (a as {rows, cols, ...}: 'a array, r, c) =
          if Primitive.Controls.safe 
@@ -190,7 +190,7 @@
           | row1 :: _ =>
                let
                   val cols = length row1
-                  val a as {array, rows = rows', cols = cols', ...} = 
+                  val a as {array, cols = cols', ...} = 
                      arrayUninit (length rows, cols)
                   val _ =
                      List.foldl
@@ -244,7 +244,7 @@
                  end
             else column' (a, SeqIndex.fromIntUnsafe c)
 
-      fun foldi' trv f b (region as {base, row, col, ...}) =
+      fun foldi' trv f b (region as {base, ...}) =
          let
             val {startRow, stopRow, startCol, stopCol} = checkRegion region
          in

Modified: mlton/trunk/basis-library/arrays-and-vectors/sequence.fun
===================================================================
--- mlton/trunk/basis-library/arrays-and-vectors/sequence.fun	2007-04-10 16:23:37 UTC (rev 5499)
+++ mlton/trunk/basis-library/arrays-and-vectors/sequence.fun	2007-04-10 16:23:58 UTC (rev 5500)
@@ -77,17 +77,14 @@
       val op +? = SeqIndex.+?
       val op + = SeqIndex.+
       val op -? = SeqIndex.-?
-      val op - = SeqIndex.-
       val op < = SeqIndex.<
       val op <= = SeqIndex.<=
       val op > = SeqIndex.>
       val op >= = SeqIndex.>=
-      val ltu = SeqIndex.ltu
-      val leu = SeqIndex.leu
       val gtu = SeqIndex.gtu
       val geu = SeqIndex.geu
 
-      fun wrap1 f = fn (i) => f (SeqIndex.toIntUnsafe i)
+      (* fun wrap1 f = fn (i) => f (SeqIndex.toIntUnsafe i) *)
       fun wrap2 f = fn (i, x) => f (SeqIndex.toIntUnsafe i, x)
       fun wrap3 f = fn (i, x, y) => f (SeqIndex.toIntUnsafe i, x, y)
       fun unwrap1 f = fn (i) => f (SeqIndex.fromIntUnsafe i)

Modified: mlton/trunk/basis-library/integer/int-inf0.sml
===================================================================
--- mlton/trunk/basis-library/integer/int-inf0.sml	2007-04-10 16:23:37 UTC (rev 5499)
+++ mlton/trunk/basis-library/integer/int-inf0.sml	2007-04-10 16:23:58 UTC (rev 5500)
@@ -379,17 +379,6 @@
                         in
                            val zextdFromSeqIndex = S.f
                         end
-                        local
-                           structure S =
-                              SeqIndex_ChooseIntN
-                              (type 'a t = 'a -> C_Size.word
-                               val fInt8 = C_Size.sextdFromInt8
-                               val fInt16 = C_Size.sextdFromInt16
-                               val fInt32 = C_Size.sextdFromInt32
-                               val fInt64 = C_Size.sextdFromInt64)
-                        in
-                           val sextdFromSeqIndex = S.f
-                        end
                      end
 
       type bigInt = Prim.int
@@ -891,7 +880,7 @@
       val badObjptrInt: I.int = I.~>>? (I.minInt', 0w1)
       val badObjptrWord: W.word = W.idFromObjptrInt badObjptrInt
       val badObjptrWordTagged: W.word = addTag badObjptrWord
-      val badObjptrIntTagged: I.int = W.idToObjptrInt badObjptrWordTagged
+      (* val badObjptrIntTagged: I.int = W.idToObjptrInt badObjptrWordTagged *)
       val negBadIntInf: bigInt = sextdFromObjptrInt (I.~ badObjptrInt)
 
       (* Given two ObjptrWord.word's, check if they have the same 'high'/'sign' bit.
@@ -1256,12 +1245,6 @@
             val zeroTag = zeroTag
             val oneTag = oneTag
             val oneTagCoerce = oneTagCoerce
-
-            val numLimbs = numLimbs
-            val bytesPerArrayHeader = bytesPerArrayHeader
-            val reserve = reserve
-
-            val toString = Prim.toString
         end
 
       val abs = bigAbs

Modified: mlton/trunk/basis-library/integer/pack-word.sml
===================================================================
--- mlton/trunk/basis-library/integer/pack-word.sml	2007-04-10 16:23:37 UTC (rev 5499)
+++ mlton/trunk/basis-library/integer/pack-word.sml	2007-04-10 16:23:58 UTC (rev 5500)
@@ -53,19 +53,6 @@
    end
 
 local
-   fun make (sub, length, toPoly) (s, i) =
-      let
-         val i = offset (i, length s)
-         val s = toPoly s
-      in
-         sub (s, i)
-      end
-in
-   val subArr = make (subA, Word8Array.length, Word8Array.toPoly)
-   val subVec = make (subV, Word8Vector.length, Word8Vector.toPoly)
-end
-
-local
    fun make (sub, length, toPoly) (av, i) =
       let
          val i = offset (i, length av)
@@ -82,80 +69,56 @@
 end
 
 structure PackWord8Big: PACK_WORD =
-   PackWord (val wordSize = Word8.wordSize
-             val isBigEndian = true
+   PackWord (val isBigEndian = true
              open PrimitiveFFI.PackWord8
              open Word8)
 structure PackWord8Little: PACK_WORD =
-   PackWord (val wordSize = Word8.wordSize
-             val isBigEndian = false
+   PackWord (val isBigEndian = false
              open PrimitiveFFI.PackWord8
              open Word8)
 structure PackWord8Host: PACK_WORD =
-   PackWord (val wordSize = Word8.wordSize
-             val isBigEndian = Primitive.MLton.Platform.Arch.hostIsBigEndian
+   PackWord (val isBigEndian = Primitive.MLton.Platform.Arch.hostIsBigEndian
              open PrimitiveFFI.PackWord8
              open Word8)
 structure PackWord16Big: PACK_WORD =
-   PackWord (val wordSize = Word16.wordSize
-             val isBigEndian = true
+   PackWord (val isBigEndian = true
              open PrimitiveFFI.PackWord16
              open Word16)
 structure PackWord16Little: PACK_WORD =
-   PackWord (val wordSize = Word16.wordSize
-             val isBigEndian = false
+   PackWord (val isBigEndian = false
              open PrimitiveFFI.PackWord16
              open Word16)
 structure PackWord16Host: PACK_WORD =
-   PackWord (val wordSize = Word16.wordSize
-             val isBigEndian = Primitive.MLton.Platform.Arch.hostIsBigEndian
+   PackWord (val isBigEndian = Primitive.MLton.Platform.Arch.hostIsBigEndian
              open PrimitiveFFI.PackWord16
              open Word16)
 structure PackWord32Big: PACK_WORD =
-   PackWord (val wordSize = Word32.wordSize
-             val isBigEndian = true
+   PackWord (val isBigEndian = true
              open PrimitiveFFI.PackWord32
              open Word32)
 structure PackWord32Little: PACK_WORD =
-   PackWord (val wordSize = Word32.wordSize
-             val isBigEndian = false
+   PackWord (val isBigEndian = false
              open PrimitiveFFI.PackWord32
              open Word32)
 structure PackWord32Host: PACK_WORD =
-   PackWord (val wordSize = Word32.wordSize
-             val isBigEndian = Primitive.MLton.Platform.Arch.hostIsBigEndian
+   PackWord (val isBigEndian = Primitive.MLton.Platform.Arch.hostIsBigEndian
              open PrimitiveFFI.PackWord32
              open Word32)
 structure PackWord64Big: PACK_WORD =
-   PackWord (val wordSize = Word64.wordSize
-             val isBigEndian = true
+   PackWord (val isBigEndian = true
              open PrimitiveFFI.PackWord64
              open Word64)
 structure PackWord64Little: PACK_WORD =
-   PackWord (val wordSize = Word64.wordSize
-             val isBigEndian = false
+   PackWord (val isBigEndian = false
              open PrimitiveFFI.PackWord64
              open Word64)
 structure PackWord64Host: PACK_WORD =
-   PackWord (val wordSize = Word64.wordSize
-             val isBigEndian = Primitive.MLton.Platform.Arch.hostIsBigEndian
+   PackWord (val isBigEndian = Primitive.MLton.Platform.Arch.hostIsBigEndian
              open PrimitiveFFI.PackWord64
              open Word64)
 local
-   local
-      structure S =
-         Word_ChooseWordN
-         (type 'a t = int
-          val fWord8 = Word8.wordSize
-          val fWord16 = Word16.wordSize
-          val fWord32 = Word32.wordSize
-          val fWord64 = Word64.wordSize)
-   in
-      val wordSize = S.f
-   end
    structure PackWord =
       struct
-         type word = Word.word
          local
             structure S =
                Word_ChooseWordN
@@ -225,36 +188,21 @@
       end
 in
 structure PackWordBig: PACK_WORD =
-   PackWord (val wordSize = Word.wordSize
-             val isBigEndian = true
+   PackWord (val isBigEndian = true
              open PackWord
              open Word)
 structure PackWordLittle: PACK_WORD =
-   PackWord (val wordSize = Word.wordSize
-             val isBigEndian = false
+   PackWord (val isBigEndian = false
              open PackWord
              open Word)
 structure PackWordHost: PACK_WORD =
-   PackWord (val wordSize = Word.wordSize
-             val isBigEndian = Primitive.MLton.Platform.Arch.hostIsBigEndian
+   PackWord (val isBigEndian = Primitive.MLton.Platform.Arch.hostIsBigEndian
              open PackWord
              open Word)
 end
 local
-   local
-      structure S =
-         LargeWord_ChooseWordN
-         (type 'a t = int
-          val fWord8 = Word8.wordSize
-          val fWord16 = Word16.wordSize
-          val fWord32 = Word32.wordSize
-          val fWord64 = Word64.wordSize)
-   in
-      val wordSize = S.f
-   end
    structure PackLargeWord =
       struct
-         type word = Word.word
          local
             structure S =
                LargeWord_ChooseWordN
@@ -324,18 +272,15 @@
       end
 in
 structure PackLargeWordBig: PACK_WORD =
-   PackWord (val wordSize = LargeWord.wordSize
-             val isBigEndian = true
+   PackWord (val isBigEndian = true
              open PackLargeWord
              open LargeWord)
 structure PackLargeWordLittle: PACK_WORD =
-   PackWord (val wordSize = LargeWord.wordSize
-             val isBigEndian = false
+   PackWord (val isBigEndian = false
              open PackLargeWord
              open LargeWord)
 structure PackLargeWordHost: PACK_WORD =
-   PackWord (val wordSize = LargeWord.wordSize
-             val isBigEndian = Primitive.MLton.Platform.Arch.hostIsBigEndian
+   PackWord (val isBigEndian = Primitive.MLton.Platform.Arch.hostIsBigEndian
              open PackLargeWord
              open LargeWord)
 end

Modified: mlton/trunk/basis-library/integer/word.sml
===================================================================
--- mlton/trunk/basis-library/integer/word.sml	2007-04-10 16:23:37 UTC (rev 5499)
+++ mlton/trunk/basis-library/integer/word.sml	2007-04-10 16:23:58 UTC (rev 5500)
@@ -101,17 +101,23 @@
       end)
 end
 
+(*
 fun fmt radix (w: word): string =
-   let val radix = fromInt (StringCvt.radixToInt radix)
+   let 
+      val radix = fromInt (StringCvt.radixToInt radix)
       fun loop (q, chars) =
-         let val chars = StringCvt.digitToChar (toInt (q mod radix)) :: chars
+         let 
+            val chars = StringCvt.digitToChar (toInt (q mod radix)) :: chars
             val q = q div radix
-         in if q = zero
+         in 
+            if q = zero
                then String.implode chars
             else loop (q, chars)
          end
-   in loop (w, [])
+   in 
+      loop (w, [])
    end
+*)
 
 val toString = fmt StringCvt.HEX
 

Modified: mlton/trunk/basis-library/mlton/ffi.sml
===================================================================
--- mlton/trunk/basis-library/mlton/ffi.sml	2007-04-10 16:23:37 UTC (rev 5499)
+++ mlton/trunk/basis-library/mlton/ffi.sml	2007-04-10 16:23:58 UTC (rev 5500)
@@ -47,12 +47,16 @@
 
 (* To the C-world, chars are signed integers. *)
 val getChar8 = Primitive.Char8.idFromInt8 o getInt8
+(*
 val getChar16 = Primitive.Char16.idFromInt16 o getInt16
 val getChar32 = Primitive.Char32.idFromInt32 o getInt32
+*)
 
 val setChar8 = setInt8 o Primitive.Char8.idToInt8
+(*
 val setChar16 = setInt16 o Primitive.Char16.idToInt16
 val setChar32 = setInt32 o Primitive.Char32.idToInt32
+*)
 
 (* To the C-world, booleans are 32-bit integers. *)
 fun intToBool (i: Int32.int): bool = i <> 0

Modified: mlton/trunk/basis-library/net/socket.sml
===================================================================
--- mlton/trunk/basis-library/net/socket.sml	2007-04-10 16:23:37 UTC (rev 5499)
+++ mlton/trunk/basis-library/net/socket.sml	2007-04-10 16:23:58 UTC (rev 5500)
@@ -306,7 +306,7 @@
             make (boolLen, marshalBool, unmarshalBool)
          val (getSockOptSize, getIOCtlSize, setSockOptSize, _) =
             make (sizeLen, marshalSize, unmarshalSize)
-         val (getSockOptOptTime, getIOCtlOptTime, setSockOptOptTime, _) =
+         val (getSockOptOptTime, _, setSockOptOptTime, _) =
             make (optTimeLen, marshalOptTime, unmarshalOptTime)
       end
 

Modified: mlton/trunk/basis-library/real/real.sml
===================================================================
--- mlton/trunk/basis-library/real/real.sml	2007-04-10 16:23:37 UTC (rev 5499)
+++ mlton/trunk/basis-library/real/real.sml	2007-04-10 16:23:58 UTC (rev 5500)
@@ -59,9 +59,9 @@
                       other : {precision: Primitive.Int32.int}} =
             if R.precision = #precision other
                then (fromRealUnsafe,
-                     fn (m: rounding_mode) => fromRealUnsafe,
+                     fn (_: rounding_mode) => fromRealUnsafe,
                      toRealUnsafe,
-                     fn (m: rounding_mode) => toRealUnsafe)
+                     fn (_: rounding_mode) => toRealUnsafe)
                else (fromRealUnsafe,
                      fn (m: rounding_mode) => fn r =>
                      IEEEReal.withRoundingMode (m, fn () => fromRealUnsafe r),
@@ -69,11 +69,11 @@
                      fn (m: rounding_mode) => fn r =>
                      IEEEReal.withRoundingMode (m, fn () => toRealUnsafe r))
       in
-         val (fromReal32,fromReal32M,toReal32,toReal32M) =
+         val (_,fromReal32M,toReal32,_) =
             make {fromRealUnsafe = R.fromReal32Unsafe,
                   toRealUnsafe = R.toReal32Unsafe,
                   other = {precision = Primitive.Real32.precision}}
-         val (fromReal64,fromReal64M,toReal64,toReal64M) =
+         val (_,fromReal64M,toReal64,_) =
             make {fromRealUnsafe = R.fromReal64Unsafe,
                   toRealUnsafe = R.toReal64Unsafe,
                   other = {precision = Primitive.Real64.precision}}
@@ -135,8 +135,6 @@
 
       fun isNormal r = class r = NORMAL
 
-      fun isNormal r = class r = NORMAL
-
       val op ?= =
          if MLton.Codegen.isNative
             then R.?=
@@ -641,22 +639,22 @@
                            else raise Overflow)
             end
       in
-         val (fromInt8,fromInt8M,toInt8,toInt8M) =
+         val (fromInt8,_,_,toInt8M) =
             make {fromIntUnsafe = R.fromInt8Unsafe,
                   toIntUnsafe = R.toInt8Unsafe,
                   other = {maxInt' = Int8.maxInt',
                            minInt' = Int8.minInt'}}
-         val (fromInt16,fromInt16M,toInt16,toInt16M) =
+         val (fromInt16,_,_,toInt16M) =
             make {fromIntUnsafe = R.fromInt16Unsafe,
                   toIntUnsafe = R.toInt16Unsafe,
                   other = {maxInt' = Int16.maxInt',
                            minInt' = Int16.minInt'}}
-         val (fromInt32,fromInt32M,toInt32,toInt32M) =
+         val (fromInt32,_,_,toInt32M) =
             make {fromIntUnsafe = R.fromInt32Unsafe,
                   toIntUnsafe = R.toInt32Unsafe,
                   other = {maxInt' = Int32.maxInt',
                            minInt' = Int32.minInt'}}
-         val (fromInt64,fromInt64M,toInt64,toInt64M) =
+         val (fromInt64,_,_,toInt64M) =
             make {fromIntUnsafe = R.fromInt64Unsafe,
                   toIntUnsafe = R.toInt64Unsafe,
                   other = {maxInt' = Int64.maxInt',

Modified: mlton/trunk/basis-library/system/io.sml
===================================================================
--- mlton/trunk/basis-library/system/io.sml	2007-04-10 16:23:37 UTC (rev 5499)
+++ mlton/trunk/basis-library/system/io.sml	2007-04-10 16:23:58 UTC (rev 5500)
@@ -23,8 +23,6 @@
 
     datatype iodesc_kind = K of string
 
-    type file_desc = Posix.FileSys.file_desc
-
     val iodToFd = fn x => x
     val fdToIod = fn x => x
 
@@ -118,7 +116,7 @@
                 NONE => ~1
               | SOME t =>
                    if Time.< (t, Time.zeroTime)
-                      then let open PosixError in raiseSys inval end
+                      then Error.raiseSys Error.inval
                    else (C_Int.fromLarge (Time.toMilliseconds t)
                          handle Overflow => Error.raiseSys Error.inval)
           val reventss = Array.array (n, 0)

Modified: mlton/trunk/basis-library/text/string-global.sml
===================================================================
--- mlton/trunk/basis-library/text/string-global.sml	2007-04-10 16:23:37 UTC (rev 5499)
+++ mlton/trunk/basis-library/text/string-global.sml	2007-04-10 16:23:58 UTC (rev 5500)
@@ -16,10 +16,3 @@
     case e of
        Fail s => SOME (concat ["Fail: ", s])
      | _ => NONE)
-
-structure NullString =
-   struct
-      open Primitive.NullString8
-
-      val nullTerm = fromString o String.nullTerm
-   end

Modified: mlton/trunk/basis-library/text/string.sml
===================================================================
--- mlton/trunk/basis-library/text/string.sml	2007-04-10 16:23:37 UTC (rev 5499)
+++ mlton/trunk/basis-library/text/string.sml	2007-04-10 16:23:58 UTC (rev 5500)
@@ -91,14 +91,12 @@
    struct
       structure Char = Char
       structure CharVector = CharVector
-      structure CharArray = CharArray
    end
 
 structure WideStringArg : STRING_ARG =
    struct
       structure Char = WideChar
       structure CharVector = WideCharVector
-      structure CharArray = WideCharArray
    end
 
 structure String : STRING_EXTRA = StringFn(StringArg)

Modified: mlton/trunk/basis-library/text/string0.sml
===================================================================
--- mlton/trunk/basis-library/text/string0.sml	2007-04-10 16:23:37 UTC (rev 5499)
+++ mlton/trunk/basis-library/text/string0.sml	2007-04-10 16:23:58 UTC (rev 5500)
@@ -6,18 +6,14 @@
  * See the file MLton-LICENSE for details.
  *)
 
-(* This is the minimum needed to bootstrap StringCvt *)
 structure String = 
    struct
-      (* CharVector comes from mono.sml and default-charX.sml *)
       open CharVector
-      type char = elem
       type string = vector
       
       val size = length
       val op ^ = append
       val implode = fromList
-      val explode = toList
       val new = vector
    end
 
@@ -25,13 +21,11 @@
 structure WideString = 
    struct
       open WideCharVector
-      type char = elem
       type string = vector
       
       val size = length
       val op ^ = append
       val implode = fromList
-      val explode = toList
       val new = vector
    end
 *)

Modified: mlton/trunk/basis-library/util/integral-comparisons.sml
===================================================================
--- mlton/trunk/basis-library/util/integral-comparisons.sml	2007-04-10 16:23:37 UTC (rev 5499)
+++ mlton/trunk/basis-library/util/integral-comparisons.sml	2007-04-10 16:23:58 UTC (rev 5500)
@@ -8,7 +8,7 @@
 functor IntegralComparisons (type t
                              val < : t * t -> bool) =
    struct
-      val < = <
+      val < : t * t -> bool = <
       fun <= (a, b) = not (< (b, a))
       fun > (a, b) = < (b, a)
       fun >= (a, b) = <= (b, a)

Modified: mlton/trunk/basis-library/util/reader.sml
===================================================================
--- mlton/trunk/basis-library/util/reader.sml	2007-04-10 16:23:37 UTC (rev 5499)
+++ mlton/trunk/basis-library/util/reader.sml	2007-04-10 16:23:58 UTC (rev 5500)
@@ -13,30 +13,6 @@
 
 type ('a, 'b) reader = 'b -> ('a * 'b) option
 
-(* local
- *    fun make finish p reader state =
- *       let
- *       fun loop (state, token, tokens) =
- *          case reader state of
- *             NONE => SOME (rev (finish (token, tokens)), state)
- *           | SOME (x, state) =>
- *                let
- *                   val (token, tokens) =
- *                      if p x then ([], finish (token, tokens))
- *                      else (x :: token, tokens)
- *                in loop (state, token, tokens)
- *                end
- *       in loop (state, [], [])
- *       end
- * in
- *     fun tokens p = make (fn (token, tokens) =>
- *                     case token of
- *                        [] => tokens
- *                      | _ => (rev token) :: tokens) p
- *    fun fields p = make (fn (field, fields) => (rev field) :: fields) p
- * end
- *)
-
 fun list (reader: ('a, 'b) reader): ('a list, 'b) reader =
    fn state =>
    let




More information about the MLton-commit mailing list