(* Starting to take code used in SML/NJ 110.42 and modify source files * as needed to conform to the SML97 standard for compilation under MLton. * Unfortunately there is more work to do here. * * This .cm file is set up to be executed from src/compiler in the * SML/NJ 110.42 source tree. Updated files are just dropped into the * src/compiler directory * * Most changes are to eliminate "or patterns" * But also: * Signature definitions within a local, * Sequential unrolling of "withtype" * Get rid of Util library IntInf in favor of Standard IntInf. * Get rid of assumption that LargeInt == Int32 * * To get this working with SML/NJ again: * uncomment the lines for the int-inf files. * uncomment (*MiscUtil/util/literal-to-num.sml*) * and comment out "MiscUtil-util-literal-to-num.sml" * I'll fix this up once I find a nice way of differentiating a * compilation under SML/NJ from compilation under MLton. * *) Group is neededForMlton.sml ../smlnj-lib/Util/lib-base-sig.sml ../smlnj-lib/Util/lib-base.sml (* Controls used in Basics/main/basiccontrol.sml *) (* uses atom, listmergesort *) ../smlnj-lib/Util/hash-string.sml ../smlnj-lib/Util/atom-sig.sml ../smlnj-lib/Util/atom.sml ../smlnj-lib/Util/hash-key-sig.sml ../smlnj-lib/Util/hash-table-rep.sml ../smlnj-lib/Util/mono-hash-table-sig.sml ../smlnj-lib/Util/hash-table-fn.sml ../smlnj-lib/Util/atom-table.sml ../smlnj-lib/Controls/controls-sig.sml ../smlnj-lib/Controls/control-reps.sml ../smlnj-lib/Controls/controls.sml ../smlnj-lib/Controls/control-set-sig.sml ../smlnj-lib/Util/listsort-sig.sml ../smlnj-lib/Util/list-mergesort.sml ../smlnj-lib/Controls/control-set.sml ../smlnj-lib/Controls/control-util-sig.sml ../smlnj-lib/Controls/control-util.sml ../smlnj-lib/Controls/registry-sig.sml ../smlnj-lib/Controls/registry.sml (* Pretty-printing used in Basics/print/pp-wrapper.sml *) (* uses Queue, Format, ListFormat *) ../smlnj-lib/PP/src/pp-device-sig.sml ../smlnj-lib/PP/src/pp-token-sig.sml ../smlnj-lib/PP/src/pp-desc.sml ../smlnj-lib/PP/src/pp-stream-sig.sml ../smlnj-lib/Util/fifo-sig.sml ../smlnj-lib/Util/fifo.sml ../smlnj-lib/Util/queue-sig.sml ../smlnj-lib/Util/queue.sml ../smlnj-lib/Util/format-sig.sml ../smlnj-lib/Util/fmt-fields.sml ../smlnj-lib/Util/real-format.sml ../smlnj-lib/Util/format.sml ../smlnj-lib/Util/list-format-sig.sml ../smlnj-lib/Util/list-format.sml ../smlnj-lib/PP/src/pp-stream-fn.sml ../smlnj-lib/PP/devices/string-token.sml (* RedBlackMapFn used in Basics/mlcomp/persmap.sml *) ../smlnj-lib/Util/ord-key-sig.sml ../smlnj-lib/Util/ord-map-sig.sml (*../smlnj-lib/Util/redblack-map-fn.sml where structure *) redblack-map-fn-SML97.sml (* IntInf used in Parse/ast/ast.sig has different spellings from Standard library*) (* Eliminate completely in favor of built-in IntInf structure *) (*../smlnj-lib/Util/int-inf-sig.sml*) (* smlnj-lib/Util/int-inf.sml or pattern *) (*int-inf-SML97.sml*) (* IntHashTable used in ElabData/basics/lambdavar.sml *) ../smlnj-lib/Util/int-hash-table.sml (* IntRedBlackMap used in ElabData/basics/stamps.sml *) ../smlnj-lib/Util/int-redblack-map.sml (* PropList used in ElabData/types/types.sig *) ../smlnj-lib/Util/plist-sig.sml ../smlnj-lib/Util/plist.sml (* DynamicArrayFn used in ElabData/types/tuples.sml *) ../smlnj-lib/Util/mono-dynamic-array-sig.sml ../smlnj-lib/Util/dynamic-array-fn.sml (* If not using new Option structure: need in DebugProf/profile/btimp.sml *) (*structure Option = struct open Option fun app (f : 'a -> unit) NONE = () | app f (SOME x) = f x end;*) (* BinaryMapFn used in FLINT/kernel/ltyextern.sml *) ../smlnj-lib/Util/binary-map-fn.sml (* IntBinaryMap, IntRedBlackSet used in FLINT/flint/flintutil.sml *) ../smlnj-lib/Util/int-binary-map.sml ../smlnj-lib/Util/ord-set-sig.sml ../smlnj-lib/Util/int-redblack-set.sml (* Files from Basics used from Chris Wolff's .cm files for building * SML/NJ 110.42 parser, elaborator, translator *) (*smlnj-lib.use*) Basics/mlcomp/fixity.sml Basics/main/basiccontrol.sml Basics/print/printcontrol.sml Basics/print/pp-wrapper.sml Basics/source/sourcemap.sig Basics/source/sourcemap.sml Basics/source/source.sig Basics/source/source.sml Basics/source/pathnames.sig Basics/source/pathnames.sml Basics/errormsg/errormsg.sig Basics/errormsg/errormsg.sml Basics/mlcomp/persstamps.sig Basics/mlcomp/persstamps.sml Basics/mlcomp/persmap.sml Basics/mlcomp/symbol.sig Basics/mlcomp/symbol.sml Basics/mlcomp/fastsymbol.sml Basics/miscutil/intstrmap.sig Basics/miscutil/intstrmap.sml (* Basics/stats/stats.sml had to comment out lines 134-138 involving SMLofNJ.Internals.CleanUp *) (*stats-SML97.sml*) (* Get stats out of there: uses old Timer structure involving gc *) AD-stats.sml Basics/print/printutil.sig Basics/print/printutil.sml (* local type ... in signature ... is invalid SML *) (*Basics/mlcomp/pidenv.sig*) pidenv-SML97.sig Basics/mlcomp/pidenv.sml Basics/mlcomp/compileexn.sml Basics/mlcomp/fastsymbol.sig (* Files from ElabData, Parse, Elaborator, Semant, FLINT/parse used from * Chris Wolff's .cm files for building SML/NJ 110.42 parser, elaborator, * translator. * * DebugProf package uses version-specific SML/NJ internals, removed without * causing build errors: leaves me suspicious that other files could be * removed. * * Remove reference to BTrace in Cwolff/control.sml / .sig * could have left in .sig and just set to false in .sml * *) (*basics.use*) ElabData/main/edcontrol.sig ElabData/main/edcontrol.sml ElabData/basics/lambdavar.sig ElabData/basics/lambdavar.sml ElabData/basics/access.sig ElabData/basics/access.sml ElabData/basics/stamps.sig ElabData/basics/stamps.sml ElabData/modules/entpath.sml ElabData/basics/sympaths.sig ElabData/basics/sympaths.sml (*ElabData/types/types.sig withtype for simultaneous substitution *) types-SML97.sig (*ElabData/types/types.sml withtype for simultaneous substitution *) types-SML97.sml ElabData/types/tuples.sml ElabData/basics/core-ptnum.sml (*ElabData/types/core-basictypes.sml*) core-basictypes-SML97.sml Elaborator/basics/ptnum.sml Elaborator/types/basictypes.sig (*Elaborator/types/basictypes.sml*) basictypes-SML97.sml ElabData/basics/ii.sml ElabData/syntax/varcon.sig ElabData/syntax/varcon.sml (*Basics/mlcomp/fixity.sml*) ElabData/basics/env.sig ElabData/basics/env.sml (*ElabData/modules/modules.sig*) (*ElabData/modules/modules.sml*) modules-SML97.sig modules-SML97.sml ElabData/statenv/bindings.sig ElabData/statenv/bindings.sml Parse/ast/ast.sig Parse/ast/ast.sml ElabData/syntax/absyn.sig ElabData/syntax/absyn.sml ElabData/basics/stampmap.sml ElabData/types/typesutil.sig (*ElabData/types/typesutil.sml*) typesutil-SML97.sml Elaborator/types/overloadlit.sml Elaborator/basics/elabcontrol.sml Parse/main/parsercontrol.sml CWolff-control.sig FLINT/main/control.sml ElabData/statenv/statenv.sig ElabData/statenv/statenv.sml ElabData/syntax/absynutil.sml ElabData/main/compinfo.sml ElabData/basics/coresym.sml ElabData/modules/moduleid.sml ElabData/modules/epcontext.sml ElabData/modules/entityenv.sig ElabData/modules/entityenv.sml ElabData/modules/moduleutil.sig (*ElabData/modules/moduleutil.sml*) moduleutil-SML97.sml ElabData/statenv/lookup.sig ElabData/statenv/lookup.sml ElabData/statenv/coreacc.sml CWolff-control.sml FLINT/kernel/primtyc.sig (*FLINT/kernel/primtyc.sml*) primtyc-SML97.sml Elaborator/basics/debindex.sig Elaborator/basics/debindex.sml FLINT/kernel/ltykernel.sig (*FLINT/kernel/ltykernel.sml*) ltykernel-SML97.sml FLINT/kernel/ltydef.sig FLINT/kernel/ltydef.sml FLINT/kernel/ltybasic.sig FLINT/kernel/ltybasic.sml ../MLRISC/c-calls/c-types.sml FLINT/kernel/primop.sig (*FLINT/kernel/primop.sml*) primop-SML97.sml (*FLINT/flint/flint.sig*) flint-SML97.sig (*FLINT/flint/flint.sml*) flint-SML97.sml Execution/main/importtree.sml Semant/basics/inlinfo.sig (*Semant/basics/inlinfo.sml*) inlinfo-SML97.sml FLINT/kernel/ltydict.sml FLINT/kernel/ltyextern.sig (*FLINT/kernel/ltyextern.sml*) ltyextern-SML97.sml FLINT/plambda/plambdatype.sml (*FLINT/plambda/plambda.sig*) plambda-SML97.sig FLINT/plambda/plambda.sml Elaborator/print/pputil.sig Elaborator/print/pputil.sml (*Elaborator/print/pptype.sml*) pptype-SML97.sml Elaborator/print/ppval.sml Elaborator/print/ppabsyn.sml FLINT/plambda/pplexp.sml (* Need to use IntInf names from Standard Basis Library *) (*MiscUtil/util/literal-to-num.sml*) MiscUtil-util-literal-to-num.sml FLINT/trans/mccommon.sml FLINT/trans/tempexpn.sml CWolff-sortedlist.sml Elaborator/elaborate/tyvarset.sml Parse/ast/astutil.sig Parse/ast/astutil.sml (*Elaborator/modules/expandtycon.sml*) expandtycon-SML97.sml (*Elaborator/types/eqtypes.sml*) eqtypes-SML97.sml Elaborator/elaborate/specialsyms.sml Elaborator/elaborate/elabutil.sig Elaborator/elaborate/elabutil.sml Semant/types/tp-var-info.sml Semant/modules/module-plists.sml Elaborator/elaborate/elabdebug.sml Elaborator/print/ppmod.sml (*Elaborator/modules/instantiate.sml*) Elaborator-modules-instantiate-SML97.sml Semant/modules/instantiate-param.sml Semant/modules/instantiate.sml Elaborator/modules/evalent.sml Semant/modules/evalent.sml FLINT/trans/transtypes.sml FLINT/trans/pequal.sml FLINT/flint/flintutil.sml FLINT/plambda/pflatten.sig FLINT/plambda/pflatten.sml (*FLINT/plambda/flintnm.sml*) flintnm-SML97.sml Semant/types/cproto.sml FLINT/trans/matchcomp.sml FLINT/trans/translate.sml (* ml-yacc/lib is normally imported using $/ml-yacc-lib.cm *) ../ml-yacc/lib/base.sig ../ml-yacc/lib/join.sml ../ml-yacc/lib/lrtable.sml ../ml-yacc/lib/stream.sml (* * /ml-yacc/lib/parser2.sml need to change signature FIFO to FIFO_P * to avoid clash with FIFO in smlnj-lib/fifo-sig.sml *) parser2-SML97.sml Parse/parse/ml.grm.sig Parse/parse/ml.grm.sml Parse/lex/tokentable.sml Parse/lex/ml.lex.sml Parse/main/parser.sig Parse/main/parser.sml (*Elaborator/types/unify.sml*) unify-SML97.sml (*Elaborator/modules/sigmatch.sml*) sigmatch-SML97.sml (*Elaborator/types/overload.sml*) overload-SML97.sml (*Elaborator/types/typecheck.sml*) typecheck-SML97.sml Elaborator/basics/conrep.sml Elaborator/elaborate/elabtype.sig (*Elaborator/elaborate/elabtype.sml*) elabtype-SML97.sml Elaborator/elaborate/precedence.sml Elaborator/elaborate/elabcore.sml Elaborator/elaborate/include.sml (*Elaborator/elaborate/elabsig.sml*) elabsig-SML97.sml (*Elaborator/elaborate/elabmod.sml*) elabmod-SML97.sml Elaborator/elaborate/elabtop.sml MiscUtil/library/pickle-util.sml TopLevel/environ/symenv.sig TopLevel/environ/symenv.sml (*MiscUtil/library/crc.sml*) crc-SML97.sml Semant/pickle/pickle-sym-pid.sml (*Semant/pickle/pickmod-new.sml*) pickmod-new-SML97.sml CWolff-pickunpick.sml MiscUtil/library/unpickle-util.sml Semant/pickle/unpickle-sym-pid.sml (*Semant/pickle/unpickmod-new.sml*) unpickmod-new-SML97.sml Semant/statenv/prim.sml CWolff-transmain.sml Parse/main/smlfile.sml Execution/dynenv/dynenv.sig ElabData/statenv/browse.sml TopLevel/environ/environ.sig ElabData/statenv/genmap.sml Semant/pickle/rehash.sml SavedStaticEnv.sml Pup.sml (*Semant/types/typecheck.sml*) CWolff-elabmain.sml #if defined(NEW_CM) $/basis.cm #endif