[MLton-devel] cvs commit: bootstrapping the 2002-basis MLton with older MLtons
Stephen Weeks
sweeks@users.sourceforge.net
Sun, 24 Nov 2002 09:56:42 -0800
sweeks 02/11/24 09:56:42
Modified: mlton Makefile
Added: bin mlton-basis-version
lib/mlton-stubs 1997-to-2002.sml
mlton mlton-stubs-1997.cm
Log:
Added enough stubs and autodetection so that bootstraping with older
MLtons works automatically. There is a simple test to see which
version of the basis the older MLton uses, and then a slightly
different stubs file is used if it is the 1997 basis.
Revision Changes Path
1.1 mlton/bin/mlton-basis-version
Index: mlton-basis-version
===================================================================
#!/bin/sh
tmp="$$.sml"
echo 'fun f x : string option = OS.FileSys.readDir x' >$tmp
if mlton $tmp >/dev/null 2>&1; then
basis='2002'
else
basis='1997'
fi
rm -f $tmp
echo $basis
1.1 mlton/lib/mlton-stubs/1997-to-2002.sml
Index: 1997-to-2002.sml
===================================================================
structure OS =
struct
open OS
structure FileSys =
struct
open FileSys
fun readDir d =
case FileSys.readDir d of
"" => NONE
| s => SOME s
end
end
1.60 +13 -1 mlton/mlton/Makefile
Index: Makefile
===================================================================
RCS file: /cvsroot/mlton/mlton/mlton/Makefile,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- Makefile 24 Nov 2002 01:19:43 -0000 1.59
+++ Makefile 24 Nov 2002 17:56:42 -0000 1.60
@@ -13,13 +13,17 @@
ifeq (self, $(shell if [ -x $(BIN)/mlton ]; then echo self; fi))
CM = $(NAME).cm
else
+ifeq (1997, $(shell $(SRC)/bin/mlton-basis-version))
+ CM = $(NAME)-stubs-1997.cm
+else
CM = $(NAME)-stubs.cm
endif
+endif
.PHONY: all
all: $(AOUT)
-$(AOUT): $(NAME).cm $(shell $(MLTON) -stop f mlton.cm)
+$(AOUT): $(NAME).cm $(shell $(MLTON) -stop f $(NAME).cm)
@echo 'Compiling mlton (takes a while)'
$(MLTON) $(FLAGS) $(CM)
size $(AOUT)
@@ -27,6 +31,14 @@
.PHONY: $(NAME)_cm
$(NAME)_cm: $(NAME)-stubs_cm
grep -v mlton-stubs $(NAME)-stubs.cm >$(NAME).cm
+
+.PHONY: $(NAME)-stubs-1997_cm
+$(NAME)-stubs-1997_cm: $(NAME)-stubs_cm
+ ( \
+ echo 'Group is' && \
+ echo '$(SRC)/lib/mlton-stubs/1997-to-2002.sml' && \
+ grep -v Group $(NAME)-stubs.cm; \
+ ) >$(NAME)-stubs-1997.cm
# This makes a version of MLton that can be compiled in the standard basis
# library. I.E. it doesn't require a MLton structure.
1.1 mlton/mlton/mlton-stubs-1997.cm
Index: mlton-stubs-1997.cm
===================================================================
Group is
/home/sweeks/mlton/src/lib/mlton-stubs/1997-to-2002.sml
../lib/mlyacc/base.sig
../lib/mlyacc/lrtable.sml
../lib/mlyacc/stream.sml
../lib/mlyacc/parser2.sml
../lib/mlyacc/join.sml
../lib/mlton-stubs/thread.sml
../lib/mlton-stubs/int-inf.sml
../lib/mlton-stubs/random.sig
../lib/mlton-stubs/random.sml
../lib/mlton-stubs/world.sig
../lib/mlton-stubs/word.sig
../lib/mlton-stubs/vector.sig
../lib/mlton-stubs/thread.sig
../lib/mlton-stubs/io.sig
../lib/mlton-stubs/text-io.sig
../lib/mlton-stubs/syslog.sig
../lib/mlton-stubs/socket.sig
../lib/mlton-stubs/signal.sig
../lib/mlton-stubs/rusage.sig
../lib/mlton-stubs/rlimit.sig
../lib/mlton-stubs/ptrace.sig
../lib/mlton-stubs/profile.sig
../lib/mlton-stubs/process.sig
../lib/mlton-stubs/proc-env.sig
../lib/mlton-stubs/array.sig
../lib/mlton-stubs/bin-io.sig
../lib/mlton-stubs/cont.sig
../lib/mlton-stubs/exn.sig
../lib/mlton-stubs/gc.sig
../lib/mlton-stubs/int-inf.sig
../lib/mlton-stubs/itimer.sig
../lib/mlton-stubs/mlton.sig
../lib/mlton-stubs/mlton.sml
../lib/mlton/basic/dynamic-wind.sig
../lib/mlton/basic/dynamic-wind.sml
../lib/mlton/basic/error.sig
../lib/mlton/basic/error.sml
../lib/mlton-stubs/real.sml
../lib/mlton/pervasive/pervasive.sml
../lib/mlton/basic/outstream0.sml
../lib/mlton/basic/relation0.sml
../lib/mlton/basic/char0.sml
../lib/mlton/basic/string0.sml
../lib/mlton/basic/layout.sig
../lib/mlton/basic/layout.sml
../lib/mlton/basic/fold.sig
../lib/mlton/basic/option.sig
../lib/mlton/basic/option.sml
../lib/mlton/basic/fold.fun
../lib/mlton/basic/assert.sig
../lib/mlton/basic/assert.sml
../lib/mlton/basic/list.sig
../lib/mlton/basic/list.sml
../lib/mlton/basic/word.sig
../lib/mlton/basic/word8.sml
../lib/mlton/basic/word32.sig
../lib/mlton/basic/word.sml
../lib/mlton/basic/string1.sml
../lib/mlton/basic/substring.sig
../lib/mlton/basic/substring.sml
../lib/mlton/basic/outstream.sig
../lib/mlton/basic/outstream.sml
../lib/mlton/basic/promise.sig
../lib/mlton/basic/promise.sml
../lib/mlton/basic/instream0.sml
../lib/mlton/basic/relation.sig
../lib/mlton/basic/relation.sml
../lib/mlton/basic/ring.sig
../lib/mlton/basic/ring-with-identity.sig
../lib/mlton/basic/stream.sig
../lib/mlton/basic/stream.sml
../lib/mlton/basic/euclidean-ring.sig
../lib/mlton/basic/integer.sig
../lib/mlton/basic/ring.fun
../lib/mlton/basic/ordered-ring.sig
../lib/mlton/basic/ordered-ring.fun
../lib/mlton/basic/power.sml
../lib/mlton/basic/string-map.sig
../lib/mlton/basic/order0.sig
../lib/mlton/basic/order.sig
../lib/mlton/basic/time.sig
../lib/mlton/basic/time.sml
../lib/mlton/basic/computation.sig
../lib/mlton/basic/intermediate-computation.sig
../lib/mlton/basic/intermediate-computation.sml
../lib/mlton/basic/string-map.sml
../lib/mlton/basic/pid.sig
../lib/mlton/basic/pid.sml
../lib/mlton/basic/date.sig
../lib/mlton/basic/date.sml
../lib/mlton/basic/exn.sig
../lib/mlton/basic/exn.sml
../lib/mlton/basic/t.sig
../lib/mlton/basic/unit.sig
../lib/mlton/basic/unit.sml
../lib/mlton/basic/trace.sig
../lib/mlton/basic/trace.sml
../lib/mlton/basic/ring-with-identity.fun
../lib/mlton/basic/bool.sig
../lib/mlton/basic/bool.sml
../lib/mlton/basic/euclidean-ring.fun
../lib/mlton/basic/integer.fun
../lib/mlton/basic/int.sml
../lib/mlton/basic/char.sig
../lib/mlton/basic/char.sml
../lib/mlton/basic/vector.sig
../lib/mlton/basic/array.sig
../lib/mlton/basic/vector.fun
../lib/mlton/basic/ordered-field.sig
../lib/mlton/basic/field.sig
../lib/mlton/basic/field.fun
../lib/mlton/basic/ordered-field.fun
../lib/mlton/basic/int-inf.sig
../lib/mlton/basic/int-inf.sml
../lib/mlton/basic/real.sig
../lib/mlton/basic/real.sml
../lib/mlton/basic/random.sig
../lib/mlton/basic/random.sml
../lib/mlton/basic/vector.sml
../lib/mlton/basic/array.fun
../lib/mlton/basic/array.sml
../lib/mlton/basic/hash-set.sig
../lib/mlton/basic/hash-set.sml
../lib/mlton/basic/binary-search.sig
../lib/mlton/basic/binary-search.sml
../lib/mlton/basic/string.sig
../lib/mlton/basic/string.sml
../lib/mlton/basic/instream.sig
../lib/mlton/basic/instream.sml
../lib/mlton/basic/file.sig
../lib/mlton/basic/file.sml
../lib/mlton/basic/property-list.sig
../lib/mlton/basic/property.sig
../lib/mlton/basic/het-container.sig
../lib/mlton/basic/het-container.fun
../lib/mlton/basic/ref.sig
../lib/mlton/basic/ref.sml
../lib/mlton/basic/property-list.fun
../lib/mlton/basic/property.fun
../lib/mlton/basic/dot-color.sml
../lib/mlton/basic/dot.sig
../lib/mlton/basic/dot.sml
../lib/mlton/basic/counter.sig
../lib/mlton/basic/counter.sml
../lib/mlton/basic/tree.sig
../lib/mlton/basic/tree.sml
../lib/mlton/basic/directed-graph.sig
../lib/mlton/basic/directed-graph.sml
../lib/mlton/basic/array2.sig
../lib/mlton/basic/array2.sml
../lib/mlton/basic/env.sig
../lib/mlton/basic/env.fun
../lib/mlton/basic/mono-vector.fun
../lib/mlton/basic/regexp.sig
../lib/mlton/basic/regexp.sml
../lib/mlton/basic/result.sig
../lib/mlton/basic/result.sml
../lib/mlton/basic/dir.sig
../lib/mlton/basic/dir.sml
../lib/mlton/basic/file-desc.sig
../lib/mlton/basic/file-desc.sml
../lib/mlton/basic/function.sig
../lib/mlton/basic/function.sml
../lib/mlton/basic/signal.sml
../lib/mlton/basic/process.sig
../lib/mlton/basic/process.sml
../lib/mlton/basic/justify.sig
../lib/mlton/basic/justify.sml
../lib/mlton/basic/popt.sig
../lib/mlton/basic/popt.sml
../lib/mlton/basic/control.sig
../lib/mlton/basic/control.fun
control/source-pos.sig
control/source-pos.sml
control/region.sig
control/region.sml
control/control.sig
control/control.sml
control/system.sig
control/system.sml
cm/lexer.sig
cm/lexer.sml
cm/parse.sig
cm/parse.sml
cm/cm.sig
cm/cm.sml
ast/wrapped.sig
ast/ast-const.sig
ast/field.sig
ast/record.sig
ast/tyvar.sig
ast/ast-id.sig
ast/prim-tycons.sig
ast/prim-cons.sig
ast/longid.sig
ast/ast-atoms.sig
ast/ast-core.sig
ast/ast.sig
ast/ast-const.fun
ast/field.fun
ast/record.fun
ast/tyvar.fun
ast/ast-id.fun
ast/prim-tycons.fun
ast/prim-cons.fun
ast/longid.fun
ast/ast-atoms.fun
ast/ast-core.fun
ast/ast.fun
../lib/mlton/set/set.sig
../lib/mlton/set/unordered.fun
../lib/mlton/env/mono-env.sig
../lib/mlton/env/basic-env-to-env.fun
../lib/mlton/env/mono-env.fun
atoms/id.sig
atoms/var.sig
atoms/id.fun
atoms/var.fun
atoms/use-name.fun
atoms/tycon.sig
atoms/unary-tycon.sig
atoms/unary-tycon.fun
atoms/type-ops.sig
atoms/type.sig
atoms/type-ops.fun
atoms/type.fun
atoms/tycon.fun
atoms/generic-scheme.sig
atoms/scheme.sig
atoms/cons.sig
atoms/const.sig
atoms/prim.sig
atoms/prim.fun
atoms/atoms.sig
atoms/generic-scheme.fun
atoms/const.fun
atoms/cons.fun
atoms/atoms.fun
atoms/hash-type.sig
atoms/cases.sig
ssa/ssa-tree.sig
ssa/direct-exp.sig
ssa/analyze.sig
ssa/type-check.sig
ssa/type-check.fun
ssa/shrink.sig
ssa/restore.sig
ssa/simplify.sig
ssa/ssa.sig
../lib/mlton/set/disjoint.sig
../lib/mlton/set/disjoint.fun
ssa/useless.sig
../lib/mlton/basic/append-list.sig
../lib/mlton/basic/append-list.sml
ssa/two-point-lattice.sig
ssa/two-point-lattice.fun
ssa/useless.fun
ssa/common-block.sig
ssa/common-block.fun
ssa/common-subexp.sig
ssa/common-subexp.fun
../lib/mlton/basic/unique-id.sig
../lib/mlton/basic/unique-id.fun
ssa/constant-propagation.sig
ssa/multi.sig
ssa/multi.fun
ssa/global.sig
ssa/global.fun
ssa/constant-propagation.fun
ssa/contify.sig
ssa/contify.fun
ssa/flatten.sig
ssa/flatten.fun
ssa/inline.sig
ssa/inline.fun
ssa/introduce-loops.sig
ssa/introduce-loops.fun
ssa/known-case.sig
ssa/known-case.fun
ssa/local-flatten.sig
ssa/local-flatten.fun
ssa/local-ref.sig
ssa/flat-lattice.sig
ssa/flat-lattice.fun
ssa/local-ref.fun
ssa/loop-invariant.sig
ssa/loop-invariant.fun
ssa/poly-equal.sig
ssa/poly-equal.fun
../lib/mlton/basic/fixed-point.sig
../lib/mlton/basic/fixed-point.sml
ssa/redundant.sig
ssa/equivalence-relation.sig
ssa/equivalence-relation.fun
ssa/redundant.fun
ssa/redundant-tests.sig
ssa/redundant-tests.fun
ssa/remove-unused.sig
ssa/remove-unused.fun
ssa/simplify-types.sig
ssa/simplify-types.fun
ssa/simplify.fun
ssa/three-point-lattice.sig
ssa/n-point-lattice.sig
ssa/n-point-lattice.fun
ssa/three-point-lattice.fun
ssa/restore.fun
ssa/shrink.fun
ssa/analyze.fun
ssa/direct-exp.fun
../lib/mlton/basic/clearable-promise.sig
../lib/mlton/basic/clearable-promise.sml
atoms/hash-type.fun
atoms/cases.fun
ssa/ssa-tree.fun
ssa/ssa.fun
backend/mtype.sig
backend/c-function.sig
backend/runtime.sig
backend/mtype.fun
backend/c-function.fun
backend/runtime.fun
backend/err.sml
backend/machine-cases.sig
backend/machine.sig
backend/machine-cases.fun
backend/machine.fun
../lib/mlton/basic/unique-set.sig
../lib/mlton/basic/unique-set.fun
backend/rssa.sig
backend/ssa-to-rssa.sig
backend/implement-handlers.sig
backend/implement-handlers.fun
backend/representation.sig
backend/representation.fun
backend/ssa-to-rssa.fun
backend/signal-check.sig
backend/signal-check.fun
backend/rssa.fun
backend/profile-alloc.sig
backend/profile-alloc.fun
backend/parallel-move.sig
backend/parallel-move.fun
backend/limit-check.sig
backend/limit-check.fun
backend/equivalence-graph.sig
backend/equivalence-graph.fun
backend/chunkify.sig
backend/chunkify.fun
backend/backend.sig
../lib/mlton/basic/quick-sort.sig
../lib/mlton/basic/insertion-sort.sig
../lib/mlton/basic/insertion-sort.sml
../lib/mlton/basic/quick-sort.sml
backend/live.sig
backend/live.fun
backend/allocate-registers.sig
backend/allocate-registers.fun
backend/backend.fun
xml/xml-type.sig
xml/xml-tree.sig
xml/xml.sig
xml/sxml.sig
xml/implement-exceptions.sig
xml/implement-exceptions.fun
../lib/smlnj/ord-key-sig.sml
../lib/smlnj/splaytree-sig.sml
../lib/smlnj/splaytree.sml
../lib/smlnj/lib-base-sig.sml
../lib/smlnj/lib-base.sml
../lib/smlnj/ord-map-sig.sml
../lib/smlnj/splay-map-fn.sml
../lib/mlton/env/finite-function.sig
../lib/mlton/env/poly-cache.sig
../lib/mlton/env/poly-cache.fun
xml/sxml-exns.sig
xml/monomorphise.sig
xml/monomorphise.fun
xml/polyvariance.sig
xml/polyvariance.fun
xml/xml-tree.fun
xml/type-check.sig
xml/type-check.fun
xml/simplify-types.sig
xml/simplify-types.fun
xml/scc-funs.sig
xml/scc-funs.fun
xml/simplify.sig
xml/simplify.fun
xml/xml.fun
closure-convert/lambda-free.sig
closure-convert/lambda-free.fun
closure-convert/globalize.sig
closure-convert/globalize.fun
closure-convert/closure-convert.sig
closure-convert/abstract-value.sig
closure-convert/abstract-value.fun
closure-convert/closure-convert.fun
codegen/c-codegen/c-codegen.sig
codegen/c-codegen/c-codegen.fun
codegen/x86-codegen/x86-codegen.sig
../lib/mlton/set/ordered-unique-set.fun
codegen/x86-codegen/x86.sig
codegen/x86-codegen/x86.fun
codegen/x86-codegen/x86-pseudo.sig
codegen/x86-codegen/x86-mlton-basic.sig
codegen/x86-codegen/x86-mlton-basic.fun
codegen/x86-codegen/x86-liveness.sig
codegen/x86-codegen/x86-liveness.fun
codegen/x86-codegen/x86-jump-info.sig
codegen/x86-codegen/x86-jump-info.fun
codegen/x86-codegen/x86-loop-info.sig
codegen/x86-codegen/x86-loop-info.fun
codegen/x86-codegen/x86-entry-transfer.sig
codegen/x86-codegen/x86-entry-transfer.fun
codegen/x86-codegen/x86-mlton.sig
codegen/x86-codegen/x86-mlton.fun
codegen/x86-codegen/x86-translate.sig
codegen/x86-codegen/x86-translate.fun
codegen/x86-codegen/x86-simplify.sig
codegen/x86-codegen/peephole.sig
codegen/x86-codegen/peephole.fun
codegen/x86-codegen/x86-simplify.fun
../lib/mlton/basic/queue.sig
../lib/mlton/basic/two-list-queue.sml
codegen/x86-codegen/x86-generate-transfers.sig
codegen/x86-codegen/x86-live-transfers.sig
codegen/x86-codegen/x86-live-transfers.fun
codegen/x86-codegen/x86-generate-transfers.fun
codegen/x86-codegen/x86-allocate-registers.sig
codegen/x86-codegen/x86-allocate-registers.fun
codegen/x86-codegen/x86-validate.sig
codegen/x86-codegen/x86-validate.fun
codegen/x86-codegen/x86-codegen.fun
core-ml/core-ml.sig
core-ml/core-ml.fun
core-ml/dead-code.sig
core-ml/dead-code.fun
core-ml/lookup-constant.sig
core-ml/lookup-constant.fun
elaborate/decs.sig
elaborate/elaborate-env.sig
elaborate/elaborate.sig
elaborate/decs.fun
../lib/mlton/basic/merge-sort.sig
../lib/mlton/basic/merge-sort.sml
elaborate/elaborate-env.fun
elaborate/elaborate-sigexp.sig
elaborate/elaborate-sigexp.fun
elaborate/elaborate-core.sig
elaborate/precedence-parse.sig
elaborate/precedence-parse.fun
elaborate/elaborate-core.fun
elaborate/elaborate.fun
control/source.sig
control/source.sml
front-end/front-end.sig
front-end/ml.grm.sig
front-end/ml.grm.sml
front-end/ml.lex.sml
front-end/front-end.fun
type-inference/type-env.sig
type-inference/type-env.fun
type-inference/scope.sig
type-inference/scope.fun
type-inference/nested-pat.sig
type-inference/nested-pat.fun
type-inference/match-compile.sig
type-inference/match-compile.fun
type-inference/infer.sig
type-inference/infer.fun
main/compile.sig
main/compile.sml
main/main.sig
main/main.sml
call-main.sml
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel