[MLton-commit] r7061
Matthew Fluet
fluet at mlton.org
Wed Apr 8 05:32:30 PDT 2009
Use default Int/Word types.
Since we do constant-folding with IntInf, there is little reason to
force the default int/word types to 32-bits. Rather, we should use
the default int/word type provided by the host compiler. This avoids
the annoying "type int = Int.t" and "type word = Word.t" in the code.
Also, when using SML/NJ as the host compiler, it should be a slight
performance win, since we won't force SML/NJ to use slower boxed
arithmetic. We'll also be able to experiment with '-default-type
word64' and '-default-type int64' and '-default-type intinf' to see
the performance of other default types. Finally, it should make
supporting other host compilers mildly simpler.
This commit:
* elimintates all the "type int = Int.t" and "type word = Word.t"
(and 'type int = Pervasive.Int.int' and 'type word = Pervasive.Word.word')
bindings from lib/ and mlton/.
* Avoids Int<N> and Word<N> structures.
* Minimizes dependency on the MLton structure (as provided by
mlton-stubs). Minor tweaks to the MLton.Socket structure to avoid
the need for it in lib/mlton.
* changes lib/mlton-stubs and related stubs to compile.
* minor other changes to compile.
----------------------------------------------------------------------
U mlton/trunk/basis-library/mlton/socket.sig
U mlton/trunk/basis-library/mlton/socket.sml
D mlton/trunk/lib/basis-stubs/Makefile
D mlton/trunk/lib/basis-stubs/basis-2002.sml
D mlton/trunk/lib/basis-stubs/sources.cm
A mlton/trunk/lib/basis-stubs-for-smlnj/
A mlton/trunk/lib/basis-stubs-for-smlnj/Makefile
A mlton/trunk/lib/basis-stubs-for-smlnj/char.sml
A mlton/trunk/lib/basis-stubs-for-smlnj/ieee-real.sml
A mlton/trunk/lib/basis-stubs-for-smlnj/int-inf.sml
A mlton/trunk/lib/basis-stubs-for-smlnj/int.sml
A mlton/trunk/lib/basis-stubs-for-smlnj/pervasive.cm
A mlton/trunk/lib/basis-stubs-for-smlnj/pervasive.sml
A mlton/trunk/lib/basis-stubs-for-smlnj/real.sml
A mlton/trunk/lib/basis-stubs-for-smlnj/sources.cm
A mlton/trunk/lib/basis-stubs-for-smlnj/string.sml
A mlton/trunk/lib/basis-stubs-for-smlnj/word.sml
U mlton/trunk/lib/mlton/basic/append-list.sig
U mlton/trunk/lib/mlton/basic/array.sig
U mlton/trunk/lib/mlton/basic/array2.sig
U mlton/trunk/lib/mlton/basic/base64.sig
U mlton/trunk/lib/mlton/basic/base64.sml
U mlton/trunk/lib/mlton/basic/binary-search.sig
U mlton/trunk/lib/mlton/basic/buffer.sig
U mlton/trunk/lib/mlton/basic/char-buffer.sig
U mlton/trunk/lib/mlton/basic/char.sig
U mlton/trunk/lib/mlton/basic/char0.sig
U mlton/trunk/lib/mlton/basic/char0.sml
U mlton/trunk/lib/mlton/basic/choice-pattern.sig
U mlton/trunk/lib/mlton/basic/console.sig
U mlton/trunk/lib/mlton/basic/counter.sig
U mlton/trunk/lib/mlton/basic/counter.sml
U mlton/trunk/lib/mlton/basic/date.sig
U mlton/trunk/lib/mlton/basic/directed-graph.sig
U mlton/trunk/lib/mlton/basic/directed-sub-graph.sig
U mlton/trunk/lib/mlton/basic/dot.sig
U mlton/trunk/lib/mlton/basic/engine.sig
U mlton/trunk/lib/mlton/basic/env.sig
U mlton/trunk/lib/mlton/basic/fold.fun
U mlton/trunk/lib/mlton/basic/fold.sig
U mlton/trunk/lib/mlton/basic/format.sig
U mlton/trunk/lib/mlton/basic/hash-set.sig
U mlton/trunk/lib/mlton/basic/hash-table.sig
U mlton/trunk/lib/mlton/basic/html.sig
U mlton/trunk/lib/mlton/basic/http.sig
U mlton/trunk/lib/mlton/basic/http.sml
U mlton/trunk/lib/mlton/basic/insertion-sort.sig
U mlton/trunk/lib/mlton/basic/instream.sig
U mlton/trunk/lib/mlton/basic/int-inf.sig
U mlton/trunk/lib/mlton/basic/int-inf.sml
U mlton/trunk/lib/mlton/basic/int.sml
U mlton/trunk/lib/mlton/basic/integer.fun
U mlton/trunk/lib/mlton/basic/justify.sig
U mlton/trunk/lib/mlton/basic/layout.sig
U mlton/trunk/lib/mlton/basic/layout.sml
U mlton/trunk/lib/mlton/basic/lines.sig
U mlton/trunk/lib/mlton/basic/linked-list.sig
U mlton/trunk/lib/mlton/basic/list.sig
U mlton/trunk/lib/mlton/basic/list.sml
U mlton/trunk/lib/mlton/basic/mark.sig
U mlton/trunk/lib/mlton/basic/max-pow-2-that-divides.fun
U mlton/trunk/lib/mlton/basic/merge-sort.sig
U mlton/trunk/lib/mlton/basic/mono-container.sig
U mlton/trunk/lib/mlton/basic/net.sig
U mlton/trunk/lib/mlton/basic/net.sml
U mlton/trunk/lib/mlton/basic/pid.sml
U mlton/trunk/lib/mlton/basic/popt.sig
U mlton/trunk/lib/mlton/basic/popt.sml
U mlton/trunk/lib/mlton/basic/port.sig
U mlton/trunk/lib/mlton/basic/port.sml
U mlton/trunk/lib/mlton/basic/postscript.sig
U mlton/trunk/lib/mlton/basic/process.sig
U mlton/trunk/lib/mlton/basic/property-list.sig
U mlton/trunk/lib/mlton/basic/quick-sort.sml
U mlton/trunk/lib/mlton/basic/random.sig
U mlton/trunk/lib/mlton/basic/random.sml
U mlton/trunk/lib/mlton/basic/rdb.sig
U mlton/trunk/lib/mlton/basic/reader.sml
U mlton/trunk/lib/mlton/basic/real.sig
U mlton/trunk/lib/mlton/basic/regexp.sig
U mlton/trunk/lib/mlton/basic/regexp.sml
U mlton/trunk/lib/mlton/basic/relation0.sml
U mlton/trunk/lib/mlton/basic/resizable-array.sig
U mlton/trunk/lib/mlton/basic/sources.cm
U mlton/trunk/lib/mlton/basic/sources.mlb
U mlton/trunk/lib/mlton/basic/stream.sig
U mlton/trunk/lib/mlton/basic/string.sig
U mlton/trunk/lib/mlton/basic/string.sml
U mlton/trunk/lib/mlton/basic/substring.sig
U mlton/trunk/lib/mlton/basic/tab.sig
U mlton/trunk/lib/mlton/basic/test.sml
U mlton/trunk/lib/mlton/basic/time.sml
U mlton/trunk/lib/mlton/basic/trace.sml
U mlton/trunk/lib/mlton/basic/unique-set.sig
U mlton/trunk/lib/mlton/basic/url.sig
U mlton/trunk/lib/mlton/basic/url.sml
U mlton/trunk/lib/mlton/basic/vector.sig
U mlton/trunk/lib/mlton/basic/word.sig
U mlton/trunk/lib/mlton/basic/word.sml
D mlton/trunk/lib/mlton/basic/word16.sml
D mlton/trunk/lib/mlton/basic/word32.sig
U mlton/trunk/lib/mlton/basic/word8.sml
U mlton/trunk/lib/mlton/env/finite-function.sig
U mlton/trunk/lib/mlton/env/mono-env.sig
U mlton/trunk/lib/mlton/heap/forest.sig
U mlton/trunk/lib/mlton/heap/heap.sig
U mlton/trunk/lib/mlton/pervasive/pervasive.sml
U mlton/trunk/lib/mlton/pervasive/sources.cm
U mlton/trunk/lib/mlton/set/bit-vector-set.fun
U mlton/trunk/lib/mlton/set/disjoint.fun
U mlton/trunk/lib/mlton/set/hashed-unique-set.fun
U mlton/trunk/lib/mlton/set/ordered-unique-set.fun
U mlton/trunk/lib/mlton/set/set.sig
U mlton/trunk/lib/mlton/sources.cm
U mlton/trunk/lib/mlton/sources.mlb
U mlton/trunk/lib/mlton-stubs/array.sig
D mlton/trunk/lib/mlton-stubs/bin-io.sml
D mlton/trunk/lib/mlton-stubs/call-stack.sig
U mlton/trunk/lib/mlton-stubs/exn.sig
U mlton/trunk/lib/mlton-stubs/gc.sig
D mlton/trunk/lib/mlton-stubs/int-inf.sig
U mlton/trunk/lib/mlton-stubs/mlton.sig
U mlton/trunk/lib/mlton-stubs/mlton.sml
U mlton/trunk/lib/mlton-stubs/platform.sig
D mlton/trunk/lib/mlton-stubs/pointer.sig
U mlton/trunk/lib/mlton-stubs/proc-env.sig
D mlton/trunk/lib/mlton-stubs/ptrace.sig
U mlton/trunk/lib/mlton-stubs/random.sig
U mlton/trunk/lib/mlton-stubs/random.sml
D mlton/trunk/lib/mlton-stubs/real.sml
D mlton/trunk/lib/mlton-stubs/rlimit.sig
U mlton/trunk/lib/mlton-stubs/rusage.sig
U mlton/trunk/lib/mlton-stubs/signal.sig
U mlton/trunk/lib/mlton-stubs/socket.sig
U mlton/trunk/lib/mlton-stubs/sources.cm
D mlton/trunk/lib/mlton-stubs/syslog.sig
U mlton/trunk/lib/mlton-stubs/thread.sig
U mlton/trunk/lib/mlton-stubs/thread.sml
U mlton/trunk/lib/mlton-stubs/vector.sig
U mlton/trunk/lib/mlton-stubs/word.sig
U mlton/trunk/lib/mlton-stubs/world.sig
A mlton/trunk/lib/mlton-stubs-for-smlnj/
A mlton/trunk/lib/mlton-stubs-for-smlnj/mlton.sml
A mlton/trunk/lib/mlton-stubs-for-smlnj/sources.cm
D mlton/trunk/lib/mlton-stubs-in-smlnj/Makefile
D mlton/trunk/lib/mlton-stubs-in-smlnj/README
D mlton/trunk/lib/mlton-stubs-in-smlnj/array.sml
D mlton/trunk/lib/mlton-stubs-in-smlnj/array2.sml
D mlton/trunk/lib/mlton-stubs-in-smlnj/bin-io.sml
D mlton/trunk/lib/mlton-stubs-in-smlnj/char.sml
D mlton/trunk/lib/mlton-stubs-in-smlnj/date.sml
D mlton/trunk/lib/mlton-stubs-in-smlnj/ieee-real.sml
D mlton/trunk/lib/mlton-stubs-in-smlnj/import.cm
D mlton/trunk/lib/mlton-stubs-in-smlnj/int-inf.sml
D mlton/trunk/lib/mlton-stubs-in-smlnj/int.sml
D mlton/trunk/lib/mlton-stubs-in-smlnj/list.sml
D mlton/trunk/lib/mlton-stubs-in-smlnj/mlton.sml
D mlton/trunk/lib/mlton-stubs-in-smlnj/open-int32.sml
D mlton/trunk/lib/mlton-stubs-in-smlnj/os.sml
D mlton/trunk/lib/mlton-stubs-in-smlnj/other.sml
D mlton/trunk/lib/mlton-stubs-in-smlnj/pervasive.sml
D mlton/trunk/lib/mlton-stubs-in-smlnj/posix.sml
D mlton/trunk/lib/mlton-stubs-in-smlnj/real.sml
D mlton/trunk/lib/mlton-stubs-in-smlnj/socket.sml
D mlton/trunk/lib/mlton-stubs-in-smlnj/sources.cm
D mlton/trunk/lib/mlton-stubs-in-smlnj/string-cvt.sml
D mlton/trunk/lib/mlton-stubs-in-smlnj/string.sml
D mlton/trunk/lib/mlton-stubs-in-smlnj/substring.sml
D mlton/trunk/lib/mlton-stubs-in-smlnj/text-io.sml
D mlton/trunk/lib/mlton-stubs-in-smlnj/time.sml
D mlton/trunk/lib/mlton-stubs-in-smlnj/unsafe.sml
D mlton/trunk/lib/mlton-stubs-in-smlnj/vector.sml
D mlton/trunk/lib/mlton-stubs-in-smlnj/word.sml
U mlton/trunk/lib/mlyacc/base.sig
U mlton/trunk/lib/mlyacc/lrtable.sml
U mlton/trunk/lib/mlyacc/parser2.sml
U mlton/trunk/lib/mlyacc/sources.cm
U mlton/trunk/mlton/ast/ast-atoms.sig
U mlton/trunk/mlton/ast/ast-core.fun
U mlton/trunk/mlton/ast/ast-core.sig
U mlton/trunk/mlton/ast/field.sig
U mlton/trunk/mlton/ast/int-size.fun
U mlton/trunk/mlton/ast/symbol.sig
U mlton/trunk/mlton/ast/tycon-kind.sig
U mlton/trunk/mlton/ast/word-size.sig
U mlton/trunk/mlton/atoms/c-function.sig
U mlton/trunk/mlton/atoms/cases.sig
U mlton/trunk/mlton/atoms/const.sig
U mlton/trunk/mlton/atoms/ffi.sig
U mlton/trunk/mlton/atoms/id.sig
U mlton/trunk/mlton/atoms/prim.fun
U mlton/trunk/mlton/atoms/profile-exp.sig
U mlton/trunk/mlton/atoms/profile-label.fun
U mlton/trunk/mlton/atoms/real-x.fun
U mlton/trunk/mlton/atoms/real-x.sig
U mlton/trunk/mlton/atoms/source-info.sig
U mlton/trunk/mlton/atoms/word-x.fun
U mlton/trunk/mlton/atoms/word-x.sig
U mlton/trunk/mlton/backend/allocate-registers.sig
U mlton/trunk/mlton/backend/backend.sig
U mlton/trunk/mlton/backend/chunkify.sig
U mlton/trunk/mlton/backend/equivalence-graph.sig
U mlton/trunk/mlton/backend/implement-profiling.sig
U mlton/trunk/mlton/backend/limit-check.sig
U mlton/trunk/mlton/backend/machine.sig
U mlton/trunk/mlton/backend/objptr-tycon.fun
U mlton/trunk/mlton/backend/objptr-tycon.sig
U mlton/trunk/mlton/backend/rep-type.fun
U mlton/trunk/mlton/backend/representation.sig
U mlton/trunk/mlton/backend/rssa.sig
U mlton/trunk/mlton/backend/runtime.fun
U mlton/trunk/mlton/backend/runtime.sig
U mlton/trunk/mlton/backend/scale.sig
U mlton/trunk/mlton/backend/signal-check.sig
U mlton/trunk/mlton/backend/switch.sig
U mlton/trunk/mlton/closure-convert/abstract-value.sig
U mlton/trunk/mlton/cm/lexer.sig
U mlton/trunk/mlton/codegen/amd64-codegen/amd64-allocate-registers.sig
U mlton/trunk/mlton/codegen/amd64-codegen/amd64-generate-transfers.sig
U mlton/trunk/mlton/codegen/amd64-codegen/amd64-jump-info.sig
U mlton/trunk/mlton/codegen/amd64-codegen/amd64-liveness.fun
U mlton/trunk/mlton/codegen/amd64-codegen/amd64-loop-info.sig
U mlton/trunk/mlton/codegen/amd64-codegen/amd64-mlton-basic.sig
U mlton/trunk/mlton/codegen/amd64-codegen/amd64-pseudo.sig
U mlton/trunk/mlton/codegen/amd64-codegen/amd64-simplify.sig
U mlton/trunk/mlton/codegen/amd64-codegen/amd64-translate.sig
U mlton/trunk/mlton/codegen/amd64-codegen/amd64.sig
U mlton/trunk/mlton/codegen/amd64-codegen/peephole.sig
U mlton/trunk/mlton/codegen/bytecode/bytecode.fun
U mlton/trunk/mlton/codegen/c-codegen/c-codegen.fun
U mlton/trunk/mlton/codegen/x86-codegen/peephole.sig
U mlton/trunk/mlton/codegen/x86-codegen/x86-allocate-registers.sig
U mlton/trunk/mlton/codegen/x86-codegen/x86-generate-transfers.sig
U mlton/trunk/mlton/codegen/x86-codegen/x86-jump-info.sig
U mlton/trunk/mlton/codegen/x86-codegen/x86-liveness.fun
U mlton/trunk/mlton/codegen/x86-codegen/x86-loop-info.sig
U mlton/trunk/mlton/codegen/x86-codegen/x86-mlton-basic.sig
U mlton/trunk/mlton/codegen/x86-codegen/x86-pseudo.sig
U mlton/trunk/mlton/codegen/x86-codegen/x86-simplify.sig
U mlton/trunk/mlton/codegen/x86-codegen/x86-translate.sig
U mlton/trunk/mlton/codegen/x86-codegen/x86.sig
U mlton/trunk/mlton/control/bits.sml
U mlton/trunk/mlton/control/control-flags.sig
U mlton/trunk/mlton/control/control.sig
U mlton/trunk/mlton/control/source-pos.sig
U mlton/trunk/mlton/control/source.sig
U mlton/trunk/mlton/control/system.sig
U mlton/trunk/mlton/elaborate/elaborate-core.sig
U mlton/trunk/mlton/elaborate/elaborate-env.fun
U mlton/trunk/mlton/elaborate/interface.fun
U mlton/trunk/mlton/elaborate/precedence-parse.sig
U mlton/trunk/mlton/elaborate/type-env.fun
U mlton/trunk/mlton/front-end/ml.grm
U mlton/trunk/mlton/front-end/ml.lex
U mlton/trunk/mlton/front-end/mlb.grm
U mlton/trunk/mlton/front-end/mlb.lex
U mlton/trunk/mlton/front-end/sources.mlb
U mlton/trunk/mlton/main/lookup-constant.sig
U mlton/trunk/mlton/main/main.sig
U mlton/trunk/mlton/match-compile/match-compile.sig
U mlton/trunk/mlton/ssa/analyze.sig
U mlton/trunk/mlton/ssa/analyze2.sig
U mlton/trunk/mlton/ssa/common-subexp.fun
U mlton/trunk/mlton/ssa/deep-flatten.fun
U mlton/trunk/mlton/ssa/direct-exp.sig
U mlton/trunk/mlton/ssa/direct-exp2.sig
U mlton/trunk/mlton/ssa/global.sig
U mlton/trunk/mlton/ssa/inline.fun
U mlton/trunk/mlton/ssa/inline.sig
U mlton/trunk/mlton/ssa/known-case.fun
U mlton/trunk/mlton/ssa/n-point-lattice.sig
U mlton/trunk/mlton/ssa/poly-equal.fun
U mlton/trunk/mlton/ssa/poly-hash.fun
U mlton/trunk/mlton/ssa/prepasses.fun
U mlton/trunk/mlton/ssa/redundant-tests.fun
U mlton/trunk/mlton/ssa/redundant.fun
U mlton/trunk/mlton/ssa/ref-flatten.fun
U mlton/trunk/mlton/ssa/remove-unused.fun
U mlton/trunk/mlton/ssa/remove-unused2.fun
U mlton/trunk/mlton/ssa/restore.fun
U mlton/trunk/mlton/ssa/restore2.fun
U mlton/trunk/mlton/ssa/shrink.fun
U mlton/trunk/mlton/ssa/shrink2.fun
U mlton/trunk/mlton/ssa/simplify-types.fun
U mlton/trunk/mlton/ssa/simplify.fun
U mlton/trunk/mlton/ssa/ssa-tree.fun
U mlton/trunk/mlton/ssa/ssa-tree.sig
U mlton/trunk/mlton/ssa/ssa-tree2.fun
U mlton/trunk/mlton/ssa/ssa-tree2.sig
U mlton/trunk/mlton/ssa/type-check.fun
U mlton/trunk/mlton/ssa/type-check2.fun
U mlton/trunk/mlton/ssa/useless.fun
U mlton/trunk/mlton/ssa/zone.fun
U mlton/trunk/mlton/xml/polyvariance.sig
U mlton/trunk/mlton/xml/shrink.fun
U mlton/trunk/mlton/xml/simplify-types.sig
U mlton/trunk/mlton/xml/uncurry.sig
U mlton/trunk/mlton/xml/xml-tree.sig
U mlton/trunk/mlyacc/src/sources.cm
----------------------------------------------------------------------
Modified: mlton/trunk/basis-library/mlton/socket.sig
===================================================================
--- mlton/trunk/basis-library/mlton/socket.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/basis-library/mlton/socket.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,4 +1,5 @@
-(* Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
* Copyright (C) 1997-2000 NEC Research Institute.
*
@@ -21,14 +22,6 @@
-> (string * Posix.Error.syserror option) option
end
- structure Host:
- sig
- type t = {name: string}
-
- val getByAddress: Address.t -> t option
- val getByName: string -> t option
- end
-
structure Port:
sig
type t = int
Modified: mlton/trunk/basis-library/mlton/socket.sml
===================================================================
--- mlton/trunk/basis-library/mlton/socket.sml 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/basis-library/mlton/socket.sml 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,4 +1,5 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
* Copyright (C) 1997-2000 NEC Research Institute.
*
@@ -9,26 +10,17 @@
structure MLtonSocket: MLTON_SOCKET =
struct
-structure Port =
- struct
- type t = int
- end
-
structure Address =
struct
type t = NetHostDB.in_addr
fun toVector x = x
end
-structure Host =
- struct
- type t = {name: string}
+structure Ctl = Socket.CtlExtra
- val get: NetHostDB.entry option -> t option =
- Option.map (fn entry => {name = NetHostDB.name entry})
-
- val getByAddress = get o NetHostDB.getByAddr
- val getByName = get o NetHostDB.getByName
+structure Port =
+ struct
+ type t = int
end
type passiveSocket = (INetSock.inet, Socket.passive Socket.stream) Socket.sock
@@ -103,6 +95,4 @@
val fdToSock = Socket.fdToSock
-structure Ctl = Socket.CtlExtra
-
end
Deleted: mlton/trunk/lib/basis-stubs/Makefile
===================================================================
--- mlton/trunk/lib/basis-stubs/Makefile 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/basis-stubs/Makefile 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,11 +0,0 @@
-## Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
- # Jagannathan, and Stephen Weeks.
- # Copyright (C) 1997-2000 NEC Research Institute.
- #
- # MLton is released under a BSD-style license.
- # See the file MLton-LICENSE for details.
- ##
-
-.PHONY: clean
-clean:
- ../../bin/clean
Deleted: mlton/trunk/lib/basis-stubs/basis-2002.sml
===================================================================
--- mlton/trunk/lib/basis-stubs/basis-2002.sml 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/basis-stubs/basis-2002.sml 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,56 +0,0 @@
-(* Copyright (C) 2002-2005 Henry Cejtin, Matthew Fluet, Suresh
- * Jagannathan, and Stephen Weeks.
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-structure Basis2002 =
- struct
- structure Array = Array
- structure Array2 = Array2
- structure BinIO = BinIO
- structure Bool = Bool
- structure Byte = Byte
- structure Char = Char
- structure CharArray = CharArray
- structure CharVector = CharVector
- structure CommandLine = CommandLine
- structure Date = Date
- structure General = General
- structure IEEEReal = IEEEReal
- structure Int = Int
- structure Int32 = Int32
- structure IntInf = IntInf
- structure IO = IO
- structure LargeInt = LargeInt
- structure LargeReal = LargeReal
- structure LargeWord = LargeWord
- structure List = List
- structure ListPair = ListPair
- structure Math = Math
- structure OS = OS
- structure Option = Option
- structure Position = Position
- structure Posix = Posix
- structure Real = Real
- structure Real64Array = Real64Array
- structure RealArray = RealArray
- structure RealVector = RealVector
- structure SML90 = SML90
- structure SMLofNJ = SMLofNJ
- structure String = String
- structure StringCvt = StringCvt
- structure Substring = Substring
- structure SysWord = SysWord
- structure TextIO = TextIO
- structure Time = Time
- structure Unix = Unix
- structure Unsafe = Unsafe
- structure Vector = Vector
- structure Word = Word
- structure Word32 = Word32
- structure Word8 = Word8
- structure Word8Array = Word8Array
- structure Word8Vector = Word8Vector
- end
Deleted: mlton/trunk/lib/basis-stubs/sources.cm
===================================================================
--- mlton/trunk/lib/basis-stubs/sources.cm 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/basis-stubs/sources.cm 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,19 +0,0 @@
-(* Copyright (C) 2002-2005 Henry Cejtin, Matthew Fluet, Suresh
- * Jagannathan, and Stephen Weeks.
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-Library
-
-structure Basis2002
-
-is
-
-#if (defined (SMLNJ_VERSION))
-$/basis.cm
-$/smlnj-lib.cm
-#endif
-
-basis-2002.sml
Copied: mlton/trunk/lib/basis-stubs-for-smlnj/Makefile (from rev 7060, mlton/trunk/lib/mlton-stubs-in-smlnj/Makefile)
===================================================================
--- mlton/trunk/lib/mlton-stubs-in-smlnj/Makefile 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/basis-stubs-for-smlnj/Makefile 2009-04-08 12:32:06 UTC (rev 7061)
@@ -0,0 +1,12 @@
+## Copyright (C) 2009 Matthew Fluet.
+ # Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
+ # Jagannathan, and Stephen Weeks.
+ # Copyright (C) 1997-2000 NEC Research Institute.
+ #
+ # MLton is released under a BSD-style license.
+ # See the file MLton-LICENSE for details.
+ ##
+
+.PHONY: clean
+clean:
+ ../../bin/clean
Copied: mlton/trunk/lib/basis-stubs-for-smlnj/char.sml (from rev 7060, mlton/trunk/lib/mlton-stubs-in-smlnj/char.sml)
===================================================================
--- mlton/trunk/lib/mlton-stubs-in-smlnj/char.sml 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/basis-stubs-for-smlnj/char.sml 2009-04-08 12:32:06 UTC (rev 7061)
@@ -0,0 +1,18 @@
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+ * Jagannathan, and Stephen Weeks.
+ * Copyright (C) 1997-2000 NEC Research Institute.
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+structure Char : CHAR =
+ struct
+ open Pervasive.Char
+
+ (* SML/NJ doesn't escape #"\000" to three octal digits. *)
+ val toCString =
+ fn #"\000" => "\\000"
+ | c => toCString c
+ end
Added: mlton/trunk/lib/basis-stubs-for-smlnj/ieee-real.sml
===================================================================
--- mlton/trunk/lib/basis-stubs-for-smlnj/ieee-real.sml 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/basis-stubs-for-smlnj/ieee-real.sml 2009-04-08 12:32:06 UTC (rev 7061)
@@ -0,0 +1,58 @@
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 2005 Henry Cejtin, Matthew Fluet, Suresh
+ * Jagannathan, and Stephen Weeks.
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(* SML/NJ uses an old version of datatype IEEEReal.float_class. *)
+signature IEEE_REAL =
+ sig
+ exception Unordered
+ datatype real_order = EQUAL | GREATER | LESS | UNORDERED
+ datatype float_class = INF | NAN | NORMAL | SUBNORMAL | ZERO
+ datatype rounding_mode = TO_NEAREST | TO_NEGINF | TO_POSINF | TO_ZERO
+ val setRoundingMode : rounding_mode -> unit
+ val getRoundingMode : unit -> rounding_mode
+ type decimal_approx = {digits:int list, exp:int, kind:float_class, sign:bool}
+ val toString : decimal_approx -> string
+ val fromString : string -> decimal_approx option
+ val scan : (char,'a) StringCvt.reader -> (decimal_approx,'a) StringCvt.reader
+ end
+
+structure IEEEReal : IEEE_REAL =
+ struct
+ open IEEEReal
+
+ datatype float_class = NAN | INF | ZERO | NORMAL | SUBNORMAL
+ type decimal_approx = {digits:int list, exp:int, kind:float_class, sign:bool}
+
+ local
+ structure P = Pervasive.IEEEReal
+ fun toGoodFC c =
+ case c of
+ P.NAN _ => NAN
+ | P.INF => INF
+ | P.ZERO => ZERO
+ | P.NORMAL => NORMAL
+ | P.SUBNORMAL => SUBNORMAL
+ fun toBadFC c =
+ case c of
+ NAN => P.NAN P.QUIET
+ | INF => P.INF
+ | ZERO => P.ZERO
+ | NORMAL => P.NORMAL
+ | SUBNORMAL => P.SUBNORMAL
+ fun toGoodDA {digits, exp, kind, sign} =
+ {digits = digits, exp = exp, kind = toGoodFC kind, sign = sign}
+ fun toBadDA {digits, exp, kind, sign} =
+ {digits = digits, exp = exp, kind = toBadFC kind, sign = sign}
+ in
+ val toString = P.toString o toBadDA
+ val fromString = (Option.map toGoodDA) o P.fromString
+ fun scan r s =
+ Option.map (fn (da,x) => (toGoodDA da,x)) (P.scan r s)
+ end
+
+ end
Added: mlton/trunk/lib/basis-stubs-for-smlnj/int-inf.sml
===================================================================
--- mlton/trunk/lib/basis-stubs-for-smlnj/int-inf.sml 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/basis-stubs-for-smlnj/int-inf.sml 2009-04-08 12:32:06 UTC (rev 7061)
@@ -0,0 +1,38 @@
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+ * Jagannathan, and Stephen Weeks.
+ * Copyright (C) 1997-2000 NEC Research Institute.
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+functor FixIntInf(PIntInf: sig include INT_INF end) : INT_INF =
+ struct
+ open PIntInf
+ local
+ structure FIntInf = FixInt(struct open PIntInf end)
+ in
+ open FIntInf
+ end
+
+ (* SML/NJ doesn't properly shift IntInf.int values. *)
+ local
+ fun pow2 w =
+ if w = 0wx0
+ then 1
+ else
+ let
+ val p = pow2 (Pervasive.Word.>> (w, 0wx1))
+ val pp = p * p
+ in
+ if 0wx1 = Pervasive.Word.andb (0wx1, w)
+ then 2 * pp
+ else pp
+ end
+ in
+ val ~>> = fn (a, b) => a div (pow2 b)
+ end
+ end
+
+structure IntInf = FixIntInf(struct open Pervasive.IntInf end)
Added: mlton/trunk/lib/basis-stubs-for-smlnj/int.sml
===================================================================
--- mlton/trunk/lib/basis-stubs-for-smlnj/int.sml 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/basis-stubs-for-smlnj/int.sml 2009-04-08 12:32:06 UTC (rev 7061)
@@ -0,0 +1,29 @@
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+ * Jagannathan, and Stephen Weeks.
+ * Copyright (C) 1997-2000 NEC Research Institute.
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+functor FixInt(PInt: sig include INTEGER end) : INTEGER =
+ struct
+ open PInt
+
+ local
+ (* SML/NJ uses lower instead of upper case. *)
+ val toUpper = String.translate (Char.toString o Char.toUpper)
+ in
+ fun fmt r w = toUpper (PInt.fmt r w)
+ fun toString w = toUpper (PInt.toString w)
+ end
+ end
+
+structure FixedInt = FixInt(struct open Pervasive.FixedInt end)
+structure Int = FixInt(struct open Pervasive.Int end)
+structure Int31 = FixInt(struct open Pervasive.Int31 end)
+structure Int32 = FixInt(struct open Pervasive.Int32 end)
+structure Int64 = FixInt(struct open Pervasive.Int64 end)
+structure LargeInt = FixInt(struct open Pervasive.LargeInt end)
+structure Position = FixInt(struct open Pervasive.Position end)
Copied: mlton/trunk/lib/basis-stubs-for-smlnj/pervasive.cm (from rev 7060, mlton/trunk/lib/basis-stubs/sources.cm)
===================================================================
--- mlton/trunk/lib/basis-stubs/sources.cm 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/basis-stubs-for-smlnj/pervasive.cm 2009-04-08 12:32:06 UTC (rev 7061)
@@ -0,0 +1,17 @@
+(* Copyright (C) 2009 Matthew Fluet.
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+Library
+
+signature PERVASIVE_REAL
+structure Pervasive
+
+is
+
+#if (defined (SMLNJ_VERSION))
+$/basis.cm
+#endif
+pervasive.sml
Added: mlton/trunk/lib/basis-stubs-for-smlnj/pervasive.sml
===================================================================
--- mlton/trunk/lib/basis-stubs-for-smlnj/pervasive.sml 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/basis-stubs-for-smlnj/pervasive.sml 2009-04-08 12:32:06 UTC (rev 7061)
@@ -0,0 +1,34 @@
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
+ * Jagannathan, and Stephen Weeks.
+ * Copyright (C) 1997-2000 NEC Research Institute.
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+signature PERVASIVE_REAL = REAL
+structure Pervasive =
+ struct
+ structure Char = Char
+ structure FixedInt = FixedInt
+ structure IEEEReal = IEEEReal
+ structure Int = Int
+ structure Int31 = Int31
+ structure Int32 = Int32
+ structure Int64 = Int64
+ structure IntInf = IntInf
+ structure LargeInt = LargeInt
+ structure LargeReal = LargeReal
+ structure LargeWord = LargeWord
+ structure Position = Position
+ structure Real = Real
+ structure Real64 = Real64
+ structure Word = Word
+ structure Word8 = Word8
+ structure Word31 = Word31
+ structure Word32 = Word32
+ structure Word64 = Word64
+ structure String = String
+ structure SysWord = SysWord
+ end
Added: mlton/trunk/lib/basis-stubs-for-smlnj/real.sml
===================================================================
--- mlton/trunk/lib/basis-stubs-for-smlnj/real.sml 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/basis-stubs-for-smlnj/real.sml 2009-04-08 12:32:06 UTC (rev 7061)
@@ -0,0 +1,229 @@
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+ * Jagannathan, and Stephen Weeks.
+ * Copyright (C) 1997-2000 NEC Research Institute.
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(* SML/NJ uses an old version of datatype IEEEReal.float_class. *)
+signature REAL =
+ sig
+ type real
+
+ structure Math: MATH where type real = real
+
+ val != : real * real -> bool
+ val * : real * real -> real
+ val *+ : real * real * real -> real
+ val *- : real * real * real -> real
+ val + : real * real -> real
+ val - : real * real -> real
+ val / : real * real -> real
+ val < : real * real -> bool
+ val <= : real * real -> bool
+ val == : real * real -> bool
+ val > : real * real -> bool
+ val >= : real * real -> bool
+ val ?= : real * real -> bool
+ val abs: real -> real
+ val checkFloat: real -> real
+ val class: real -> IEEEReal.float_class
+ val compare: real * real -> order
+ val compareReal: real * real -> IEEEReal.real_order
+ val copySign: real * real -> real
+ val fmt: StringCvt.realfmt -> real -> string
+ val fromDecimal: IEEEReal.decimal_approx -> real option
+ val fromInt: int -> real
+ val fromLarge: IEEEReal.rounding_mode -> LargeReal.real -> real
+ val fromLargeInt: LargeInt.int -> real
+ val fromManExp: {man: real, exp: int} -> real
+ val fromString: string -> real option
+ val isFinite: real -> bool
+ val isNan: real -> bool
+ val isNormal: real -> bool
+ val max: real * real -> real
+ val maxFinite: real
+ val min: real * real -> real
+ val minNormalPos: real
+ val minPos: real
+ val negInf: real
+ val nextAfter: real * real -> real
+ val posInf: real
+ val precision: int
+ val radix: int
+ val realCeil: real -> real
+ val realFloor: real -> real
+ val realMod: real -> real
+ val realRound: real -> real
+ val realTrunc: real -> real
+ val rem: real * real -> real
+ val round: real -> Int.int
+ val sameSign: real * real -> bool
+ val scan: (char, 'a) StringCvt.reader -> (real, 'a) StringCvt.reader
+ val sign: real -> int
+ val signBit: real -> bool
+ val split: real -> {whole: real, frac: real}
+ val toDecimal: real -> IEEEReal.decimal_approx
+ val toInt: IEEEReal.rounding_mode -> real -> int
+ val toLarge: real -> LargeReal.real
+ val toLargeInt: IEEEReal.rounding_mode -> real -> LargeInt.int
+ val toManExp: real -> {man: real, exp: int}
+ val toString: real -> string
+ val unordered: real * real -> bool
+ val ~ : real -> real
+ val ceil: real -> Int.int
+ val floor: real -> Int.int
+ val trunc: real -> Int.int
+ end
+
+functor FixReal(PReal: sig include PERVASIVE_REAL val zero : real end) : REAL =
+ struct
+ open PReal
+
+ local
+ datatype z = datatype IEEEReal.float_class
+ structure P = Pervasive.IEEEReal
+ fun toGoodFC c =
+ case c of
+ P.NAN _ => NAN
+ | P.INF => INF
+ | P.ZERO => ZERO
+ | P.NORMAL => NORMAL
+ | P.SUBNORMAL => SUBNORMAL
+ fun toBadFC c =
+ case c of
+ NAN => P.NAN P.QUIET
+ | INF => P.INF
+ | ZERO => P.ZERO
+ | NORMAL => P.NORMAL
+ | SUBNORMAL => P.SUBNORMAL
+ fun toGoodDA {digits, exp, kind, sign} =
+ {digits = digits, exp = exp, kind = toGoodFC kind, sign = sign}
+ fun toBadDA {digits, exp, kind, sign} =
+ {digits = digits, exp = exp, kind = toBadFC kind, sign = sign}
+ in
+ val class = toGoodFC o class
+ val fromDecimal = SOME o fromDecimal o toBadDA
+ val toDecimal = toGoodDA o toDecimal
+ end
+
+ (* SML/NJ doesn't support EXACT
+ * and doesn't include a leading "~" for ~0.0.
+ *)
+ fun fmt f =
+ let
+ val fmt =
+ PReal.fmt
+ (let
+ datatype z = datatype StringCvt.realfmt
+ in
+ case f of
+ EXACT => StringCvt.GEN NONE
+ | FIX io => StringCvt.FIX io
+ | GEN io => StringCvt.GEN io
+ | SCI io => StringCvt.SCI io
+ end)
+ in
+ fn r =>
+ if == (zero, r) andalso signBit r
+ then "~" ^ (fmt r)
+ else fmt r
+ end
+
+ (* SML/NJ doesn't handle "[+~-]?(inf|infinity|nan)"
+ * and raises Overflow on large exponents.
+ *)
+ fun fromString s =
+ case s of
+ "inf" => SOME posInf
+ | "infinity" => SOME posInf
+ | "+inf" => SOME posInf
+ | "+infinity" => SOME posInf
+ | "~inf" => SOME negInf
+ | "~infinity" => SOME negInf
+ | "-inf" => SOME negInf
+ | "-infinity" => SOME negInf
+ | "nan" => SOME (negInf + posInf)
+ | "+nan" => SOME (negInf + posInf)
+ | "~nan" => SOME (negInf + posInf)
+ | "-nan" => SOME (negInf + posInf)
+ | _ =>
+ (case SOME (PReal.fromString s) handle Overflow => NONE of
+ NONE =>
+ let
+ val manexp =
+ String.tokens
+ (fn c => c = #"e" orelse c = #"E")
+ s
+ fun isNeg s =
+ String.sub (s, 0) = #"~"
+ orelse String.sub (s, 0) = #"+"
+ fun isNonzero s =
+ CharVector.exists
+ (fn c => Char.<= (#"1", c) andalso Char.<= (c, #"9"))
+ s
+ in
+ case manexp of
+ [man,exp] =>
+ if isNeg exp
+ then SOME zero
+ else if isNonzero man
+ then SOME posInf
+ else SOME zero
+ | _ => NONE
+ end
+ | SOME ro => ro)
+ end
+
+structure LargeReal = FixReal(struct open Pervasive.LargeReal val zero : real = 0.0 end)
+structure Real = FixReal(struct open Pervasive.Real val zero : real = 0.0 end)
+structure Real64 = FixReal(struct open Pervasive.Real64 val zero : real = 0.0 end)
+structure Real32 = Real64
+
+(* Dummy implementation that will not be used at run-time. *)
+structure PackReal32Big : PACK_REAL where type real = Real32.real = struct
+ type real = Real32.real
+ val bytesPerElem = 0
+ val isBigEndian = false
+ fun toBytes _ = raise Fail "PackReal32Big.toBytes"
+ fun fromBytes _ = raise Fail "PackReal32Big.fromBytes"
+ fun subVec _ = raise Fail "PackReal32Big.subVec"
+ fun subArr _ = raise Fail "PackReal32Big.subArr"
+ fun update _ = raise Fail "PackReal32Big.update"
+end
+(* Dummy implementation that will not be used at run-time. *)
+structure PackReal32Little : PACK_REAL where type real = Real32.real = struct
+ type real = Real32.real
+ val bytesPerElem = 0
+ val isBigEndian = false
+ fun toBytes _ = raise Fail "PackReal32Little.toBytes"
+ fun fromBytes _ = raise Fail "PackReal32Little.fromBytes"
+ fun subVec _ = raise Fail "PackReal32Little.subVec"
+ fun subArr _ = raise Fail "PackReal32Little.subArr"
+ fun update _ = raise Fail "PackReal32Little.update"
+end
+
+(* Dummy implementation that will not be used at run-time. *)
+structure PackReal64Big : PACK_REAL where type real = Real64.real = struct
+ type real = Real64.real
+ val bytesPerElem = 0
+ val isBigEndian = false
+ fun toBytes _ = raise Fail "PackReal64Big.toBytes"
+ fun fromBytes _ = raise Fail "PackReal64Big.fromBytes"
+ fun subVec _ = raise Fail "PackReal64Big.subVec"
+ fun subArr _ = raise Fail "PackReal64Big.subArr"
+ fun update _ = raise Fail "PackReal64Big.update"
+end
+(* Dummy implementation that will not be used at run-time. *)
+structure PackReal64Little : PACK_REAL where type real = Real64.real = struct
+ type real = Real64.real
+ val bytesPerElem = 0
+ val isBigEndian = false
+ fun toBytes _ = raise Fail "PackReal64Little.toBytes"
+ fun fromBytes _ = raise Fail "PackReal64Little.fromBytes"
+ fun subVec _ = raise Fail "PackReal64Little.subVec"
+ fun subArr _ = raise Fail "PackReal64Little.subArr"
+ fun update _ = raise Fail "PackReal64Little.update"
+end
Added: mlton/trunk/lib/basis-stubs-for-smlnj/sources.cm
===================================================================
--- mlton/trunk/lib/basis-stubs-for-smlnj/sources.cm 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/basis-stubs-for-smlnj/sources.cm 2009-04-08 12:32:06 UTC (rev 7061)
@@ -0,0 +1,86 @@
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 2002-2006 Henry Cejtin, Matthew Fluet, Suresh
+ * Jagannathan, and Stephen Weeks.
+ * Copyright (C) 1997-2000 NEC Research Institute.
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+Library
+
+library($/basis.cm) - (
+ signature IEEE_REAL
+ signature REAL
+
+ structure Char
+ structure FixedInt
+ structure IEEEReal
+ structure Int
+ structure Int31
+ structure Int32
+ structure Int64
+ structure IntInf
+ structure LargeInt
+ structure LargeReal
+ structure LargeWord
+ structure PackReal32Big
+ structure PackReal64Big
+ structure PackReal32Little
+ structure PackReal64Little
+ structure PackWord64Big
+ structure PackWord64Little
+ structure Position
+ structure Real
+ structure Real32
+ structure Real64
+ structure Word
+ structure Word8
+ structure Word31
+ structure Word32
+ structure Word64
+ structure String
+ structure SysWord
+ )
+
+signature IEEE_REAL
+signature REAL
+
+structure Char
+structure FixedInt
+structure IEEEReal
+structure Int
+structure Int31
+structure Int32
+structure Int64
+structure IntInf
+structure LargeInt
+structure LargeReal
+structure LargeWord
+structure PackReal32Little
+structure PackReal64Little
+structure PackWord64Little
+structure Position
+structure Real
+structure Real32
+structure Real64
+structure String
+structure SysWord
+structure Word
+structure Word8
+structure Word31
+structure Word32
+structure Word64
+
+is
+
+$/basis.cm
+pervasive.cm
+
+char.sml
+ieee-real.sml
+int-inf.sml
+int.sml
+real.sml
+string.sml
+word.sml
Added: mlton/trunk/lib/basis-stubs-for-smlnj/string.sml
===================================================================
--- mlton/trunk/lib/basis-stubs-for-smlnj/string.sml 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/basis-stubs-for-smlnj/string.sml 2009-04-08 12:32:06 UTC (rev 7061)
@@ -0,0 +1,16 @@
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
+ * Jagannathan, and Stephen Weeks.
+ * Copyright (C) 1997-2000 NEC Research Institute.
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+structure String : STRING =
+ struct
+ open Pervasive.String
+
+ (* SML/NJ doesn't escape #"\000" to three octal digits. *)
+ val toCString = translate Char.toCString
+ end
Added: mlton/trunk/lib/basis-stubs-for-smlnj/word.sml
===================================================================
--- mlton/trunk/lib/basis-stubs-for-smlnj/word.sml 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/basis-stubs-for-smlnj/word.sml 2009-04-08 12:32:06 UTC (rev 7061)
@@ -0,0 +1,50 @@
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006, 2008 Henry Cejtin, Matthew Fluet, Suresh
+ * Jagannathan, and Stephen Weeks.
+ * Copyright (C) 1997-2000 NEC Research Institute.
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+functor FixWord(PWord: sig include WORD end) : WORD =
+ struct
+ open PWord
+
+ local
+ (* SML/NJ uses lower instead of upper case. *)
+ val toUpper = String.translate (Char.toString o Char.toUpper)
+ in
+ fun fmt r w = toUpper (PWord.fmt r w)
+ fun toString w = toUpper (PWord.toString w)
+ end
+ end
+
+structure LargeWord = FixWord(struct open Pervasive.LargeWord end)
+structure Word = FixWord(struct open Pervasive.Word end)
+structure Word8 = FixWord(struct open Pervasive.Word8 end)
+structure Word31 = FixWord(struct open Pervasive.Word31 end)
+structure Word32 = FixWord(struct open Pervasive.Word32 end)
+structure Word64 = FixWord(struct open Pervasive.Word64 end)
+structure SysWord = FixWord(struct open Pervasive.SysWord end)
+
+(* Dummy implementation that will not be used at run-time. *)
+structure PackWord64Big : PACK_WORD = struct
+ val bytesPerElem = 0
+ val isBigEndian = true
+ fun subVec _ = raise Fail "PackWord64Big.subVec"
+ fun subVecX _ = raise Fail "PackWord64Big.subVecX"
+ fun subArr _ = raise Fail "PackWord64Big.subArr"
+ fun subArrX _ = raise Fail "PackWord64Big.subArrX"
+ fun update _ = raise Fail "PackWord64Big.update"
+end
+(* Dummy implementation that will not be used at run-time. *)
+structure PackWord64Little : PACK_WORD = struct
+ val bytesPerElem = 0
+ val isBigEndian = false
+ fun subVec _ = raise Fail "PackWord64Little.subVec"
+ fun subVecX _ = raise Fail "PackWord64Little.subVecX"
+ fun subArr _ = raise Fail "PackWord64Little.subArr"
+ fun subArrX _ = raise Fail "PackWord64Little.subArrX"
+ fun update _ = raise Fail "PackWord64Little.update"
+end
Modified: mlton/trunk/lib/mlton/basic/append-list.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/append-list.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/append-list.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-
signature APPEND_LIST =
sig
type 'a t
Modified: mlton/trunk/lib/mlton/basic/array.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/array.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/array.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-
signature ARRAY_STRUCTS =
sig
include VECTOR_STRUCTS
Modified: mlton/trunk/lib/mlton/basic/array2.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/array2.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/array2.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-
signature ARRAY2 =
sig
type 'a t
Modified: mlton/trunk/lib/mlton/basic/base64.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/base64.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/base64.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,4 +1,5 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
@@ -7,8 +8,6 @@
(* Base64 encoding, as in RFC 1421 *)
-type int = Int.t
-
signature BASE64 =
sig
val decode: string -> string
Modified: mlton/trunk/lib/mlton/basic/base64.sml
===================================================================
--- mlton/trunk/lib/mlton/basic/base64.sml 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/base64.sml 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,4 +1,5 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
@@ -7,8 +8,6 @@
structure Base64: BASE64 =
struct
- type int = Int.t
-
val chars =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
Modified: mlton/trunk/lib/mlton/basic/binary-search.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/binary-search.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/binary-search.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-
signature BINARY_SEARCH =
sig
(* largest(a, f)
Modified: mlton/trunk/lib/mlton/basic/buffer.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/buffer.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/buffer.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-
signature BUFFER_STRUCTS =
sig
end
Modified: mlton/trunk/lib/mlton/basic/char-buffer.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/char-buffer.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/char-buffer.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-
signature CHAR_BUFFER_STRUCTS =
sig
end
Modified: mlton/trunk/lib/mlton/basic/char.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/char.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/char.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,13 +1,11 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Pervasive.Int.int
-type word8 = Pervasive.Word8.word
-
signature CHAR =
sig
type t = char
@@ -29,7 +27,7 @@
val fromHexDigit: int -> t
val fromInt: int -> t
val fromString: string -> t option
- val fromWord8: word8 -> t
+ val fromWord8: Word8.t -> t
val isAlpha: t -> bool
val isAlphaNum: t -> bool
val isAscii: t -> bool
@@ -60,7 +58,7 @@
val toLower: t -> t
val toString: t -> string
val toUpper: t -> t
- val toWord8: t -> word8
+ val toWord8: t -> Word8.t
end
functor TestChar (S: CHAR): sig end =
Modified: mlton/trunk/lib/mlton/basic/char0.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/char0.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/char0.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,4 +1,5 @@
-(* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
@@ -15,18 +16,23 @@
val >= : t * t -> bool
val chr: Pervasive.Int.int -> t
- val compare: t * t -> Relation.t
+ val compare: t * t -> order
val dash: t
val digitToInt: t -> Pervasive.Int.int option
val dquote: t (* " *)
val equals: t * t -> bool
+ val escapeC: t -> string
+ val escapeSML: t -> string
val fromCString: string -> t option
+ val fromHexDigit: int -> t
val fromDigit: Pervasive.Int.int -> t
val fromInt: Pervasive.Int.int -> t
val fromString: string -> t option
+ val fromWord8: Pervasive.Word8.word -> t
val isAlpha: t -> bool
val isAlphaNum: t -> bool
val isAscii: t -> bool
+ val isCntrl: t -> bool
val isDigit: t -> bool
val isGraph: t -> bool
val isHexDigit: t -> bool
@@ -36,19 +42,23 @@
val isUpper: t -> bool
val max: t * t -> t
val maxChar: t
+ val maxOrd: int
val memoize: (char -> 'a) -> (char -> 'a)
val min: t * t -> t
val minChar: t
val newline: t
+ val numChars: int
val ord: t -> Pervasive.Int.int
val output: t * TextIO.outstream -> unit
val pred: t -> t
val space: t
val succ: t -> t
+ val toHexDigit: t -> int
val toInt: t -> Pervasive.Int.int
val toCString: t -> string
val toLower: t -> t
- val toPrintable: t -> string
+ (* val toPrintable: t -> string *)
val toString: t -> string
val toUpper: t -> t
+ val toWord8: t -> Pervasive.Word8.word
end
Modified: mlton/trunk/lib/mlton/basic/char0.sml
===================================================================
--- mlton/trunk/lib/mlton/basic/char0.sml 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/char0.sml 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,16 +1,16 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-structure Char0 =
+structure Char0 : CHAR0 =
struct
structure Array = Pervasive.Array
structure Int = Pervasive.Int
-type int = Int.int
structure String = Pervasive.String
open Pervasive.Char
@@ -25,7 +25,7 @@
val escapeSML = toString
val escapeC = toCString
val toString = String.str
-val equals = op =
+val equals: t * t -> bool = op =
val toWord8 = Byte.charToByte
val fromWord8 = Byte.byteToChar
Modified: mlton/trunk/lib/mlton/basic/choice-pattern.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/choice-pattern.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/choice-pattern.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 2002-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 2002-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-
signature CHOICE_PATTERN =
sig
(* expand "ab{c{d,e},f{gh}}{i,j}" =
Modified: mlton/trunk/lib/mlton/basic/console.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/console.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/console.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-
signature CONSOLE =
sig
structure Background:
Modified: mlton/trunk/lib/mlton/basic/counter.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/counter.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/counter.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-
signature COUNTER =
sig
type t
Modified: mlton/trunk/lib/mlton/basic/counter.sml
===================================================================
--- mlton/trunk/lib/mlton/basic/counter.sml 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/counter.sml 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,4 +1,5 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
@@ -8,8 +9,6 @@
structure Counter: COUNTER =
struct
-type int = Int.t
-
datatype t = T of int ref
fun new n = T(ref n)
Modified: mlton/trunk/lib/mlton/basic/date.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/date.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/date.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Pervasive.Int.int
-
signature DATE_STRUCTS =
sig
end
Modified: mlton/trunk/lib/mlton/basic/directed-graph.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/directed-graph.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/directed-graph.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-
signature DIRECTED_GRAPH =
sig
structure Node:
Modified: mlton/trunk/lib/mlton/basic/directed-sub-graph.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/directed-sub-graph.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/directed-sub-graph.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-
signature DIRECTED_SUB_GRAPH =
sig
(* the main graph type *)
Modified: mlton/trunk/lib/mlton/basic/dot.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/dot.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/dot.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-
signature DOT =
sig
datatype color = datatype DotColor.t
Modified: mlton/trunk/lib/mlton/basic/engine.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/engine.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/engine.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-
signature ENGINE =
sig
type 'a t
Modified: mlton/trunk/lib/mlton/basic/env.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/env.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/env.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-
signature ENV_STRUCTS =
sig
structure Domain: T
Modified: mlton/trunk/lib/mlton/basic/fold.fun
===================================================================
--- mlton/trunk/lib/mlton/basic/fold.fun 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/fold.fun 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,4 +1,5 @@
-(* Copyright (C) 1999-2006, 2008 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006, 2008 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
@@ -9,8 +10,6 @@
struct
structure Int = Pervasive.Int
-type int = Int.int
-
open S
fun foldi (l: 'a t, b, f) =
Modified: mlton/trunk/lib/mlton/basic/fold.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/fold.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/fold.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Pervasive.Int.int
-
signature FOLD_STRUCTS =
sig
type 'a t
Modified: mlton/trunk/lib/mlton/basic/format.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/format.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/format.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-
signature FORMAT =
sig
type ('a, 'b) t
Modified: mlton/trunk/lib/mlton/basic/hash-set.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/hash-set.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/hash-set.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,13 +1,11 @@
-(* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-type word = Word.t
-
signature HASH_SET =
sig
type 'a t
Modified: mlton/trunk/lib/mlton/basic/hash-table.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/hash-table.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/hash-table.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,4 +1,5 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
@@ -6,9 +7,6 @@
*)
(* This code is not working -- it is not even in sources.cm *)
-type int = Int.t
-type word = Word.t
-
signature HASH_TABLE =
sig
type ('a, 'b) t
Modified: mlton/trunk/lib/mlton/basic/html.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/html.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/html.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-
signature HTML =
sig
structure Align:
Modified: mlton/trunk/lib/mlton/basic/http.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/http.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/http.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,4 +1,5 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
@@ -6,8 +7,6 @@
*)
(* Based on RFC 2616. *)
-type int = Int.t
-
signature HTTP =
sig
structure Method:
Modified: mlton/trunk/lib/mlton/basic/http.sml
===================================================================
--- mlton/trunk/lib/mlton/basic/http.sml 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/http.sml 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,4 +1,5 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
@@ -506,7 +507,7 @@
fun sizePlus (r: t, ac: int): int =
case r of
Appends rs => List.fold (rs, ac, sizePlus)
- | File f => ac + Int64.toInt (File.size f)
+ | File f => ac + Position.toInt (File.size f)
| String s => ac + String.size s
fun size (r: t): int = sizePlus (r, 0)
Modified: mlton/trunk/lib/mlton/basic/insertion-sort.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/insertion-sort.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/insertion-sort.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-
signature INSERTION_SORT =
sig
(* The comparison function ('a * 'a -> bool) for should be the <= funtion,
Modified: mlton/trunk/lib/mlton/basic/instream.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/instream.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/instream.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Pervasive.Int.int
-
signature INSTREAM =
sig
type t
Modified: mlton/trunk/lib/mlton/basic/int-inf.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/int-inf.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/int-inf.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,13 +1,11 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-type word = Word.t
-
signature INT_INF =
sig
include INTEGER
Modified: mlton/trunk/lib/mlton/basic/int-inf.sml
===================================================================
--- mlton/trunk/lib/mlton/basic/int-inf.sml 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/int-inf.sml 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,4 +1,5 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2008 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
@@ -16,10 +17,20 @@
val prime =
(Word.toIntInf o Word.~ o Word.fromInt)
(case Word.wordSize of
- 8 => 5
+ 6 => 3
+ | 7 => 1
+ | 8 => 5
+ | 14 => 3
+ | 15 => 19
| 16 => 15
+ | 30 => 35
+ | 31 => 1
| 32 => 5
+ | 62 => 57
+ | 63 => 25
| 64 => 59
+ | 126 => 137
+ | 127 => 1
| 128 => 159
| _ => Error.bug "Unknown Word.wordSize")
in
Modified: mlton/trunk/lib/mlton/basic/int.sml
===================================================================
--- mlton/trunk/lib/mlton/basic/int.sml 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/int.sml 2009-04-08 12:32:06 UTC (rev 7061)
@@ -43,5 +43,3 @@
val precision = Int.precision
val toReal = Pervasive.Real.fromInt
end
-
-structure Int32: INTEGER = Int
Modified: mlton/trunk/lib/mlton/basic/integer.fun
===================================================================
--- mlton/trunk/lib/mlton/basic/integer.fun 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/integer.fun 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,4 +1,5 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
@@ -27,12 +28,12 @@
structure R =
OrderedRing (structure R =
- RingWithIdentity (structure R = Ring (Int)
- open R S
- val one = fromInt 1)
- open R S
- val {compare, ...} =
- Relation.lessEqual {< = op <, equals = equals})
+ RingWithIdentity (structure R = Ring (Int)
+ open R S
+ val one = fromInt 1)
+ open R S
+ val {compare, ...} =
+ Relation.lessEqual {< = op <, equals = equals})
open R S
exception Input
Modified: mlton/trunk/lib/mlton/basic/justify.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/justify.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/justify.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-
signature JUSTIFY =
sig
datatype t =
Modified: mlton/trunk/lib/mlton/basic/layout.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/layout.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/layout.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,4 +1,5 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
@@ -7,8 +8,6 @@
signature LAYOUT =
sig
- type int = Pervasive.Int.int
-
type t
(* layout the objects on separate lines*)
Modified: mlton/trunk/lib/mlton/basic/layout.sml
===================================================================
--- mlton/trunk/lib/mlton/basic/layout.sml 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/layout.sml 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,4 +1,5 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
@@ -10,8 +11,6 @@
structure Out = Outstream0
structure Int = Pervasive.Int
-type int = Int.int
-
val detailed = ref false
fun switch {detailed = d,normal = n} x =
Modified: mlton/trunk/lib/mlton/basic/lines.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/lines.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/lines.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2005, 2008 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2005, 2008 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-
signature LINES =
sig
(* Print out starting at line start and dropping the last lines. *)
Modified: mlton/trunk/lib/mlton/basic/linked-list.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/linked-list.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/linked-list.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-
signature LINKED_LIST =
sig
type 'a t
Modified: mlton/trunk/lib/mlton/basic/list.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/list.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/list.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Pervasive.Int.int
-
signature LIST =
sig
type 'a t = 'a list
Modified: mlton/trunk/lib/mlton/basic/list.sml
===================================================================
--- mlton/trunk/lib/mlton/basic/list.sml 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/list.sml 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,4 +1,5 @@
-(* Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
@@ -9,8 +10,6 @@
struct
structure Int = Pervasive.Int
-type int = Int.int
-
structure F =
struct
type 'a t = 'a list
@@ -620,5 +619,3 @@
loop (ecs, [])
end)
end
-
-val length = List.length
Modified: mlton/trunk/lib/mlton/basic/mark.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/mark.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/mark.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-
signature MARK =
sig
include ORDER
Modified: mlton/trunk/lib/mlton/basic/max-pow-2-that-divides.fun
===================================================================
--- mlton/trunk/lib/mlton/basic/max-pow-2-that-divides.fun 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/max-pow-2-that-divides.fun 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 2004-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 2004-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type word = Pervasive.Word.word
-
functor MaxPow2ThatDivides (type t
val << : t * word -> t
Modified: mlton/trunk/lib/mlton/basic/merge-sort.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/merge-sort.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/merge-sort.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-
signature MERGE_SORT =
sig
type 'a t
Modified: mlton/trunk/lib/mlton/basic/mono-container.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/mono-container.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/mono-container.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-
signature MONO_CONTAINER =
sig
end
Modified: mlton/trunk/lib/mlton/basic/net.sig
===================================================================
--- mlton/trunk/lib/mlton/basic/net.sig 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/net.sig 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,12 +1,11 @@
-(* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2009 Matthew Fluet.
+ * Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-
signature NET =
sig
type port = int
Modified: mlton/trunk/lib/mlton/basic/net.sml
===================================================================
--- mlton/trunk/lib/mlton/basic/net.sml 2009-04-08 12:31:59 UTC (rev 7060)
+++ mlton/trunk/lib/mlton/basic/net.sml 2009-04-08 12:32:06 UTC (rev 7061)
@@ -1,4 +1,5 @@
-(* Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2
More information about the MLton-commit
mailing list