mlton(1) General Commands Manual mlton(1) (NAME) mlton - (SML) (SYNOPSIS) mlton [option ...] file.{c|mlb|o|sml} [file.{c|o|s|S} ...] (DESCRIPTION) MLton . mlton foo.sml foo.sml SML MLton foo . MLton (separate compilation) . (signatures) (Basis Library) . ML Basis . mlton foo.mlb SML foo.mlb SML . MLton . MLton . MLton . MLton . : .c .mlb .o .s .sml. MLton . MLton mlton -z . ( {true|false}) . (Compile-time options) -align n (4 8) . . -as-opt option option gcc . -Wa, gcc . -cc cc C. C ( .s) ( .o) . -cc-opt option option gcc C. -codegen {native|x86|amd64|c|llvm} (native) amd64 C LLVM x86. -codegen native (-codegen amd64 -codegen x86) MLton . -const 'name value' . . Exn.keepHistory {false|true} MLton.Exn.history. true (raise) (handle) . -default-ann ann ML Basis. -default-ann 'warnUnused true' . ML Basis . -default-type type (primitive). -default-type word64 word Word Word64.word Word64:WORD . -default-type intinf int Int IntInf.int IntInf:INTEGER . -disable-ann ann ML Basis ML Basis. (match) : -default-ann 'warnUnused true' -disable-ann forceUsed -disable-ann nonexhaustiveMatch -disable-ann redundantMatch -disable-ann warnUnused. -export-header file C () file SML C (export) . -ieee-fp {false|true} x86 IEEE . . -codegen x86 . -inline n (inlining) . . 320 . -keep {g|o} . -keep . g .c .s gcc .ll llvm-as o (.o) -link-opt option option gcc (linking). -link-opt -Lpath -link-opt -lfoo -link-opt '-Lpath -lfoo' . -Wl, gcc : -link-opt '-Wl,--export-dynamic'. -llvm-as llvm-as .ll .bc LLVM ( -llvm-as llvm-as-14). -llvm-as-opt option option llvm-as LLVM (.ll .bc). -llvm-llc llc .bc .o LLVM ( -llvm-llc llc-14). -llvm-llc-opt option option llc LLVM (.bc .o). -llvm-opt opt .bc .bc LLVM ( -llvm-opt opt-14). -llvm-opt-opt option option opt LLVM (.bc .bc). -mlb-path-map file file ML Basis MLB. -mlb-path-map -mlb-path-var . -mlb-path-var 'name value' MLB. -mlb-path-map -mlb-path-var . -output file . ( ) . -profile {no|alloc|count|time} ( ) . mlmon.out . mlprof . -profile-branch {false|true} (true) case if . -profile-stack {false|true} (true) . -profile-val {false|true} (true) () val . -runtime arg @MLton. @MLton . -runtime . . @MLton -- . -runtime . : mlton -runtime 'ram-slop 0.4' foo.sml foo : foo @MLton ram-slop 0.4 -- -runtime stop @MLton . echo @MLton . % mlton -runtime stop echo.sml % echo @MLton -- @MLton -- -show-basis file (pretty print) file. -show-def-use file - (def-use) file. . -stop {f|g|o|tc} . f ( foo.mlb ) g .c .s o (.o) tc (type checking) -stop g -stop o MLton .c .s .o . -target {self|...} . self MLton . (cross compiler) . MLton . -target-as-opt target option -as-opt option gcc option target . -target-cc-opt target option -cc-opt option C gcc option target . -target-link-opt target option -link-opt option gcc option target . -verbose {0|1|2|3} . 0 . 0 () 1 2 1 3 2 (Runtime system options) MLton . . @MLton . -- . CommandLine.arguments SML . hello-world : hello-world @MLton gc-summary fixed-heap 10k -- a b c : CommandLine.arguments () = ["a", "b", "c"]. @MLton : hello-world @MLton gc-summary -- @MLton fixed-heap 10k -- a b c MLton : mlton @MLton fixed-heap 0.5g -- foo.sml fixed-heap x{k|K|m|M|g|G} (heap) x x . k K 1024 m M 1,048,576 g G 1,073,741,824 0 RAM . fixed-heap SML ( ). C C malloc . gc-messages (garbage collection). gc-summary . gc-summary-file file file. load-world world world MLton.World.save . MLton . max-heap x{k|K|m|M|g|G} x x fixed-heap . max-heap fixed-heap . may-page-heap {false|true} . no-load-world load-world. -runtime no-load-world world . set-uid world . ram-slop x x RAM RAM . x 1 . stop -- @MLton . -runtime stop @MLton . (DIAGNOSTICS) MLton Emacs . : http://mlton.org/Emacs (SEE ALSO) mlprof(1) MLton. December 30, 2024 mlton(1)