├── test
├── lllllll.txt
├── dangle4.sml.out.ok
├── ftv.sml.out.ok
├── layout.sml.out.ok
├── lex.sml.out.ok
├── llv.sml.out.ok
├── oh-no.sml.out.ok
├── oh-no2.sml.out.ok
├── opaque3.sml.out.ok
├── vesa2.sml.out.ok
├── weeks.sml.out.ok
├── weeks5.sml.out.ok
├── date2.sml.out.ok
├── error3a.mlb
├── error4a.mlb
├── excon.sml.out.ok
├── functor2.sml.out.ok
├── kitdangle.sml.out.ok
├── kitdangle3.sml.out.ok
├── kitfib35.sml.out.ok
├── mlbtest
│ ├── d1
│ │ ├── f.mlb
│ │ ├── d.mlb
│ │ ├── a.sml
│ │ ├── f.sml
│ │ ├── f2.mlb
│ │ └── f2.sml
│ ├── datatype
│ │ ├── d.mlb
│ │ └── d1.sml
│ ├── d2
│ │ ├── c.sml
│ │ ├── b.sml
│ │ ├── d2.mlb
│ │ └── d.mlb
│ ├── f1.mlb
│ ├── dir.mlb
│ ├── f1.sml
│ ├── functor4.sml
│ ├── sig.mlb
│ ├── char.mlb
│ ├── functor1.sml
│ ├── dir2.mlb
│ ├── functor.mlb
│ ├── sig.sig
│ ├── functor2.sml
│ ├── sig.sml
│ ├── B.sml
│ ├── ab.mlb
│ ├── functor3.sml
│ ├── char.sml
│ └── charsig.sml
├── poll.sml.out.ok
├── ray.mlb.out.ok
├── unbox.sml.out.ok
├── anoq_Exception.sml.out.ok
├── barry
│ ├── qsort.out.ok
│ ├── fib35.out.ok
│ ├── mandelbrot.out.ok
│ ├── precedence.out.ok
│ ├── msort.out.ok
│ ├── fft.out.ok
│ ├── tststrcmp.sml
│ ├── fib35.sml
│ └── precedence.sml
├── error2.sml
├── error2b.sml
├── error3.sml
├── foldbug.sml.out.ok
├── functor3.sml.out.ok
├── kitqsort.sml.out.ok
├── logic.mlb.out.ok
├── nucleic.mlb.out.ok
├── ray.mlb
├── seltuptup.sml.out.ok
├── valrecpat.sml.out.ok
├── valrecpat1.sml.out.ok
├── valrecpat2.sml.out.ok
├── valrecpat3.sml.out.ok
├── explicit_regions
│ ├── call.sml.out.ok
│ ├── call2.sml.out.ok
│ ├── con0.sml.out.ok
│ ├── con1.sml.out.ok
│ ├── param.sml.out.ok
│ ├── rec.sml.out.ok
│ ├── ref.sml.out.ok
│ ├── tup.sml.out.ok
│ ├── tup2.sml.out.ok
│ ├── ty1.sml.out.ok
│ ├── param1.sml.out.ok
│ ├── string.sml.out.ok
│ ├── par.sml.out.ok
│ ├── expty1.sml.out.ok
│ ├── expty2.sml.out.ok
│ ├── funty1.sml.out.ok
│ ├── param1.sml
│ ├── param.sml
│ ├── nomut-ok.sml.out.ok
│ ├── er18.sml
│ ├── server.sml.out.ok
│ ├── call.sml
│ ├── err_expty1.sml
│ ├── err_expty2.sml
│ ├── tup.sml
│ ├── rec.sml
│ ├── er4.sml
│ ├── err_funty3.sml
│ ├── err_patty1.sml
│ ├── err_funty1.sml
│ ├── er3.sml
│ ├── er2.sml
│ ├── er5.sml
│ ├── er1.sml
│ ├── er10.sml
│ ├── er19.sml
│ ├── err_funty2.sml
│ ├── err_ty1.sml
│ ├── err_copylist.sml
│ ├── call2.sml
│ ├── er1.sml.log.ok
│ ├── er12.sml
│ ├── er9.sml
│ ├── tup2.sml
│ ├── er11.sml.log.ok
│ ├── er5.sml.log.ok
│ ├── err_expty3.sml
│ ├── er18.sml.log.ok
│ ├── er2.sml.log.ok
│ ├── er6.sml
│ ├── string.sml
│ ├── ref.sml
│ ├── effty1.sml
│ ├── er4.sml.log.ok
│ ├── er10.sml.log.ok
│ ├── er14.sml
│ ├── er8.sml
│ ├── funty1.sml
│ ├── expty2.sml
│ ├── er8.sml.log.ok
│ ├── er9.sml.log.ok
│ ├── err_expty3.sml.log.ok
│ ├── effty1.sml.log.ok
│ ├── er3.sml.log.ok
│ ├── err_ty1.sml.log.ok
│ ├── er11.sml
│ ├── er6.sml.log.ok
│ ├── con1.sml
│ ├── err_patty1.sml.log.ok
│ ├── con0.sml
│ ├── er12.sml.log.ok
│ ├── er17.sml.log.ok
│ ├── er17.sml
│ ├── er7.sml.log.ok
│ ├── err_expty1.sml.log.ok
│ ├── expty1.sml
│ ├── err_funty1.sml.log.ok
│ ├── err_expty2.sml.log.ok
│ ├── er19.sml.log.ok
│ └── er7.sml
├── export2.sml.out.ok
├── kitreynolds2.sml.out.ok
├── kitreynolds3.sml.out.ok
├── logic.mlb
├── msort.mlb.out.ok
├── pat.sml.out.ok
├── sigs-avail.sml.out.ok
├── with-escape.sml.out.ok
├── constraint.sml.out.ok
├── danwang.mlb
├── danwang.mlb.out.ok
├── export3.sml.out.ok
├── input_to_testdyn2
├── nucleic.mlb
├── parallelism
│ ├── cores.sml.out.ok
│ ├── spawn_simple2.sml.out.ok
│ ├── exn2.sml.out.ok
│ ├── spawn.sml.out.ok
│ ├── spawn_simple.sml.out.ok
│ ├── spawn_simple4.sml.out.ok
│ ├── spawn_simple5.sml.out.ok
│ ├── spawn_simple6.sml.out.ok
│ ├── cores.mlb
│ ├── spawn_simple3.sml.out.ok
│ └── exn1.sml.out.ok
├── real_match.sml.out.ok
├── structs-avail.sml.out.ok
├── valrecpat4.sml.out.ok
├── hatch1.sml.out.ok
├── barnes-hut.mlb
├── exn.sml.out.ok
├── opaque2.sml.out.ok
├── repl
│ ├── .gitignore
│ ├── simple.cmd
│ ├── simple.out.ok
│ ├── a.mlb
│ ├── simple2.cmd
│ ├── simple2.out.ok
│ ├── hello.sml
│ ├── load.cmd
│ ├── chdir.cmd
│ ├── chdir.out.ok
│ ├── load.out.ok
│ └── basis.cmd
├── exn-alpha.sml.out.ok
├── kitloop2.sml.out.ok
├── functor.sml.out.ok
├── gc0.sml.out.ok
├── gc01.sml.out.ok
├── logic_mlton.cm
├── logic_smlnj.cm
├── intinf2.sml.out.ok
├── perm.mlb
├── lex.sml.log.ok
├── valrecpat1.sml
├── cobol.sml
├── layout.sml.log.ok
├── valrecpat.sml
├── weeks.sml.log.ok
├── FuhMishra.mlb
├── enum-eq.sml.out.ok
├── host.mlb
├── ray
│ ├── input
│ ├── README
│ ├── sources.mlb
│ └── load
├── regexp.sml
├── regexp1.sml
├── regexp2.sml
├── cmdline.sml.out.ok
├── constraint.sml.log.ok
├── error1.mlb
├── professor.sml
├── server.mlb
├── tststrcmp.sml
├── anoq_Exception.sml.log.ok
├── msort.mlb
├── nucleic
│ └── sources.mlb
├── opaque.sml.out.ok
├── packreal2.sml.out.ok
├── ratio-regions.sml.log.ok
├── dynlink.mlb
├── fft.sml.out.ok
├── kitmandelbrot.sml.out.ok
├── stream.mlb
├── valrecpat2.sml
├── oh-no.sml.log.ok
├── weeks2.sml
├── danwang
│ ├── go.sml
│ └── sources.mlb
├── fns.sml.out.ok
├── logic
│ ├── sources_mlton.cm
│ ├── sources_smlnj.cm
│ ├── sources.mlb
│ └── term.sml
├── oh-no.sml
├── regexp1.mlb
├── regexp2.mlb
├── kittmergesort.sml.out.ok
├── listsort.mlb
├── listsort.mlb.out.ok
├── perm1.sml
├── pickletest.mlb
├── valrecpat4.sml
├── anoq_Exception.sml
├── error4.mlb
├── fork.sml
├── msortrun.sml
├── auto2.sml.out.ok
├── error3.mlb
├── regexp.sml.out.ok
├── regexp1.mlb.out.ok
├── lex.sml
├── packreal3.sml.out.ok
├── timer.sml.out.ok
├── elabDecBug.sml
├── valrecpat3.sml
├── weeks.sml
├── pat.sml
├── error2.mlb
├── globalbotrho.sml
├── kitfib35.sml
├── kitmolgard.sml.out.ok
├── export.sml
├── ftv.sml
├── seltuptup.sml
├── upto.sml
├── kitfib35_mlton.sml
├── stringsz.sml.out.ok
├── weeks5.sml
├── atExit0.sml.out.ok
├── kitfib35_smlnj.sml
├── weeks3.sml
├── sharing.sml
├── date2.sml
├── multiarg.sml
├── opaque3.sml
├── patricia.sml.out.ok
├── excon.sml
├── freedatatype.sml.log.ok
├── freedatatype2.sml.log.ok
├── functor4.sml
├── barnes-hut
│ └── sources.mlb
├── oh-no2.sml.log.ok
├── stream.mlb.out.ok
├── unbox.sml
├── layout.sml
├── vector.sml.out.ok
├── vesa2.sml
├── stringcvt.sml.out.ok
├── weeks2.sml.log.ok
├── PermuteList.sig
├── packreal.sml.out.ok
├── foldbug.sml
├── helsen.sml
├── functor3.sml
├── real_match.sml
├── arr2a.sml
├── type_sharing.sml
├── datatypes.sml.out.ok
├── rank.sml
├── listpair.sml.out.ok
├── .gitignore
├── rank.sml.log.ok
├── pat.sml.log.ok
├── elabDecBug.sml.log.ok
├── tak.sml
├── export.c
├── posix.sml.out.ok
└── tak_smlnj.sml
├── js
├── appfun
│ ├── .gitignore
│ ├── dropbox.png
│ ├── nodropbox.png
│ ├── smltojs_logo_no_text.png
│ ├── json.mlb
│ ├── smltojs_logo_no_text64x64.png
│ ├── oauth.mlb
│ ├── smltojs_logo_no_text256x256.png
│ ├── appfun.mlb
│ └── AppFun2.mlb
├── basis
│ ├── .gitignore
│ ├── Makefile
│ ├── md5.mlb
│ ├── rwp.mlb
│ ├── utest.mlb
│ ├── Array.sml
│ ├── html.mlb
│ ├── dojo.mlb
│ ├── Control.sml
│ ├── String2.sml
│ ├── js.mlb
│ ├── xmlrpc.mlb
│ ├── ArraySlice.sml
│ ├── Vector.sml
│ ├── VectorSlice.sml
│ └── Text.sml
├── codemirror
│ ├── sml
│ │ ├── .gitignore
│ │ └── codemirror.mlb
│ └── Makefile
├── test
│ ├── rwp_ex4.mlb
│ ├── rwp_ex5.mlb
│ ├── rhtml_ex1.mlb
│ ├── dojo
│ │ ├── README
│ │ ├── trash32.png
│ │ ├── .gitignore
│ │ ├── dojo_test.mlb
│ │ └── formlets_test.mlb
│ ├── dojo-flat
│ │ ├── .bowerrc
│ │ ├── README
│ │ ├── .gitignore
│ │ └── dojo_test.mlb
│ ├── export.mlb
│ ├── philip.html.out.ok
│ ├── test1.sml
│ ├── cal.mlb
│ ├── ll.gif
│ ├── lr.gif
│ ├── tdom2_ex1.mlb
│ ├── ul.gif
│ ├── ur.gif
│ ├── .gitignore
│ ├── armor.png
│ ├── exec.mlb
│ ├── lamp.png
│ ├── life.mlb
│ ├── sheep.png
│ ├── temp.mlb
│ ├── walls.png
│ ├── counter.mlb
│ ├── export.sml
│ ├── plantgreen.png
│ ├── tailrec2.html.out.ok
│ ├── frp.mlb
│ ├── tablechairs.png
│ ├── tlist.mlb
│ ├── xmlrpc_test1.mlb
│ ├── ntemp.mlb
│ ├── rwp_ex1.mlb
│ ├── rwp_ex2.mlb
│ ├── rwp_ex3.mlb
│ ├── tabs.mlb
│ ├── canvas_ex1.mlb
│ ├── packreal2.html.out.ok
│ ├── tdom_ex1.mlb
│ ├── appfuntest
│ │ ├── smltojs_logo_transparent_small.png
│ │ └── appfuntest.mlb
│ ├── packreal3.html.out.ok
│ ├── philip.sml
│ ├── rwp3.mlb
│ ├── rwp.mlb
│ ├── stringcvt.html.out.ok
│ ├── tdom_ex1.sml
│ ├── listpair.html.out.ok
│ ├── vector.html.out.ok
│ └── fix2.html.out.ok
├── doc
│ ├── .gitignore
│ ├── style.css
│ └── images
│ │ └── ui-bg_flat_75_ffffff_40x100.png
├── .gitignore
├── otests
│ ├── sheep.png
│ └── content
├── smltojs_logo_color.png
├── smltojs_logo_no_text.png
├── slides_diku_2007-11-27.pdf
├── smltojs_logo_color160.png
└── slides_lunch_2007-09-17.pdf
├── src
├── Edlib
│ ├── .gitignore
│ ├── Makefile
│ └── edlib.mlb
├── Common
│ ├── .gitignore
│ ├── EfficientElab
│ │ ├── .gitignore
│ │ └── ModuleStatObject.sml
│ ├── KitKam.sml
│ ├── md5.mlb
│ ├── KitDummy.sml
│ ├── TYCON.sig
│ ├── DEC_GRAMMAR.sml
│ ├── DecGrammar.sml
│ ├── ORDER.sig
│ ├── STATOBJECT.sml
│ ├── KitOnKit.sml
│ ├── PreElabTopdecGrammar.sml
│ ├── StringSet.sml
│ ├── StringFinMap.sml
│ ├── KitX86.sml
│ ├── ORDSET.sml
│ ├── KitMain.sml
│ ├── StringFinMapPT.sml
│ ├── TIMESTAMP.sig
│ ├── PostElabDecGrammar.sml
│ ├── CRASH.sig
│ ├── Timestamp.sml
│ ├── PreElabDecGrammar.sml
│ ├── AllInfo.sml
│ ├── ERROR_TRAVERSE.sml
│ ├── SMLofNJOnKit.sml
│ ├── KitX64.sml
│ ├── PostElabGrammar.sml
│ ├── TYVAR.sig
│ ├── FunId.sml
│ ├── SigId.sml
│ ├── KitSmlserver.sml
│ ├── test
│ │ └── IntFinMapPT_Test.mlb
│ └── ERROR_CODE.sml
├── Kitlib
│ ├── .gitignore
│ └── RegExp.sml
├── Manager
│ ├── .gitignore
│ ├── ElabRepository.sml
│ └── MODCODE_MINI.sml
├── Pickle
│ ├── .gitignore
│ ├── test
│ │ ├── Makefile
│ │ └── test_pickle.mlb
│ ├── Makefile
│ └── PACK_REAL.sml
├── Compiler
│ ├── Lambda
│ │ ├── .gitignore
│ │ └── CompileDec.sml
│ ├── Backend
│ │ ├── .gitignore
│ │ ├── JS
│ │ │ ├── .gitignore
│ │ │ └── jsast.mlb
│ │ └── X64
│ │ │ └── .gitignore
│ ├── Regions
│ │ ├── .gitignore
│ │ └── EffVarEnv.sml
│ ├── .gitignore
│ ├── mlkit64.mlb
│ ├── reml64.mlb
│ └── COMPILE_TO_LAMB.sml
├── Tools
│ ├── Benchmark
│ │ ├── .gitignore
│ │ ├── KitBench.mlb
│ │ └── Makefile
│ ├── MspComp
│ │ ├── .gitignore
│ │ └── Makefile
│ ├── ml-yacc
│ │ ├── src
│ │ │ ├── .gitignore
│ │ │ └── README
│ │ ├── .gitignore
│ │ ├── doc
│ │ │ └── mlyacc.pdf
│ │ ├── examples
│ │ │ ├── fol
│ │ │ │ ├── list.fol
│ │ │ │ ├── absyn.sml
│ │ │ │ └── sources.cm
│ │ │ └── calc
│ │ │ │ └── sources.cm
│ │ └── lib
│ │ │ └── ml-yacc-lib.mlb
│ ├── Rp2ps
│ │ ├── .gitignore
│ │ ├── Error.h
│ │ ├── PostScript.h
│ │ └── Alloc.h
│ ├── SigDoc
│ │ ├── .gitignore
│ │ ├── lib
│ │ │ └── style.css
│ │ └── sigdoc.mlb
│ ├── Tester
│ │ ├── .gitignore
│ │ ├── info.mlb
│ │ ├── INFO.sig
│ │ └── KitTester.mlb
│ ├── MlbMake
│ │ ├── .gitignore
│ │ ├── Configuration.sml.in
│ │ ├── CONFIGURATION.sig
│ │ ├── configuration.mlb
│ │ ├── ENVIRONMENT.sig
│ │ ├── sources.mlb
│ │ ├── MLKit.sml
│ │ └── environment.mlb
│ └── ml-lex
│ │ ├── mllex.pdf
│ │ ├── .gitignore
│ │ └── ml-lex.mlb
├── CUtils
│ ├── .gitignore
│ ├── binaryheap_test.out.ok
│ ├── hashfun.h
│ └── hashmap_typed_test.out.ok
├── Parsing
│ └── .gitignore
├── Runtime
│ ├── Export.h
│ ├── GC.c
│ ├── Region.c
│ ├── Posix.h
│ └── .gitignore
├── lib
│ └── github.com
│ │ └── diku-dk
│ │ └── sml-uref
│ │ ├── test
│ │ ├── .gitignore
│ │ ├── test_uref.mlb
│ │ └── test_uref.out.ok
│ │ ├── uref.mlb
│ │ └── Makefile
├── .gitignore
└── sml.pkg
├── test_dev
├── a1.out.ok
├── exn2.out.ok
├── exn3.out.ok
├── if.out.ok
├── b3.out.ok
├── c.mlbout.ok
├── global_region.out.ok
├── a.mlb
├── b.mlb
├── c.mlb
├── c1.sml
├── ccall.out.ok
├── expr.out.ok
├── f64_1.out.ok
├── f64_2.out.ok
├── f64_3.out.ok
├── f64_4.out.ok
├── fib0.out.ok
├── hello.out.ok
├── immedString.out.ok
├── ref.out.ok
├── reg.out.ok
├── string1.out.ok
├── b.mlbout.ok
├── exception1.out.ok
├── jt.out.ok
├── empty.sml
├── er1_err.sml
├── exn1.out.ok
├── kitqsort_no_basislib.out.ok
├── l1.out.ok
├── raise_div.sml
├── exception3.out.ok
├── f2.out.ok
├── kitreynolds2_no_basislib.out.ok
├── kitreynolds3_no_basislib.out.ok
├── raise_div.out.ok
├── real0.out.ok
├── xinline.mlb
├── sign.out.ok
├── a.mlbout.ok
├── b1.sml
├── exn1.sml
├── floor2.out.ok
├── empty_loop.sml
├── int_first.out.ok
├── word_list.out.ok
├── real5.sml
├── ref-real.out.ok
├── shra.out.ok
├── README
├── int_overflow.out.ok
├── foldl.out.ok
├── README_KAM.md
├── auto2.out.ok
├── string_sub.out.ok
├── exception6.sml
├── fft_no_basislib.out.ok
├── exn4.out.ok
├── .gitignore
├── kittmergesort_no_basislib.out.ok
├── raise_maybe.sml
├── real1.out.ok
├── a1.sml
├── string_upd.out.ok
├── a2.sml
├── app1.sml
├── global_region.sml
├── scratchmem.out.ok
├── single.out.ok
├── div.sml
├── div0.sml
├── f1.out.ok
├── real_cmp.out.ok
├── r.c
├── exn5.sml
├── explode.sml
├── auto.out.ok
├── real2.out.ok
├── xinline.mlbout.ok
├── exception4.out.ok
├── exn2.sml
├── kit.script
├── exception5.out.ok
├── real_negabs.out.ok
├── build.out.ok
├── ceil.sml
├── b3.sml
├── app2.sml
├── many_args.sml
├── Initial.out.ok
├── f64_simple2.sml
├── b2.sml
├── fib0.sml
├── f64_1.sml
├── interrupt.sml
├── if2.sml
├── word_problem.sml
├── if.sml
├── f64_2.sml
├── f64_simple1.sml
├── ref.sml
├── p1.sml
├── list_nh.out.ok
├── eqdat.sml
├── xinlB.sml
├── floor.sml
├── rev.sml
├── strs.sml
├── f1.sml
├── f64_simple.sml
└── c2.sml
├── basis
├── .gitignore
├── io
│ ├── .gitignore
│ ├── bin-stream-io.sig
│ └── io-close.sml
├── repl.mlb
├── RegExp.sml
├── Array.sml
├── binarymap.mlb
├── md5.mlb
├── listsort.mlb
├── Word16.sml
├── real64_blocks.mlb
├── par-seq.mlb
├── Ints.sml
├── Makefile
├── dynlink.mlb
├── par.mlb
├── THREAD.sig
├── par-reml.mlb
├── ThreadSeq.sml
├── CommandLine.sml
├── Vector.sml
├── web
│ ├── xmlrpc
│ │ └── xmlrpc.mlb
│ ├── WEB_DYNLIB.sml
│ ├── WEB_DB_BIND.sml
│ └── WEB_MIME.sml
├── ArraySlice.sml
├── Prim.sml
├── VectorSlice.sml
└── Text.sml
├── kitdemo
├── minilist.sml
├── lambda1.sml
├── compose.sml
├── helloworld.sml
├── lambda4.sml
├── refs1.sml
├── compose.mlb
├── minilist.mlb
├── vpprob.mlb
├── scan.mlb
├── projection.sml
├── high-unb.sml
├── mylib.mlb
├── scan_rev1.mlb
├── scan_rev2.mlb
├── trees.mlb
├── onetwothree.sml
├── lambda3.sml
├── msort.mlb
├── msortreset1.mlb
├── msortreset2.mlb
├── scan_stream.mlb
├── tststrcmp.sml
├── IntSet.sml
├── PolySet.mlb
├── tail2.sml
├── lambda2.sml
├── utils
│ ├── utils.mlb
│ └── ListUtils.sml
├── select_second.mlb
├── Set.mlb
├── runmsort.sml
├── select_second.sml
├── dangling.sml
├── append.sml
├── msortrun.sml
├── expdec.sml
├── apply.sml
├── expdec2.sml
├── select_second.c
├── fold1.sml
├── map.sml
├── fold4.sml
├── refs2.sml
├── escape.sml
├── escape2.sml
├── fromto.sml
├── tail.sml
├── fold2.sml
├── refs3.sml
├── upto.sml
├── lambda.sml
├── fold3.sml
├── escape1.sml
├── takeanddrop.sml
├── elimpair.sml
├── sma1.sml
├── SetApp.sml
├── INT_SET.sml
├── SET.sig
├── PolySet.sml
└── vpprob.sml
├── doc
├── .gitignore
├── mlkit.pdf
└── manual
│ ├── scan.pdf
│ ├── life100.pdf
│ ├── life50.pdf
│ ├── msort.pdf
│ ├── life_ex2.pdf
│ ├── life_ex3.pdf
│ ├── life_ex4.pdf
│ ├── prof_eks1.pdf
│ ├── prof_eks2.pdf
│ ├── prof_eks3.pdf
│ ├── prof_eks4.pdf
│ ├── length_stack.pdf
│ ├── mlkit-logo.png
│ ├── msortregion.pdf
│ ├── msortreset2.pdf
│ ├── msortstack.pdf
│ ├── scan_posix.pdf
│ ├── scan_rev1_1.pdf
│ ├── scan_rev1_2.pdf
│ ├── scan_rev2_1.pdf
│ ├── scan_stream.pdf
│ ├── length_region.pdf
│ ├── nlength_region.pdf
│ ├── nlength_stack.pdf
│ ├── scan_stream_nogc.pdf
│ ├── mlkit_compiling_kitkbjul9.pdf
│ ├── mlkit_compiling_kitkbjul9_400msec.pdf
│ ├── README
│ └── Makefile
├── autobuild
├── vagrant
└── ubuntu_i686_mlkit
│ └── .gitignore
├── kitlib
├── OrderSet.sml
├── IntSet.sml
├── NatSet.sml
├── finmap.mlb
├── IntFinMapPT.sml
├── finmap_impl.mlb
├── kitprofile.mlb
├── set.mlb
├── pp.mlb
├── set_impl.mlb
├── kitprofile.sig
├── kitprofile.sml
├── finmap_ext.mlb
├── set_ext.mlb
└── CRASH.sig
├── .gitignore
├── man
└── man1
│ └── .gitignore
└── ml-yacc-lib
└── ml-yacc-lib.mlb
/test/lllllll.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/js/appfun/.gitignore:
--------------------------------------------------------------------------------
1 | MLB
--------------------------------------------------------------------------------
/src/Edlib/.gitignore:
--------------------------------------------------------------------------------
1 | MLB
--------------------------------------------------------------------------------
/test/dangle4.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/ftv.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/layout.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/lex.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/llv.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/oh-no.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/oh-no2.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/opaque3.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/vesa2.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/weeks.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/weeks5.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Common/.gitignore:
--------------------------------------------------------------------------------
1 | MLB
--------------------------------------------------------------------------------
/src/Kitlib/.gitignore:
--------------------------------------------------------------------------------
1 | MLB
--------------------------------------------------------------------------------
/src/Manager/.gitignore:
--------------------------------------------------------------------------------
1 | MLB
--------------------------------------------------------------------------------
/src/Pickle/.gitignore:
--------------------------------------------------------------------------------
1 | MLB
--------------------------------------------------------------------------------
/test/date2.sml.out.ok:
--------------------------------------------------------------------------------
1 | Ok
2 |
--------------------------------------------------------------------------------
/test/error3a.mlb:
--------------------------------------------------------------------------------
1 | error3.sml
--------------------------------------------------------------------------------
/test/error4a.mlb:
--------------------------------------------------------------------------------
1 | error4.mlb
--------------------------------------------------------------------------------
/test/excon.sml.out.ok:
--------------------------------------------------------------------------------
1 | 71
2 |
--------------------------------------------------------------------------------
/test/functor2.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/kitdangle.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/kitdangle3.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/kitfib35.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/mlbtest/d1/f.mlb:
--------------------------------------------------------------------------------
1 | f.sml
--------------------------------------------------------------------------------
/test/poll.sml.out.ok:
--------------------------------------------------------------------------------
1 | OK!
2 |
--------------------------------------------------------------------------------
/test/ray.mlb.out.ok:
--------------------------------------------------------------------------------
1 | Ok
2 |
--------------------------------------------------------------------------------
/test/unbox.sml.out.ok:
--------------------------------------------------------------------------------
1 | Ok
2 |
--------------------------------------------------------------------------------
/test_dev/a1.out.ok:
--------------------------------------------------------------------------------
1 | Hello
--------------------------------------------------------------------------------
/test_dev/exn2.out.ok:
--------------------------------------------------------------------------------
1 | **9**
--------------------------------------------------------------------------------
/test_dev/exn3.out.ok:
--------------------------------------------------------------------------------
1 | **ok**
--------------------------------------------------------------------------------
/test_dev/if.out.ok:
--------------------------------------------------------------------------------
1 | It works!
--------------------------------------------------------------------------------
/js/basis/.gitignore:
--------------------------------------------------------------------------------
1 | MLB
2 | *.html
--------------------------------------------------------------------------------
/js/codemirror/sml/.gitignore:
--------------------------------------------------------------------------------
1 | MLB
--------------------------------------------------------------------------------
/src/Compiler/Lambda/.gitignore:
--------------------------------------------------------------------------------
1 | MLB
--------------------------------------------------------------------------------
/test/anoq_Exception.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/barry/qsort.out.ok:
--------------------------------------------------------------------------------
1 | Ok!
2 |
--------------------------------------------------------------------------------
/test/error2.sml:
--------------------------------------------------------------------------------
1 | val a = 5
2 |
--------------------------------------------------------------------------------
/test/error2b.sml:
--------------------------------------------------------------------------------
1 | val b = 8
2 |
--------------------------------------------------------------------------------
/test/error3.sml:
--------------------------------------------------------------------------------
1 | val a = 5
2 |
--------------------------------------------------------------------------------
/test/foldbug.sml.out.ok:
--------------------------------------------------------------------------------
1 | 42
2 |
--------------------------------------------------------------------------------
/test/functor3.sml.out.ok:
--------------------------------------------------------------------------------
1 | Ok
2 |
--------------------------------------------------------------------------------
/test/kitqsort.sml.out.ok:
--------------------------------------------------------------------------------
1 | Ok!
2 |
--------------------------------------------------------------------------------
/test/logic.mlb.out.ok:
--------------------------------------------------------------------------------
1 | Yes
2 |
--------------------------------------------------------------------------------
/test/mlbtest/d1/d.mlb:
--------------------------------------------------------------------------------
1 | a.sml
2 |
--------------------------------------------------------------------------------
/test/mlbtest/datatype/d.mlb:
--------------------------------------------------------------------------------
1 | d1.sml
--------------------------------------------------------------------------------
/test/nucleic.mlb.out.ok:
--------------------------------------------------------------------------------
1 | 179
2 |
--------------------------------------------------------------------------------
/test/ray.mlb:
--------------------------------------------------------------------------------
1 | ray/sources.mlb
2 |
--------------------------------------------------------------------------------
/test/seltuptup.sml.out.ok:
--------------------------------------------------------------------------------
1 | Ok
2 |
--------------------------------------------------------------------------------
/test/valrecpat.sml.out.ok:
--------------------------------------------------------------------------------
1 | OK
2 |
--------------------------------------------------------------------------------
/test/valrecpat1.sml.out.ok:
--------------------------------------------------------------------------------
1 | OK
2 |
--------------------------------------------------------------------------------
/test/valrecpat2.sml.out.ok:
--------------------------------------------------------------------------------
1 | OK
2 |
--------------------------------------------------------------------------------
/test/valrecpat3.sml.out.ok:
--------------------------------------------------------------------------------
1 | OK
2 |
--------------------------------------------------------------------------------
/test_dev/b3.out.ok:
--------------------------------------------------------------------------------
1 | Hej Med dig
--------------------------------------------------------------------------------
/test_dev/c.mlbout.ok:
--------------------------------------------------------------------------------
1 | Hello world
--------------------------------------------------------------------------------
/test_dev/global_region.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Common/EfficientElab/.gitignore:
--------------------------------------------------------------------------------
1 | MLB
--------------------------------------------------------------------------------
/src/Compiler/Backend/.gitignore:
--------------------------------------------------------------------------------
1 | MLB
--------------------------------------------------------------------------------
/src/Compiler/Backend/JS/.gitignore:
--------------------------------------------------------------------------------
1 | MLB
--------------------------------------------------------------------------------
/src/Compiler/Backend/X64/.gitignore:
--------------------------------------------------------------------------------
1 | MLB
--------------------------------------------------------------------------------
/src/Compiler/Regions/.gitignore:
--------------------------------------------------------------------------------
1 | MLB
--------------------------------------------------------------------------------
/src/Manager/ElabRepository.sml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/Tools/Benchmark/.gitignore:
--------------------------------------------------------------------------------
1 | kitbench
--------------------------------------------------------------------------------
/src/Tools/MspComp/.gitignore:
--------------------------------------------------------------------------------
1 | mspcomp
--------------------------------------------------------------------------------
/src/Tools/ml-yacc/src/.gitignore:
--------------------------------------------------------------------------------
1 | MLB
--------------------------------------------------------------------------------
/test/barry/fib35.out.ok:
--------------------------------------------------------------------------------
1 | 24157817
2 |
--------------------------------------------------------------------------------
/test/barry/mandelbrot.out.ok:
--------------------------------------------------------------------------------
1 | OK
2 |
--------------------------------------------------------------------------------
/test/barry/precedence.out.ok:
--------------------------------------------------------------------------------
1 | 28
2 |
--------------------------------------------------------------------------------
/test/explicit_regions/call.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/explicit_regions/call2.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/explicit_regions/con0.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/explicit_regions/con1.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/explicit_regions/param.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/explicit_regions/rec.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/explicit_regions/ref.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/explicit_regions/tup.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/explicit_regions/tup2.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/explicit_regions/ty1.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/export2.sml.out.ok:
--------------------------------------------------------------------------------
1 | Result: 3
2 |
--------------------------------------------------------------------------------
/test/kitreynolds2.sml.out.ok:
--------------------------------------------------------------------------------
1 | false
2 |
--------------------------------------------------------------------------------
/test/kitreynolds3.sml.out.ok:
--------------------------------------------------------------------------------
1 | false
2 |
--------------------------------------------------------------------------------
/test/logic.mlb:
--------------------------------------------------------------------------------
1 | logic/sources.mlb
2 |
--------------------------------------------------------------------------------
/test/mlbtest/d1/a.sml:
--------------------------------------------------------------------------------
1 | val a = "hello"
--------------------------------------------------------------------------------
/test/mlbtest/d2/c.sml:
--------------------------------------------------------------------------------
1 | val c = (a, " ")
--------------------------------------------------------------------------------
/test/mlbtest/f1.mlb:
--------------------------------------------------------------------------------
1 | d1/f.mlb
2 | f1.sml
--------------------------------------------------------------------------------
/test/msort.mlb.out.ok:
--------------------------------------------------------------------------------
1 | Really done
2 |
--------------------------------------------------------------------------------
/test/pat.sml.out.ok:
--------------------------------------------------------------------------------
1 | hello world
2 |
--------------------------------------------------------------------------------
/test/sigs-avail.sml.out.ok:
--------------------------------------------------------------------------------
1 | All ok!
2 |
--------------------------------------------------------------------------------
/test/with-escape.sml.out.ok:
--------------------------------------------------------------------------------
1 | hello
2 |
--------------------------------------------------------------------------------
/test_dev/a.mlb:
--------------------------------------------------------------------------------
1 | a1.sml
2 | a2.sml
3 |
--------------------------------------------------------------------------------
/test_dev/b.mlb:
--------------------------------------------------------------------------------
1 | b1.sml
2 | b2.sml
3 |
--------------------------------------------------------------------------------
/test_dev/c.mlb:
--------------------------------------------------------------------------------
1 | c1.sml
2 | c2.sml
3 |
--------------------------------------------------------------------------------
/test_dev/c1.sml:
--------------------------------------------------------------------------------
1 | val a = "Hello "
2 |
--------------------------------------------------------------------------------
/test_dev/ccall.out.ok:
--------------------------------------------------------------------------------
1 | Num: 1096
2 |
--------------------------------------------------------------------------------
/test_dev/expr.out.ok:
--------------------------------------------------------------------------------
1 | Num: 38.20
2 |
--------------------------------------------------------------------------------
/test_dev/f64_1.out.ok:
--------------------------------------------------------------------------------
1 | Num: 7.00
2 |
--------------------------------------------------------------------------------
/test_dev/f64_2.out.ok:
--------------------------------------------------------------------------------
1 | Num: 135.00
2 |
--------------------------------------------------------------------------------
/test_dev/f64_3.out.ok:
--------------------------------------------------------------------------------
1 | Num: 70.00
2 |
--------------------------------------------------------------------------------
/test_dev/f64_4.out.ok:
--------------------------------------------------------------------------------
1 | Num: 39.00
2 |
--------------------------------------------------------------------------------
/test_dev/fib0.out.ok:
--------------------------------------------------------------------------------
1 | Num: 1346269
2 |
--------------------------------------------------------------------------------
/test_dev/hello.out.ok:
--------------------------------------------------------------------------------
1 | It works!
2 |
--------------------------------------------------------------------------------
/test_dev/immedString.out.ok:
--------------------------------------------------------------------------------
1 | It works
--------------------------------------------------------------------------------
/test_dev/ref.out.ok:
--------------------------------------------------------------------------------
1 | Hej med digHej igen
--------------------------------------------------------------------------------
/test_dev/reg.out.ok:
--------------------------------------------------------------------------------
1 | Num: 501560
2 |
--------------------------------------------------------------------------------
/test_dev/string1.out.ok:
--------------------------------------------------------------------------------
1 | Hej Igen
2 |
--------------------------------------------------------------------------------
/basis/.gitignore:
--------------------------------------------------------------------------------
1 | MLB
2 | *.log
3 | *.vcg
--------------------------------------------------------------------------------
/basis/io/.gitignore:
--------------------------------------------------------------------------------
1 | MLB
2 | *.log
3 | *.vcg
--------------------------------------------------------------------------------
/basis/repl.mlb:
--------------------------------------------------------------------------------
1 | basis.mlb
2 | repl.sml
3 |
--------------------------------------------------------------------------------
/js/test/rwp_ex4.mlb:
--------------------------------------------------------------------------------
1 | rwp3.mlb
2 | rwp_ex4.sml
--------------------------------------------------------------------------------
/js/test/rwp_ex5.mlb:
--------------------------------------------------------------------------------
1 | rwp3.mlb
2 | rwp_ex5.sml
--------------------------------------------------------------------------------
/src/Edlib/Makefile:
--------------------------------------------------------------------------------
1 | clean:
2 | rm -rf MLB *~
--------------------------------------------------------------------------------
/src/Tools/Rp2ps/.gitignore:
--------------------------------------------------------------------------------
1 | *.o
2 | rp2ps
--------------------------------------------------------------------------------
/src/Tools/SigDoc/.gitignore:
--------------------------------------------------------------------------------
1 | sigdoc
2 | MLB
--------------------------------------------------------------------------------
/test/constraint.sml.out.ok:
--------------------------------------------------------------------------------
1 | A(hello,5)
2 |
--------------------------------------------------------------------------------
/test/danwang.mlb:
--------------------------------------------------------------------------------
1 | danwang/sources.mlb
2 |
--------------------------------------------------------------------------------
/test/danwang.mlb.out.ok:
--------------------------------------------------------------------------------
1 | start
2 | stop
3 |
--------------------------------------------------------------------------------
/test/explicit_regions/param1.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/explicit_regions/string.sml.out.ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/export3.sml.out.ok:
--------------------------------------------------------------------------------
1 | Result: 109
2 |
--------------------------------------------------------------------------------
/test/input_to_testdyn2:
--------------------------------------------------------------------------------
1 | Potato
2 | hello
3 |
--------------------------------------------------------------------------------
/test/mlbtest/d2/b.sml:
--------------------------------------------------------------------------------
1 | val b = (c, "world")
--------------------------------------------------------------------------------
/test/mlbtest/dir.mlb:
--------------------------------------------------------------------------------
1 | d1/d.mlb
2 | d2/d.mlb
--------------------------------------------------------------------------------
/test/mlbtest/f1.sml:
--------------------------------------------------------------------------------
1 | structure S = F()
2 |
--------------------------------------------------------------------------------
/test/mlbtest/functor4.sml:
--------------------------------------------------------------------------------
1 | structure B = B()
--------------------------------------------------------------------------------
/test/mlbtest/sig.mlb:
--------------------------------------------------------------------------------
1 | sig.sig
2 | sig.sml
--------------------------------------------------------------------------------
/test/nucleic.mlb:
--------------------------------------------------------------------------------
1 | nucleic/sources.mlb
2 |
--------------------------------------------------------------------------------
/test/parallelism/cores.sml.out.ok:
--------------------------------------------------------------------------------
1 | Ok
2 |
--------------------------------------------------------------------------------
/test/real_match.sml.out.ok:
--------------------------------------------------------------------------------
1 | test: OK
2 |
--------------------------------------------------------------------------------
/test/structs-avail.sml.out.ok:
--------------------------------------------------------------------------------
1 | All ok
2 |
--------------------------------------------------------------------------------
/test/valrecpat4.sml.out.ok:
--------------------------------------------------------------------------------
1 | it works
2 |
--------------------------------------------------------------------------------
/test_dev/b.mlbout.ok:
--------------------------------------------------------------------------------
1 | Hi
2 | HelloHej Med dig
--------------------------------------------------------------------------------
/test_dev/exception1.out.ok:
--------------------------------------------------------------------------------
1 | E raised, ok
2 |
--------------------------------------------------------------------------------
/test_dev/jt.out.ok:
--------------------------------------------------------------------------------
1 | Num: 5
2 | Num: 8
3 |
--------------------------------------------------------------------------------
/js/doc/.gitignore:
--------------------------------------------------------------------------------
1 | generated_tags.js
2 | *.html
--------------------------------------------------------------------------------
/js/test/rhtml_ex1.mlb:
--------------------------------------------------------------------------------
1 | rwp3.mlb
2 | rhtml_ex1.sml
--------------------------------------------------------------------------------
/kitdemo/minilist.sml:
--------------------------------------------------------------------------------
1 | val abc = ["a", "b", "c"];
--------------------------------------------------------------------------------
/src/CUtils/.gitignore:
--------------------------------------------------------------------------------
1 | *.o
2 | *.out
3 | *.res
--------------------------------------------------------------------------------
/src/Parsing/.gitignore:
--------------------------------------------------------------------------------
1 | MLB
2 | Topdec.grm.desc
--------------------------------------------------------------------------------
/test/explicit_regions/par.sml.out.ok:
--------------------------------------------------------------------------------
1 | Done
2 |
--------------------------------------------------------------------------------
/test/hatch1.sml.out.ok:
--------------------------------------------------------------------------------
1 | hi1
2 | hi2
3 | ok
4 |
--------------------------------------------------------------------------------
/test/mlbtest/char.mlb:
--------------------------------------------------------------------------------
1 | char.sml
2 | charsig.sml
--------------------------------------------------------------------------------
/test/mlbtest/d2/d2.mlb:
--------------------------------------------------------------------------------
1 | ../d1/d.mlb
2 | c.sml
3 |
--------------------------------------------------------------------------------
/test_dev/empty.sml:
--------------------------------------------------------------------------------
1 | (* the empty program *)
2 |
--------------------------------------------------------------------------------
/test_dev/er1_err.sml:
--------------------------------------------------------------------------------
1 |
2 | val region = (4,3)
3 |
--------------------------------------------------------------------------------
/test_dev/exn1.out.ok:
--------------------------------------------------------------------------------
1 | uncaught exception E
2 |
--------------------------------------------------------------------------------
/test_dev/kitqsort_no_basislib.out.ok:
--------------------------------------------------------------------------------
1 | Ok!
2 |
--------------------------------------------------------------------------------
/test_dev/l1.out.ok:
--------------------------------------------------------------------------------
1 | It works n gives lhej igenHej
--------------------------------------------------------------------------------
/test_dev/raise_div.sml:
--------------------------------------------------------------------------------
1 | val () = raise Div
2 |
--------------------------------------------------------------------------------
/doc/.gitignore:
--------------------------------------------------------------------------------
1 | README_BIN
2 | README_SMLSERVER_BIN
--------------------------------------------------------------------------------
/js/basis/Makefile:
--------------------------------------------------------------------------------
1 | clean:
2 | rm -rf *~ MLB *.mlb.html
--------------------------------------------------------------------------------
/js/test/dojo/README:
--------------------------------------------------------------------------------
1 | see Makefile for instructions...
--------------------------------------------------------------------------------
/kitdemo/lambda1.sml:
--------------------------------------------------------------------------------
1 | fun apply f x = f x
2 |
--------------------------------------------------------------------------------
/src/CUtils/binaryheap_test.out.ok:
--------------------------------------------------------------------------------
1 | 5 4 1 7 2 3 6
2 |
--------------------------------------------------------------------------------
/src/Tools/Tester/.gitignore:
--------------------------------------------------------------------------------
1 | Makefile
2 | kittester
--------------------------------------------------------------------------------
/test/barnes-hut.mlb:
--------------------------------------------------------------------------------
1 | barnes-hut/sources.mlb
2 |
3 |
--------------------------------------------------------------------------------
/test/exn.sml.out.ok:
--------------------------------------------------------------------------------
1 | now working
2 | done working
3 |
--------------------------------------------------------------------------------
/test/explicit_regions/expty1.sml.out.ok:
--------------------------------------------------------------------------------
1 | Num: 6
2 |
--------------------------------------------------------------------------------
/test/explicit_regions/expty2.sml.out.ok:
--------------------------------------------------------------------------------
1 | Num: 10
2 |
--------------------------------------------------------------------------------
/test/explicit_regions/funty1.sml.out.ok:
--------------------------------------------------------------------------------
1 | Num: 11
2 |
--------------------------------------------------------------------------------
/test/opaque2.sml.out.ok:
--------------------------------------------------------------------------------
1 | uncaught exception Match
2 |
--------------------------------------------------------------------------------
/test/repl/.gitignore:
--------------------------------------------------------------------------------
1 | *.res
2 | run
3 | complog.txt
--------------------------------------------------------------------------------
/test/repl/simple.cmd:
--------------------------------------------------------------------------------
1 | val a = 3434;
2 | :quit;
3 |
--------------------------------------------------------------------------------
/test/repl/simple.out.ok:
--------------------------------------------------------------------------------
1 | . > val a = 3434 : int
2 |
--------------------------------------------------------------------------------
/test_dev/exception3.out.ok:
--------------------------------------------------------------------------------
1 | OK-Something else...
2 |
--------------------------------------------------------------------------------
/test_dev/f2.out.ok:
--------------------------------------------------------------------------------
1 | Num: -1
2 | Num: 0
3 | Num: 1
4 |
--------------------------------------------------------------------------------
/test_dev/kitreynolds2_no_basislib.out.ok:
--------------------------------------------------------------------------------
1 | false
2 |
--------------------------------------------------------------------------------
/test_dev/kitreynolds3_no_basislib.out.ok:
--------------------------------------------------------------------------------
1 | false
2 |
--------------------------------------------------------------------------------
/test_dev/raise_div.out.ok:
--------------------------------------------------------------------------------
1 | uncaught exception Div
2 |
--------------------------------------------------------------------------------
/test_dev/real0.out.ok:
--------------------------------------------------------------------------------
1 | Num: 1.80
2 | Num: 0.20
3 |
--------------------------------------------------------------------------------
/test_dev/xinline.mlb:
--------------------------------------------------------------------------------
1 |
2 | xinlA.sml
3 | xinlB.sml
4 |
--------------------------------------------------------------------------------
/js/test/dojo-flat/.bowerrc:
--------------------------------------------------------------------------------
1 | {
2 | "directory": "."
3 | }
--------------------------------------------------------------------------------
/js/test/dojo-flat/README:
--------------------------------------------------------------------------------
1 | see Makefile for instructions...
--------------------------------------------------------------------------------
/js/test/export.mlb:
--------------------------------------------------------------------------------
1 | $SML_LIB/basis/basis.mlb
2 | export.sml
--------------------------------------------------------------------------------
/js/test/philip.html.out.ok:
--------------------------------------------------------------------------------
1 | Loading philip.html
2 | ok
3 |
--------------------------------------------------------------------------------
/kitdemo/compose.sml:
--------------------------------------------------------------------------------
1 | fun (f o g) x = f(g x);
2 |
--------------------------------------------------------------------------------
/kitdemo/helloworld.sml:
--------------------------------------------------------------------------------
1 | val _ = print "hello world\n";
2 |
--------------------------------------------------------------------------------
/src/Compiler/.gitignore:
--------------------------------------------------------------------------------
1 | MLB
2 | index.html
3 | run.html
--------------------------------------------------------------------------------
/src/Pickle/test/Makefile:
--------------------------------------------------------------------------------
1 | all:
2 | mlkit test_pickle.mlb
--------------------------------------------------------------------------------
/test/exn-alpha.sml.out.ok:
--------------------------------------------------------------------------------
1 | now working
2 | done working
3 |
--------------------------------------------------------------------------------
/test/kitloop2.sml.out.ok:
--------------------------------------------------------------------------------
1 |
2 | looping...
3 |
4 | done
5 |
--------------------------------------------------------------------------------
/test_dev/sign.out.ok:
--------------------------------------------------------------------------------
1 | OK
2 | OK
3 | OK
4 | OK
5 | OK
6 |
--------------------------------------------------------------------------------
/js/test/test1.sml:
--------------------------------------------------------------------------------
1 |
2 | val _ = print("Hello world")
3 |
--------------------------------------------------------------------------------
/kitdemo/lambda4.sml:
--------------------------------------------------------------------------------
1 | val x = map (fn x => x+1) [7,11]
2 |
--------------------------------------------------------------------------------
/kitdemo/refs1.sml:
--------------------------------------------------------------------------------
1 | fun id x = let val r = ref x in ! r end
2 |
--------------------------------------------------------------------------------
/test/explicit_regions/param1.sml:
--------------------------------------------------------------------------------
1 | fun f `r () : real = 4.3`r
2 |
--------------------------------------------------------------------------------
/test/functor.sml.out.ok:
--------------------------------------------------------------------------------
1 | value is A(K)
2 | value is A(J)
3 |
--------------------------------------------------------------------------------
/test/gc0.sml.out.ok:
--------------------------------------------------------------------------------
1 | now working
2 | done working
3 | done
4 |
--------------------------------------------------------------------------------
/test/gc01.sml.out.ok:
--------------------------------------------------------------------------------
1 | now working
2 | done working
3 | done
4 |
--------------------------------------------------------------------------------
/test/logic_mlton.cm:
--------------------------------------------------------------------------------
1 | Group is
2 | logic/sources_mlton.cm
3 |
--------------------------------------------------------------------------------
/test/logic_smlnj.cm:
--------------------------------------------------------------------------------
1 | Group is
2 | logic/sources_smlnj.cm
3 |
--------------------------------------------------------------------------------
/test/mlbtest/functor1.sml:
--------------------------------------------------------------------------------
1 | val a = "Not used"
2 | val b = "Hello"
--------------------------------------------------------------------------------
/test/parallelism/spawn_simple2.sml.out.ok:
--------------------------------------------------------------------------------
1 | hi there
2 | Hi
3 |
--------------------------------------------------------------------------------
/test/repl/a.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | hello.sml
3 |
--------------------------------------------------------------------------------
/test_dev/a.mlbout.ok:
--------------------------------------------------------------------------------
1 | Hello world
2 | This is also a string
3 |
--------------------------------------------------------------------------------
/test_dev/b1.sml:
--------------------------------------------------------------------------------
1 | val a = "Hello"
2 | val b = ("Hej", "Med dig")
--------------------------------------------------------------------------------
/test_dev/exn1.sml:
--------------------------------------------------------------------------------
1 | exception E
2 |
3 | val a : int = raise E
--------------------------------------------------------------------------------
/test_dev/floor2.out.ok:
--------------------------------------------------------------------------------
1 | Num: 4
2 | Num: 2
3 | Num: 4
4 | End
5 |
--------------------------------------------------------------------------------
/kitdemo/compose.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | compose.sml
3 |
--------------------------------------------------------------------------------
/kitdemo/minilist.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | minilist.sml
3 |
--------------------------------------------------------------------------------
/kitdemo/vpprob.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | vpprob.sml
3 |
--------------------------------------------------------------------------------
/src/Tools/MlbMake/.gitignore:
--------------------------------------------------------------------------------
1 | Configuration.sml
2 | Makefile
3 | MLB
--------------------------------------------------------------------------------
/test/explicit_regions/param.sml:
--------------------------------------------------------------------------------
1 | fun f `[r] () : real = 4.3`r
2 |
--------------------------------------------------------------------------------
/test/intinf2.sml.out.ok:
--------------------------------------------------------------------------------
1 | Ok
2 | Ok
3 | Ok
4 | Ok
5 | Ok
6 | Ok
7 |
--------------------------------------------------------------------------------
/test/parallelism/exn2.sml.out.ok:
--------------------------------------------------------------------------------
1 | Num: 1
2 | Num: 1
3 | Num: 1
4 |
--------------------------------------------------------------------------------
/test/perm.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | perm1.sml
3 | perm.sml
--------------------------------------------------------------------------------
/test/repl/simple2.cmd:
--------------------------------------------------------------------------------
1 | infix +
2 | val a = 3434 + 23;
3 | :quit;
4 |
--------------------------------------------------------------------------------
/test_dev/empty_loop.sml:
--------------------------------------------------------------------------------
1 | fun go() = go()
2 |
3 | val _ = go()
4 |
--------------------------------------------------------------------------------
/kitdemo/scan.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | lib.sml
3 | scan.sml
4 |
--------------------------------------------------------------------------------
/test/lex.sml.log.ok:
--------------------------------------------------------------------------------
1 |
2 |
3 | ********** lex.sml *************
4 |
5 |
--------------------------------------------------------------------------------
/test/mlbtest/d1/f.sml:
--------------------------------------------------------------------------------
1 | functor F() = struct
2 | val a = 6
3 | end
4 |
--------------------------------------------------------------------------------
/test/mlbtest/d1/f2.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | f.mlb
3 | f2.sml
--------------------------------------------------------------------------------
/test/mlbtest/dir2.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | d1/a.sml
3 | dir2.sml
--------------------------------------------------------------------------------
/test/repl/simple2.out.ok:
--------------------------------------------------------------------------------
1 | . . > infix 0 +
2 | val a = 3457 : int
3 |
--------------------------------------------------------------------------------
/test/valrecpat1.sml:
--------------------------------------------------------------------------------
1 | val rec _ = fn x => x
2 |
3 | val _ = print "OK\n"
--------------------------------------------------------------------------------
/test_dev/int_first.out.ok:
--------------------------------------------------------------------------------
1 | Hi there
2 | Hello there
3 | Div it is!
4 |
--------------------------------------------------------------------------------
/test_dev/word_list.out.ok:
--------------------------------------------------------------------------------
1 | counting
2 | Num: 6
3 | Num: 63
4 | Num: 9
5 |
--------------------------------------------------------------------------------
/autobuild:
--------------------------------------------------------------------------------
1 | autoconf -o configure configure.ac
2 | autoheader configure.ac
3 |
--------------------------------------------------------------------------------
/doc/mlkit.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/mlkit.pdf
--------------------------------------------------------------------------------
/js/test/cal.mlb:
--------------------------------------------------------------------------------
1 | $SML_LIB/basis/basis.mlb
2 | HTML.sig
3 | Html.sml
4 | cal.sml
--------------------------------------------------------------------------------
/js/test/ll.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/js/test/ll.gif
--------------------------------------------------------------------------------
/js/test/lr.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/js/test/lr.gif
--------------------------------------------------------------------------------
/js/test/tdom2_ex1.mlb:
--------------------------------------------------------------------------------
1 | rwp3.mlb
2 | TDOM2.sig
3 | TDom2.sml
4 | tdom2_ex1.sml
--------------------------------------------------------------------------------
/js/test/ul.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/js/test/ul.gif
--------------------------------------------------------------------------------
/js/test/ur.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/js/test/ur.gif
--------------------------------------------------------------------------------
/kitdemo/projection.sml:
--------------------------------------------------------------------------------
1 | val xy = ((),())
2 | val x = #1 xy;
3 |
--------------------------------------------------------------------------------
/src/Common/KitKam.sml:
--------------------------------------------------------------------------------
1 | structure K = KitMain(KitCompiler(ExecutionKAM))
2 |
--------------------------------------------------------------------------------
/src/Common/md5.mlb:
--------------------------------------------------------------------------------
1 | local $(SML_LIB)/basis/basis.mlb
2 | in MD5.sml
3 | end
4 |
--------------------------------------------------------------------------------
/test/cobol.sml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/test/cobol.sml
--------------------------------------------------------------------------------
/test/layout.sml.log.ok:
--------------------------------------------------------------------------------
1 |
2 |
3 | ********** layout.sml *************
4 |
5 |
--------------------------------------------------------------------------------
/test/valrecpat.sml:
--------------------------------------------------------------------------------
1 | val rec ( f ) = fn x => x
2 |
3 | val _ = print (f "OK\n")
--------------------------------------------------------------------------------
/test/weeks.sml.log.ok:
--------------------------------------------------------------------------------
1 |
2 |
3 | ********** weeks.sml *************
4 |
5 |
--------------------------------------------------------------------------------
/test_dev/real5.sml:
--------------------------------------------------------------------------------
1 |
2 | val _ = print "H1\n"
3 | val _ = map round [9.0]
4 |
--------------------------------------------------------------------------------
/test_dev/ref-real.out.ok:
--------------------------------------------------------------------------------
1 | Num: 6001.00
2 | Num: 7002.00
3 | Num: 8003.00
4 |
--------------------------------------------------------------------------------
/test_dev/shra.out.ok:
--------------------------------------------------------------------------------
1 | Num: -64
2 | Num: -32
3 | Num: -1
4 | Num: -1
5 | Ok
6 |
--------------------------------------------------------------------------------
/vagrant/ubuntu_i686_mlkit/.gitignore:
--------------------------------------------------------------------------------
1 | tmp
2 | *.log
3 | package.box
4 | .vagrant
--------------------------------------------------------------------------------
/basis/RegExp.sml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/basis/RegExp.sml
--------------------------------------------------------------------------------
/js/basis/md5.mlb:
--------------------------------------------------------------------------------
1 | local
2 | basis.mlb
3 | in
4 | md5.sig
5 | md5.sml
6 | end
--------------------------------------------------------------------------------
/js/test/.gitignore:
--------------------------------------------------------------------------------
1 | *.html
2 | MLB
3 | *.res
4 | *.out
5 | *.snippet
6 | *.mlbsnippet
--------------------------------------------------------------------------------
/js/test/armor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/js/test/armor.png
--------------------------------------------------------------------------------
/js/test/exec.mlb:
--------------------------------------------------------------------------------
1 | $SML_LIB/basis/basis.mlb
2 | $SML_LIB/basis/js.mlb
3 | exec.sml
--------------------------------------------------------------------------------
/js/test/lamp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/js/test/lamp.png
--------------------------------------------------------------------------------
/js/test/life.mlb:
--------------------------------------------------------------------------------
1 | $SML_LIB/basis/basis.mlb
2 | $SML_LIB/basis/js.mlb
3 | life.sml
--------------------------------------------------------------------------------
/js/test/sheep.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/js/test/sheep.png
--------------------------------------------------------------------------------
/js/test/temp.mlb:
--------------------------------------------------------------------------------
1 | $SML_LIB/basis/basis.mlb
2 | $SML_LIB/basis/js.mlb
3 | temp.sml
--------------------------------------------------------------------------------
/js/test/walls.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/js/test/walls.png
--------------------------------------------------------------------------------
/kitdemo/high-unb.sml:
--------------------------------------------------------------------------------
1 | datatype t = Leaf of string | Empty | Children of t list
2 |
--------------------------------------------------------------------------------
/kitdemo/mylib.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | mylib.sml
3 | test_mylib.sml
4 |
--------------------------------------------------------------------------------
/kitdemo/scan_rev1.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | lib.sml
3 | scan_rev1.sml
4 |
--------------------------------------------------------------------------------
/kitdemo/scan_rev2.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | lib.sml
3 | scan_rev2.sml
4 |
--------------------------------------------------------------------------------
/kitdemo/trees.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | takeanddrop.sml
3 | trees.sml
4 |
--------------------------------------------------------------------------------
/src/Runtime/Export.h:
--------------------------------------------------------------------------------
1 |
2 | long callExportFun(const char *fun, long i);
3 |
4 |
--------------------------------------------------------------------------------
/src/Runtime/GC.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/src/Runtime/GC.c
--------------------------------------------------------------------------------
/test/FuhMishra.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | lib.sml
3 | FuhMishra.sml
4 |
--------------------------------------------------------------------------------
/test/enum-eq.sml.out.ok:
--------------------------------------------------------------------------------
1 | OK
2 | OK
3 | OK
4 | OK
5 | OK
6 | OK
7 | OK
8 | OK
9 |
--------------------------------------------------------------------------------
/test/explicit_regions/nomut-ok.sml.out.ok:
--------------------------------------------------------------------------------
1 | Hello
2 | Hello again
3 | hi there
4 |
--------------------------------------------------------------------------------
/test/host.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 | in host.sml
4 | end
5 |
--------------------------------------------------------------------------------
/test/mlbtest/d1/f2.sml:
--------------------------------------------------------------------------------
1 | structure S2 = F()
2 | val _ = print (Int.toString S2.a)
3 |
--------------------------------------------------------------------------------
/test/parallelism/spawn.sml.out.ok:
--------------------------------------------------------------------------------
1 | Num: 32
2 | Num: 18
3 | Num: 8
4 | Num: 2
5 |
--------------------------------------------------------------------------------
/test/ray/input:
--------------------------------------------------------------------------------
1 | 100 0 0 0 8 8 8 color sphere
2 | /./ray/output raytrace
3 | stop
4 |
--------------------------------------------------------------------------------
/test/regexp.sml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/test/regexp.sml
--------------------------------------------------------------------------------
/test/regexp1.sml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/test/regexp1.sml
--------------------------------------------------------------------------------
/test/regexp2.sml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/test/regexp2.sml
--------------------------------------------------------------------------------
/test/repl/hello.sml:
--------------------------------------------------------------------------------
1 | structure Hello = struct
2 | val text = "hello"
3 | end
4 |
--------------------------------------------------------------------------------
/test/repl/load.cmd:
--------------------------------------------------------------------------------
1 | :load a.mlb;
2 | val x = Hello.text ^ " world";
3 | :quit;
4 |
--------------------------------------------------------------------------------
/test_dev/README:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/test_dev/README
--------------------------------------------------------------------------------
/test_dev/int_overflow.out.ok:
--------------------------------------------------------------------------------
1 | OK (+)
2 | OK (-)
3 | OK (*)
4 | OK (*)
5 | OK (~)
6 |
--------------------------------------------------------------------------------
/basis/Array.sml:
--------------------------------------------------------------------------------
1 | structure Array : ARRAY =
2 | PolyTable (type 'a table = 'a array)
3 |
--------------------------------------------------------------------------------
/basis/binarymap.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | BINARYMAP.sml
3 | Binarymap.sml
4 |
--------------------------------------------------------------------------------
/basis/md5.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 | in
4 | MD5.sml
5 | end
6 |
--------------------------------------------------------------------------------
/doc/manual/scan.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/scan.pdf
--------------------------------------------------------------------------------
/js/.gitignore:
--------------------------------------------------------------------------------
1 | favicon.ico
2 | smltojsonline
3 | smltojsonline.tgz
4 | smltojs.man.html
--------------------------------------------------------------------------------
/js/otests/sheep.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/js/otests/sheep.png
--------------------------------------------------------------------------------
/js/test/counter.mlb:
--------------------------------------------------------------------------------
1 | $SML_LIB/basis/basis.mlb
2 | $SML_LIB/basis/js.mlb
3 | counter.sml
--------------------------------------------------------------------------------
/js/test/export.sml:
--------------------------------------------------------------------------------
1 | fun myfun x = x + 1
2 |
3 | val () = _export("myfun", myfun)
4 |
--------------------------------------------------------------------------------
/kitdemo/onetwothree.sml:
--------------------------------------------------------------------------------
1 | let val l = [1, 2, 3];
2 | val (x::_) = l
3 | in x end;
4 |
--------------------------------------------------------------------------------
/src/CUtils/hashfun.h:
--------------------------------------------------------------------------------
1 |
2 |
3 | unsigned long charhashfunction (const char *key);
4 |
--------------------------------------------------------------------------------
/src/CUtils/hashmap_typed_test.out.ok:
--------------------------------------------------------------------------------
1 | Carsten : 8
2 | Martin : 3
3 | r = 0; v = 8
4 |
--------------------------------------------------------------------------------
/src/Common/KitDummy.sml:
--------------------------------------------------------------------------------
1 | functor KitDummy() = KitCompiler(ExecutionDummy(ExecutionArgs))
--------------------------------------------------------------------------------
/test/cmdline.sml.out.ok:
--------------------------------------------------------------------------------
1 | This program is invoked as `./runexe'
2 | with arguments:
3 |
--------------------------------------------------------------------------------
/test/constraint.sml.log.ok:
--------------------------------------------------------------------------------
1 |
2 |
3 | ********** constraint.sml *************
4 |
5 |
--------------------------------------------------------------------------------
/test/error1.mlb:
--------------------------------------------------------------------------------
1 | (* It is an error if a source file does not exist *)
2 | notexisting.sml
--------------------------------------------------------------------------------
/test/mlbtest/d2/d.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | d2.mlb
3 | ../A.sml
4 | b.sml
5 |
--------------------------------------------------------------------------------
/test/mlbtest/functor.mlb:
--------------------------------------------------------------------------------
1 | functor1.sml
2 | functor2.sml
3 | functor3.sml
4 | functor4.sml
--------------------------------------------------------------------------------
/test/mlbtest/sig.sig:
--------------------------------------------------------------------------------
1 | signature S =
2 | sig
3 | type t
4 | val a : t
5 | end
--------------------------------------------------------------------------------
/test/professor.sml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/test/professor.sml
--------------------------------------------------------------------------------
/test/server.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 | in server.sml
4 | end
5 |
--------------------------------------------------------------------------------
/test/tststrcmp.sml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/test/tststrcmp.sml
--------------------------------------------------------------------------------
/test_dev/foldl.out.ok:
--------------------------------------------------------------------------------
1 | Before fold
2 | Efter fold
3 | Num: 55
4 | Num: 55
5 | hej
6 |
--------------------------------------------------------------------------------
/doc/manual/life100.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/life100.pdf
--------------------------------------------------------------------------------
/doc/manual/life50.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/life50.pdf
--------------------------------------------------------------------------------
/doc/manual/msort.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/msort.pdf
--------------------------------------------------------------------------------
/js/appfun/dropbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/js/appfun/dropbox.png
--------------------------------------------------------------------------------
/js/basis/rwp.mlb:
--------------------------------------------------------------------------------
1 | local
2 | basis.mlb
3 | in
4 | js.mlb
5 | RWP.sig
6 | Rwp.sml
7 | end
--------------------------------------------------------------------------------
/js/basis/utest.mlb:
--------------------------------------------------------------------------------
1 | local $(SML_LIB)/basis/basis.mlb
2 | in utest.sig
3 | utest.sml
4 | end
--------------------------------------------------------------------------------
/js/test/plantgreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/js/test/plantgreen.png
--------------------------------------------------------------------------------
/js/test/tailrec2.html.out.ok:
--------------------------------------------------------------------------------
1 | Loading tailrec2.html
2 | x= 17156667
3 | y= 92
4 | OK
5 |
6 |
--------------------------------------------------------------------------------
/kitdemo/lambda3.sml:
--------------------------------------------------------------------------------
1 | fun map f [] = []
2 | | map f (x::xs) = f(x) :: map f xs
3 |
--------------------------------------------------------------------------------
/kitdemo/msort.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | msort.sml
3 | upto.sml
4 | msortrun.sml
5 |
--------------------------------------------------------------------------------
/kitdemo/msortreset1.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | upto.sml
3 | msortreset1.sml
4 |
5 |
--------------------------------------------------------------------------------
/kitdemo/msortreset2.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | upto.sml
3 | msortreset2.sml
4 |
5 |
--------------------------------------------------------------------------------
/kitdemo/scan_stream.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | lib_stream.sml
3 | scan_stream.sml
4 |
--------------------------------------------------------------------------------
/kitdemo/tststrcmp.sml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/kitdemo/tststrcmp.sml
--------------------------------------------------------------------------------
/kitlib/OrderSet.sml:
--------------------------------------------------------------------------------
1 | functor OrderSet(Order : ORDER) : MONO_SET =
2 | OrderSetImpl(Order)
--------------------------------------------------------------------------------
/src/Common/TYCON.sig:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/src/Common/TYCON.sig
--------------------------------------------------------------------------------
/src/Kitlib/RegExp.sml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/src/Kitlib/RegExp.sml
--------------------------------------------------------------------------------
/src/Runtime/Region.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/src/Runtime/Region.c
--------------------------------------------------------------------------------
/src/lib/github.com/diku-dk/sml-uref/test/.gitignore:
--------------------------------------------------------------------------------
1 | *.res
2 | *.exe
3 | *~
4 | *.out
5 | MLB
--------------------------------------------------------------------------------
/test/anoq_Exception.sml.log.ok:
--------------------------------------------------------------------------------
1 |
2 |
3 | ********** anoq_Exception.sml *************
4 |
5 |
--------------------------------------------------------------------------------
/test/barry/msort.out.ok:
--------------------------------------------------------------------------------
1 | Generating list of 100000 random ints...
2 | Sorting...
3 | Ok!
4 |
--------------------------------------------------------------------------------
/test/mlbtest/functor2.sml:
--------------------------------------------------------------------------------
1 | functor A() =
2 | struct
3 | val c = (b,"World")
4 | end
--------------------------------------------------------------------------------
/test/msort.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | msort.sml
3 | upto.sml
4 | msortrun.sml
5 |
--------------------------------------------------------------------------------
/test/nucleic/sources.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | nucleic.sml
3 | main.sml
4 |
5 |
--------------------------------------------------------------------------------
/test/opaque.sml.out.ok:
--------------------------------------------------------------------------------
1 | f.a = 232
2 | g.A = A
3 | g.B = B
4 | h.b = 343
5 | i.c = (A,C)
6 |
--------------------------------------------------------------------------------
/test/packreal2.sml.out.ok:
--------------------------------------------------------------------------------
1 | big: C0,A,48,27,B6,FE,2E,6F
2 | little: 6F,2E,FE,B6,27,48,A,C0
3 |
--------------------------------------------------------------------------------
/test/ratio-regions.sml.log.ok:
--------------------------------------------------------------------------------
1 |
2 |
3 | ********** ratio-regions.sml *************
4 |
5 |
--------------------------------------------------------------------------------
/test_dev/README_KAM.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/test_dev/README_KAM.md
--------------------------------------------------------------------------------
/test_dev/auto2.out.ok:
--------------------------------------------------------------------------------
1 | OK 1:0
2 | OK 1:2
3 | OK 1:23
4 | OK 2:0
5 | OK 2:12
6 | OK 2:123
7 |
--------------------------------------------------------------------------------
/test_dev/string_sub.out.ok:
--------------------------------------------------------------------------------
1 | First: Ok
2 | Seccond: Ok
3 | Last: Ok
4 | Second to last: Ok
5 |
--------------------------------------------------------------------------------
/doc/manual/life_ex2.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/life_ex2.pdf
--------------------------------------------------------------------------------
/doc/manual/life_ex3.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/life_ex3.pdf
--------------------------------------------------------------------------------
/doc/manual/life_ex4.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/life_ex4.pdf
--------------------------------------------------------------------------------
/doc/manual/prof_eks1.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/prof_eks1.pdf
--------------------------------------------------------------------------------
/doc/manual/prof_eks2.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/prof_eks2.pdf
--------------------------------------------------------------------------------
/doc/manual/prof_eks3.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/prof_eks3.pdf
--------------------------------------------------------------------------------
/doc/manual/prof_eks4.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/prof_eks4.pdf
--------------------------------------------------------------------------------
/js/appfun/nodropbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/js/appfun/nodropbox.png
--------------------------------------------------------------------------------
/js/basis/Array.sml:
--------------------------------------------------------------------------------
1 | structure Array : ARRAY =
2 | WordTable (type 'a table = 'a array)
3 |
4 |
--------------------------------------------------------------------------------
/js/test/dojo/trash32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/js/test/dojo/trash32.png
--------------------------------------------------------------------------------
/js/test/frp.mlb:
--------------------------------------------------------------------------------
1 | $SML_LIB/basis/basis.mlb
2 | $SML_LIB/basis/js.mlb
3 | frp2.sml
4 | frp_ex1.sml
--------------------------------------------------------------------------------
/js/test/tablechairs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/js/test/tablechairs.png
--------------------------------------------------------------------------------
/js/test/tlist.mlb:
--------------------------------------------------------------------------------
1 | $SML_LIB/basis/basis.mlb
2 | $SML_LIB/basis/js.mlb
3 | frp2.sml
4 | tlist.sml
--------------------------------------------------------------------------------
/js/test/xmlrpc_test1.mlb:
--------------------------------------------------------------------------------
1 | $SML_LIB/basis/basis.mlb
2 | $SML_LIB/basis/js.mlb
3 | xmlrpc_test1.sml
--------------------------------------------------------------------------------
/kitdemo/IntSet.sml:
--------------------------------------------------------------------------------
1 | structure IntSet1 : INT_SET = PolySet
2 | structure IntSet2 :> INT_SET = PolySet
--------------------------------------------------------------------------------
/kitdemo/PolySet.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | PolySet.sml
3 | INT_SET.sml
4 | IntSet.sml
5 |
--------------------------------------------------------------------------------
/kitdemo/tail2.sml:
--------------------------------------------------------------------------------
1 | fun g (n,b) = h (n-1) b
2 | and h 0 b = b
3 | | h n b = g(n,n*b)
4 |
--------------------------------------------------------------------------------
/kitlib/IntSet.sml:
--------------------------------------------------------------------------------
1 | structure IntSet :>
2 | MONO_SET where type elt = int
3 | = IntSetImpl
--------------------------------------------------------------------------------
/kitlib/NatSet.sml:
--------------------------------------------------------------------------------
1 | structure NatSet :>
2 | MONO_SET where type elt = word
3 | = NatSetImpl
--------------------------------------------------------------------------------
/src/Runtime/Posix.h:
--------------------------------------------------------------------------------
1 | struct syserr_entry
2 | {
3 | char *name;
4 | size_t number;
5 | };
6 |
--------------------------------------------------------------------------------
/src/Tools/MlbMake/Configuration.sml.in:
--------------------------------------------------------------------------------
1 | structure Configuration :> CONFIGURATION =
2 | struct
3 |
--------------------------------------------------------------------------------
/test/barry/fft.out.ok:
--------------------------------------------------------------------------------
1 | fft by Torben Mogensen (torbenm@diku.dk)
2 | fft'ing... done: 65536
3 |
--------------------------------------------------------------------------------
/test/barry/tststrcmp.sml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/test/barry/tststrcmp.sml
--------------------------------------------------------------------------------
/test/dynlink.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | $(SML_LIB)/basis/dynlink.mlb
3 | dynlink.sml
4 |
--------------------------------------------------------------------------------
/test/fft.sml.out.ok:
--------------------------------------------------------------------------------
1 |
2 | fft by Torben Mogensen (torbenm@diku.dk)
3 |
4 | fft'ing... done
5 |
--------------------------------------------------------------------------------
/test/kitmandelbrot.sml.out.ok:
--------------------------------------------------------------------------------
1 | 4194304 iterations
2 | 4194304 iterations
3 | 4194304 iterations
4 |
--------------------------------------------------------------------------------
/test/mlbtest/sig.sml:
--------------------------------------------------------------------------------
1 | structure S : S =
2 | struct
3 | type t = int
4 | val a = 5
5 | end
--------------------------------------------------------------------------------
/test/stream.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | stream.sig
3 | stream.sml
4 | streamtest.sml
5 |
--------------------------------------------------------------------------------
/test/valrecpat2.sml:
--------------------------------------------------------------------------------
1 | datatype t = f;
2 | val rec f = fn x => x
3 |
4 | val _ = print (f "OK\n")
--------------------------------------------------------------------------------
/test_dev/exception6.sml:
--------------------------------------------------------------------------------
1 |
2 | local
3 | in (* end of prelude *)
4 | val _ = raise Match
5 | end
--------------------------------------------------------------------------------
/test_dev/fft_no_basislib.out.ok:
--------------------------------------------------------------------------------
1 | Fft'ing...
2 | Num: 65536.00
3 | Num: -25785591.33
4 | Done
5 |
--------------------------------------------------------------------------------
/doc/manual/length_stack.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/length_stack.pdf
--------------------------------------------------------------------------------
/doc/manual/mlkit-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/mlkit-logo.png
--------------------------------------------------------------------------------
/doc/manual/msortregion.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/msortregion.pdf
--------------------------------------------------------------------------------
/doc/manual/msortreset2.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/msortreset2.pdf
--------------------------------------------------------------------------------
/doc/manual/msortstack.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/msortstack.pdf
--------------------------------------------------------------------------------
/doc/manual/scan_posix.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/scan_posix.pdf
--------------------------------------------------------------------------------
/doc/manual/scan_rev1_1.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/scan_rev1_1.pdf
--------------------------------------------------------------------------------
/doc/manual/scan_rev1_2.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/scan_rev1_2.pdf
--------------------------------------------------------------------------------
/doc/manual/scan_rev2_1.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/scan_rev2_1.pdf
--------------------------------------------------------------------------------
/doc/manual/scan_stream.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/scan_stream.pdf
--------------------------------------------------------------------------------
/js/doc/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Verdana", "sans-serif";
3 | font-size: 12px;
4 | }
--------------------------------------------------------------------------------
/js/smltojs_logo_color.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/js/smltojs_logo_color.png
--------------------------------------------------------------------------------
/js/smltojs_logo_no_text.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/js/smltojs_logo_no_text.png
--------------------------------------------------------------------------------
/kitdemo/lambda2.sml:
--------------------------------------------------------------------------------
1 | val y = apply (fn n => n+1) 5
2 | val z = apply (fn m => m) 9
3 |
--------------------------------------------------------------------------------
/kitdemo/utils/utils.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 | in
4 | ListUtils.sml
5 | end
6 |
--------------------------------------------------------------------------------
/src/Common/DEC_GRAMMAR.sml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/src/Common/DEC_GRAMMAR.sml
--------------------------------------------------------------------------------
/src/Common/DecGrammar.sml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/src/Common/DecGrammar.sml
--------------------------------------------------------------------------------
/src/Common/ORDER.sig:
--------------------------------------------------------------------------------
1 |
2 | signature ORDER = sig
3 | type t
4 | val lt : t * t -> bool
5 | end
6 |
--------------------------------------------------------------------------------
/src/Common/STATOBJECT.sml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/src/Common/STATOBJECT.sml
--------------------------------------------------------------------------------
/src/Tools/ml-lex/mllex.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/src/Tools/ml-lex/mllex.pdf
--------------------------------------------------------------------------------
/test/oh-no.sml.log.ok:
--------------------------------------------------------------------------------
1 |
2 |
3 | ********** oh-no.sml *************
4 |
5 | > val f : int -> unit
6 |
--------------------------------------------------------------------------------
/test_dev/exn4.out.ok:
--------------------------------------------------------------------------------
1 | Div
2 | Match
3 | Bind
4 | Overflow
5 | ThisIsAnException
6 | ***Success***
7 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | Makefile
2 | autom4te.cache
3 | bin
4 | lib
5 | config.log
6 | config.status
7 | configure
8 | *~
--------------------------------------------------------------------------------
/doc/manual/length_region.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/length_region.pdf
--------------------------------------------------------------------------------
/doc/manual/nlength_region.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/nlength_region.pdf
--------------------------------------------------------------------------------
/doc/manual/nlength_stack.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/nlength_stack.pdf
--------------------------------------------------------------------------------
/js/slides_diku_2007-11-27.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/js/slides_diku_2007-11-27.pdf
--------------------------------------------------------------------------------
/js/smltojs_logo_color160.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/js/smltojs_logo_color160.png
--------------------------------------------------------------------------------
/src/Compiler/Backend/JS/jsast.mlb:
--------------------------------------------------------------------------------
1 | local $(SML_LIB)/basis/basis.mlb
2 | in JS_AST.sml
3 | JsAst.sml
4 | end
--------------------------------------------------------------------------------
/src/Tools/ml-lex/.gitignore:
--------------------------------------------------------------------------------
1 | Makefile
2 | MLB
3 | mlkit-mllex
4 | mllex.aux
5 | mllex.log
6 | mllex.toc
7 |
--------------------------------------------------------------------------------
/test/weeks2.sml:
--------------------------------------------------------------------------------
1 |
2 | datatype t = K of t (* this one should not be accepted *)
3 | withtype t = int
4 |
--------------------------------------------------------------------------------
/test_dev/.gitignore:
--------------------------------------------------------------------------------
1 | *.exe
2 | *.out
3 | *.res
4 | MLB
5 | *.mlbres
6 | *.mlbexe
7 | *.mlbout
8 | complog.txt
--------------------------------------------------------------------------------
/doc/manual/scan_stream_nogc.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/scan_stream_nogc.pdf
--------------------------------------------------------------------------------
/js/slides_lunch_2007-09-17.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/js/slides_lunch_2007-09-17.pdf
--------------------------------------------------------------------------------
/kitdemo/select_second.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | (* select_second.o *)
3 | select_second.sml
4 |
5 |
--------------------------------------------------------------------------------
/kitlib/finmap.mlb:
--------------------------------------------------------------------------------
1 | local $(SML_LIB)/basis/basis.mlb
2 | finmap_impl.mlb
3 | in
4 | IntFinMapPT.sml
5 | end
--------------------------------------------------------------------------------
/src/.gitignore:
--------------------------------------------------------------------------------
1 | Makefile
2 | Version.sml
3 | config.h
4 | mlkit
5 | reml
6 | smltojs
7 | smlserverc
8 | MLB
9 | *~
--------------------------------------------------------------------------------
/src/Common/KitOnKit.sml:
--------------------------------------------------------------------------------
1 | structure K = KitX86()
2 | val _ = K.kitexe(CommandLine.name(),CommandLine.arguments())
--------------------------------------------------------------------------------
/src/Tools/MlbMake/CONFIGURATION.sig:
--------------------------------------------------------------------------------
1 | signature CONFIGURATION =
2 | sig
3 | val etcdir : string
4 | end
5 |
--------------------------------------------------------------------------------
/src/Tools/ml-yacc/.gitignore:
--------------------------------------------------------------------------------
1 | Makefile
2 | doc/mlyacc.aux
3 | doc/mlyacc.log
4 | doc/mlyacc.toc
5 | mlkit-mlyacc
--------------------------------------------------------------------------------
/src/Tools/ml-yacc/doc/mlyacc.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/src/Tools/ml-yacc/doc/mlyacc.pdf
--------------------------------------------------------------------------------
/src/Tools/ml-yacc/examples/fol/list.fol:
--------------------------------------------------------------------------------
1 | append(nil,K,K).
2 | append(cons(X,L),K,cons(X,M)) :- append(L,K,M).
3 |
--------------------------------------------------------------------------------
/src/sml.pkg:
--------------------------------------------------------------------------------
1 | require {
2 | github.com/diku-dk/sml-uref 0.0.1 #bfce9ac7ce2e98abf02036ee33d78cae105a1d70
3 | }
4 |
--------------------------------------------------------------------------------
/test/danwang/go.sml:
--------------------------------------------------------------------------------
1 | val _ = print "start\n";
2 | val _ = SObjCPS.eval 10 SObjCPS.Nil;
3 | val _ = print "stop\n";
--------------------------------------------------------------------------------
/test/fns.sml.out.ok:
--------------------------------------------------------------------------------
1 | Testing function applications, etc...
2 | test1 OK
3 | test2 OK
4 | test3 OK
5 |
--------------------------------------------------------------------------------
/test/logic/sources_mlton.cm:
--------------------------------------------------------------------------------
1 | Group is
2 | term.sml
3 | trail.sml
4 | unify.sml
5 | data.sml
6 | main.sml
7 |
8 |
--------------------------------------------------------------------------------
/test/oh-no.sml:
--------------------------------------------------------------------------------
1 | local
2 | exception S of int
3 | in
4 | fun f 0 : unit = raise S 1
5 | | f a = f a
6 |
7 | end
--------------------------------------------------------------------------------
/test/parallelism/spawn_simple.sml.out.ok:
--------------------------------------------------------------------------------
1 | Hi - 1
2 | Hi - 2
3 | Hi - 3
4 | Starting thread
5 | hi
6 | Done
7 |
--------------------------------------------------------------------------------
/test/ray/README:
--------------------------------------------------------------------------------
1 | Ray:
2 |
3 | Input: file input
4 | Output: file output - should match DATA/TEST
5 |
--------------------------------------------------------------------------------
/test/regexp1.mlb:
--------------------------------------------------------------------------------
1 | local $(SML_LIB)/basis/basis.mlb
2 | $(SML_LIB)/basis/kitlib.mlb
3 | in regexp1.sml
4 | end
--------------------------------------------------------------------------------
/test/regexp2.mlb:
--------------------------------------------------------------------------------
1 | local $(SML_LIB)/basis/basis.mlb
2 | $(SML_LIB)/basis/kitlib.mlb
3 | in regexp2.sml
4 | end
--------------------------------------------------------------------------------
/basis/listsort.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 | in
4 | LISTSORT.sml
5 | Listsort.sml
6 | end
7 |
--------------------------------------------------------------------------------
/js/appfun/smltojs_logo_no_text.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/js/appfun/smltojs_logo_no_text.png
--------------------------------------------------------------------------------
/js/basis/html.mlb:
--------------------------------------------------------------------------------
1 | local basis.mlb
2 | in ann safeLinkTimeElimination
3 | in HTML.sig Html.sml
4 | end
5 | end
--------------------------------------------------------------------------------
/kitdemo/Set.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | local utils/utils.mlb
3 | in SET.sig Set.sml SetApp.sml
4 | end
5 |
--------------------------------------------------------------------------------
/kitdemo/runmsort.sml:
--------------------------------------------------------------------------------
1 | val runmsort = msort(fromto(1, 50000))
2 |
3 | val result = output(std_out, "Really done\n");
--------------------------------------------------------------------------------
/kitdemo/select_second.sml:
--------------------------------------------------------------------------------
1 | fun second(pair : 'a * 'b) : 'b =
2 | prim("select_second", "select_second", pair)
3 |
--------------------------------------------------------------------------------
/kitlib/IntFinMapPT.sml:
--------------------------------------------------------------------------------
1 | structure IntFinMapPT :>
2 | MONO_FINMAP where type dom = int
3 | = IntFinMapPTImpl
--------------------------------------------------------------------------------
/src/Compiler/Lambda/CompileDec.sml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/src/Compiler/Lambda/CompileDec.sml
--------------------------------------------------------------------------------
/test/kittmergesort.sml.out.ok:
--------------------------------------------------------------------------------
1 |
2 | List generated
3 | Doing tmergesort...
4 | Sorted 100000
5 | numbers
6 |
7 |
--------------------------------------------------------------------------------
/test/listsort.mlb:
--------------------------------------------------------------------------------
1 | local $(SML_LIB)/basis/basis.mlb
2 | $(SML_LIB)/basis/kitlib.mlb
3 | in listsort.sml
4 | end
--------------------------------------------------------------------------------
/test/listsort.mlb.out.ok:
--------------------------------------------------------------------------------
1 |
2 | File listsort.sml: Testing structure Listsort...
3 | test1 OK
4 | test2 OK
5 |
--------------------------------------------------------------------------------
/test/logic/sources_smlnj.cm:
--------------------------------------------------------------------------------
1 | Group is
2 | term.sml
3 | trail.sml
4 | unify.sml
5 | data.sml
6 | main_smlnj.sml
7 |
8 |
--------------------------------------------------------------------------------
/test/mlbtest/B.sml:
--------------------------------------------------------------------------------
1 | val _ = case length ["Hello ", "World\n"] of
2 | 2 => print "OK"
3 | | _ => print "Error"
--------------------------------------------------------------------------------
/test/mlbtest/ab.mlb:
--------------------------------------------------------------------------------
1 | (* Initial allows for other modules to be discharged at link time *)
2 |
3 | A.sml
4 | B.sml
5 |
--------------------------------------------------------------------------------
/test/parallelism/spawn_simple4.sml.out.ok:
--------------------------------------------------------------------------------
1 | starting...
2 | Num: 17711
3 | Num: 28657
4 | Num: 46368
5 | goodbye.
6 |
--------------------------------------------------------------------------------
/test/parallelism/spawn_simple5.sml.out.ok:
--------------------------------------------------------------------------------
1 | starting...
2 | Num: 121392
3 | Num: 46368
4 | Num: 17710
5 | goodbye.
6 |
--------------------------------------------------------------------------------
/test/parallelism/spawn_simple6.sml.out.ok:
--------------------------------------------------------------------------------
1 | starting...
2 | Num: 5050
3 | Num: 75024
4 | Num: 20100
5 | goodbye.
6 |
--------------------------------------------------------------------------------
/test/perm1.sml:
--------------------------------------------------------------------------------
1 | fun composePartial (f, g) x =
2 | case g x of
3 | NONE => NONE
4 | | SOME y => f y
5 |
--------------------------------------------------------------------------------
/test/pickletest.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 | pickle.mlb
4 | in
5 | pickletest.sml
6 | end
7 |
--------------------------------------------------------------------------------
/test/valrecpat4.sml:
--------------------------------------------------------------------------------
1 | val rec (f as g as _) = fn x => x
2 |
3 | val _ = print (f "it ")
4 | val _ = print (g "works\n")
--------------------------------------------------------------------------------
/js/appfun/json.mlb:
--------------------------------------------------------------------------------
1 | local $(SML_LIB)/basis/basis.mlb
2 | string_map.sml
3 | in json.sig
4 | json.sml
5 | end
6 |
--------------------------------------------------------------------------------
/js/test/ntemp.mlb:
--------------------------------------------------------------------------------
1 | $SML_LIB/basis/basis.mlb
2 | $SML_LIB/basis/js.mlb
3 | HTML.sig
4 | Html.sml
5 | Web.sml
6 | ntemp.sml
--------------------------------------------------------------------------------
/js/test/rwp_ex1.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 | $(SML_LIB)/basis/rwp.mlb
4 | in
5 | rwp_ex1.sml
6 | end
--------------------------------------------------------------------------------
/js/test/rwp_ex2.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 | $(SML_LIB)/basis/rwp.mlb
4 | in
5 | rwp_ex2.sml
6 | end
--------------------------------------------------------------------------------
/js/test/rwp_ex3.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 | $(SML_LIB)/basis/rwp.mlb
4 | in
5 | rwp_ex3.sml
6 | end
--------------------------------------------------------------------------------
/js/test/tabs.mlb:
--------------------------------------------------------------------------------
1 |
2 | local
3 | $(SML_LIB)/basis/basis.mlb
4 | $(SML_LIB)/basis/js.mlb
5 | in
6 | tabs.sml
7 | end
--------------------------------------------------------------------------------
/kitdemo/dangling.sml:
--------------------------------------------------------------------------------
1 | val f = let val x = ref (2, [1])
2 | in fn y => (#1 (!x), y)
3 | end
4 | val r = f 5
5 |
--------------------------------------------------------------------------------
/kitlib/finmap_impl.mlb:
--------------------------------------------------------------------------------
1 | local $(SML_LIB)/basis/basis.mlb
2 | in
3 | MONO_FINMAP.sml
4 | IntFinMapPTImpl.sml
5 | end
--------------------------------------------------------------------------------
/kitlib/kitprofile.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 | in
4 | kitprofile.sig
5 | kitprofile.sml
6 | end
7 |
--------------------------------------------------------------------------------
/src/Compiler/mlkit64.mlb:
--------------------------------------------------------------------------------
1 | local $(SML_LIB)/basis/basis.mlb
2 | native64.mlb
3 | in ../Common/KitX64.sml
4 | end
5 |
--------------------------------------------------------------------------------
/src/Compiler/reml64.mlb:
--------------------------------------------------------------------------------
1 | local $(SML_LIB)/basis/basis.mlb
2 | native64.mlb
3 | in ../Common/KitReML.sml
4 | end
5 |
--------------------------------------------------------------------------------
/src/lib/github.com/diku-dk/sml-uref/uref.mlb:
--------------------------------------------------------------------------------
1 | local $(SML_LIB)/basis/basis.mlb
2 | in uref.sig
3 | uref.sml
4 | end
5 |
--------------------------------------------------------------------------------
/test/anoq_Exception.sml:
--------------------------------------------------------------------------------
1 | exception Generic of string
2 | fun reRaise (Generic values) newValue = raise Generic "e"
3 |
4 |
--------------------------------------------------------------------------------
/test/danwang/sources.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | sobj-cps.sig
3 | sobj-cps.sml
4 | sprogs.sml
5 | go.sml
6 |
7 |
--------------------------------------------------------------------------------
/test/error4.mlb:
--------------------------------------------------------------------------------
1 | (* Cycles in mlb-files are not legal! Here is an immediate cycle. *)
2 |
3 | error4a.mlb
4 | error3.sml
--------------------------------------------------------------------------------
/test/explicit_regions/er18.sml:
--------------------------------------------------------------------------------
1 | (* Explicit regions cannot be annotated on empty record types *)
2 |
3 | type t = {}`r0
4 |
--------------------------------------------------------------------------------
/test/fork.sml:
--------------------------------------------------------------------------------
1 | val _ = case Posix.Process.fork() of
2 | SOME i => print "In Parrent\n"
3 | | NONE => print "In Child\n"
--------------------------------------------------------------------------------
/test/mlbtest/functor3.sml:
--------------------------------------------------------------------------------
1 | functor B() =
2 | struct
3 | structure A = A()
4 | val d = (A.c,"Today")
5 | end
6 |
--------------------------------------------------------------------------------
/basis/Word16.sml:
--------------------------------------------------------------------------------
1 |
2 | (** SigDoc *)
3 |
4 | structure Word16 : WORD =
5 | WordN(struct open Word val wordSize = 16 end)
6 |
--------------------------------------------------------------------------------
/js/appfun/smltojs_logo_no_text64x64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/js/appfun/smltojs_logo_no_text64x64.png
--------------------------------------------------------------------------------
/js/test/canvas_ex1.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 | $(SML_LIB)/basis/js.mlb
4 | in
5 | canvas_ex1.sml
6 | end
--------------------------------------------------------------------------------
/js/test/packreal2.html.out.ok:
--------------------------------------------------------------------------------
1 | Loading packreal2.html
2 | big: C0,A,48,27,B6,FE,2E,6F
3 | little: 6F,2E,FE,B6,27,48,A,C0
4 |
5 |
--------------------------------------------------------------------------------
/js/test/tdom_ex1.mlb:
--------------------------------------------------------------------------------
1 | $SML_LIB/basis/basis.mlb
2 | $SML_LIB/basis/js.mlb
3 | frp2.sml
4 | TDOM.sig
5 | TDom.sml
6 | tdom_ex1.sml
--------------------------------------------------------------------------------
/kitdemo/append.sml:
--------------------------------------------------------------------------------
1 | infixr 5 @
2 | fun [] @ ys = ys
3 | | (x::xs) @ ys = x :: (xs @ ys)
4 | val l = [1] @ [2,3]
5 |
--------------------------------------------------------------------------------
/kitdemo/msortrun.sml:
--------------------------------------------------------------------------------
1 |
2 | val runmsort = msort(upto(200000))
3 |
4 | val result = print "Really done\n";
5 |
--------------------------------------------------------------------------------
/src/Tools/MlbMake/configuration.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 | in CONFIGURATION.sig Configuration.sml
4 | end
--------------------------------------------------------------------------------
/src/Tools/Rp2ps/Error.h:
--------------------------------------------------------------------------------
1 | #ifndef ERROR
2 | #define ERROR
3 |
4 | void Disaster(char* format);
5 |
6 | #endif /* ERROR */
7 |
--------------------------------------------------------------------------------
/src/Tools/SigDoc/lib/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif";
3 | }
--------------------------------------------------------------------------------
/src/Tools/SigDoc/sigdoc.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $SML_LIB/basis/basis.mlb
3 | ../../../basis/kitlib.mlb
4 | in
5 | main.sml
6 | end
7 |
--------------------------------------------------------------------------------
/src/Tools/ml-lex/ml-lex.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 | in
4 | lexgen.sml
5 | ml-lex-mlkit.sml
6 | end
7 |
--------------------------------------------------------------------------------
/test/logic/sources.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | term.sml
3 | trail.sml
4 | unify.sml
5 | data.sml
6 | main.sml
7 |
8 |
--------------------------------------------------------------------------------
/test/msortrun.sml:
--------------------------------------------------------------------------------
1 |
2 | val runmsort = msort(upto(50000))
3 |
4 | val result = print "Really done\n";
5 |
--------------------------------------------------------------------------------
/test/repl/chdir.cmd:
--------------------------------------------------------------------------------
1 | val a = Int.toString ~23
2 | val () = OS.FileSys.chDir ".."
3 | val b = a ^ " - " ^ Real.toString 34.0
4 |
--------------------------------------------------------------------------------
/test_dev/kittmergesort_no_basislib.out.ok:
--------------------------------------------------------------------------------
1 |
2 | List generated
3 | Doing tmergesort...
4 | Sorted 25000
5 | numbers
6 |
7 |
--------------------------------------------------------------------------------
/test_dev/raise_maybe.sml:
--------------------------------------------------------------------------------
1 | val r = ref 5
2 | val () =
3 | case r of
4 | ref 4 => raise Div
5 | | _ => ()
6 |
--------------------------------------------------------------------------------
/test_dev/real1.out.ok:
--------------------------------------------------------------------------------
1 | Num: 1.00
2 | Num: 2.00
3 | Num: 3.00
4 | Num: 4.00
5 | Num: 3.00
6 | Num: 0.90
7 | Num: 1.00
8 |
--------------------------------------------------------------------------------
/basis/real64_blocks.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 | REAL64_BLOCK_BASE.sml
4 | in
5 | Real64Blocks.sml
6 | end
7 |
--------------------------------------------------------------------------------
/doc/manual/mlkit_compiling_kitkbjul9.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/mlkit_compiling_kitkbjul9.pdf
--------------------------------------------------------------------------------
/js/appfun/oauth.mlb:
--------------------------------------------------------------------------------
1 | local $(SML_LIB)/basis/basis.mlb
2 | $(SML_LIB)/basis/js.mlb
3 | in oauth.sig
4 | oauth.sml
5 | end
6 |
--------------------------------------------------------------------------------
/js/appfun/smltojs_logo_no_text256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/js/appfun/smltojs_logo_no_text256x256.png
--------------------------------------------------------------------------------
/kitdemo/expdec.sml:
--------------------------------------------------------------------------------
1 | datatype exp = LET of dec * exp | ADD of exp * exp | INT of int
2 | and dec = VALBIND of string * exp
3 |
--------------------------------------------------------------------------------
/src/Common/PreElabTopdecGrammar.sml:
--------------------------------------------------------------------------------
1 | structure PreElabTopdecGrammar : TOPDEC_GRAMMAR =
2 | TopdecGrammar(PreElabDecGrammar)
3 |
--------------------------------------------------------------------------------
/src/Tools/MlbMake/ENVIRONMENT.sig:
--------------------------------------------------------------------------------
1 | signature ENVIRONMENT =
2 | sig
3 | val getEnvVal : string -> string option
4 | end
5 |
--------------------------------------------------------------------------------
/src/Tools/MlbMake/sources.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | environment.mlb
3 | mlbmake.mlb
4 | MlbStandAlone.sml
5 | MLKit.sml
6 |
--------------------------------------------------------------------------------
/test/parallelism/cores.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 | $(SML_LIB)/basis/par.mlb
4 | in
5 | cores.sml
6 | end
7 |
--------------------------------------------------------------------------------
/test/parallelism/spawn_simple3.sml.out.ok:
--------------------------------------------------------------------------------
1 | Fib(23) by created thread:
2 | Num: 46368
3 | Fib(23) by main thread:
4 | Num: 46368
5 |
--------------------------------------------------------------------------------
/test/ray/sources.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | objects.sml
3 | ray.sml
4 | interp.sml
5 | interface.sml
6 | main.sml
7 |
8 |
--------------------------------------------------------------------------------
/test_dev/a1.sml:
--------------------------------------------------------------------------------
1 | fun print (s:string) : unit = prim("printStringML", s)
2 | local
3 | val _ = print "Hello "
4 | in
5 |
6 | end
7 |
--------------------------------------------------------------------------------
/test_dev/string_upd.out.ok:
--------------------------------------------------------------------------------
1 | String - 0: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
2 | String - 1: 'aaaaaXaaaaaaaaaaaaaaaaaaaaaaaaaaa'
3 |
--------------------------------------------------------------------------------
/basis/par-seq.mlb:
--------------------------------------------------------------------------------
1 | local
2 | basis.mlb
3 | in
4 | THREAD.sig
5 | ThreadSeq.sml
6 | FORK_JOIN.sig
7 | ForkJoinSeq.sml
8 | end
9 |
--------------------------------------------------------------------------------
/js/basis/dojo.mlb:
--------------------------------------------------------------------------------
1 | local
2 | basis.mlb
3 | js.mlb
4 | in
5 | dojo.sig
6 | dojo.sml
7 | formlets.sig
8 | formlets.sml
9 | end
--------------------------------------------------------------------------------
/js/test/dojo/.gitignore:
--------------------------------------------------------------------------------
1 | basis
2 | dgrid
3 | dijit
4 | dojo
5 | dojox
6 | dstore
7 | prims.js
8 | put-selector
9 | xstyle
10 |
--------------------------------------------------------------------------------
/kitdemo/apply.sml:
--------------------------------------------------------------------------------
1 | fun apply f x = f x
2 | val y = apply (fn n => n + 1.0) 5.0
3 | val z = apply (fn m => m) 6
4 |
--------------------------------------------------------------------------------
/kitdemo/expdec2.sml:
--------------------------------------------------------------------------------
1 | datatype exp = LET of dec * exp | ADD of exp * exp | INT of {value:int}
2 | and dec = VALBIND of string * exp
3 |
--------------------------------------------------------------------------------
/kitdemo/select_second.c:
--------------------------------------------------------------------------------
1 | #include "../src/Runtime/Tagging.h"
2 |
3 | int select_second(int pair) {
4 | return second(pair);
5 | }
6 |
--------------------------------------------------------------------------------
/man/man1/.gitignore:
--------------------------------------------------------------------------------
1 | kittester.1
2 | smlserverc.1
3 | mlkit-mllex.1
4 | mlkit-mlyacc.1
5 | smltojs.1
6 | mlkit.1
7 | reml.1
8 | rp2ps.1
9 |
--------------------------------------------------------------------------------
/test/auto2.sml.out.ok:
--------------------------------------------------------------------------------
1 | ok
2 | ok
3 | ok
4 | ok
5 | ok
6 | ok
7 | ok
8 | ok
9 | ok - array
10 | ok - array
11 | ok - array
12 |
--------------------------------------------------------------------------------
/test/error3.mlb:
--------------------------------------------------------------------------------
1 | (* The same physical source file may be referenced
2 | * by at most one mlb-file *)
3 |
4 | error3a.mlb
5 | error3.sml
--------------------------------------------------------------------------------
/test/regexp.sml.out.ok:
--------------------------------------------------------------------------------
1 | Testing RegExp...
2 | test1a OK
3 | test2a OK
4 | test2b OK
5 | test3a OK
6 | test3b OK
7 |
--------------------------------------------------------------------------------
/test/regexp1.mlb.out.ok:
--------------------------------------------------------------------------------
1 | Testing RegExp...
2 | test1a OK
3 | test2a OK
4 | test2b OK
5 | test3a OK
6 | test3b OK
7 |
--------------------------------------------------------------------------------
/test/repl/chdir.out.ok:
--------------------------------------------------------------------------------
1 | . . . . > val a = "~23" : string
2 | val b = "~23 - 34.0" : string
3 | Parse error - no input!
4 | Exiting
5 |
--------------------------------------------------------------------------------
/test/repl/load.out.ok:
--------------------------------------------------------------------------------
1 | . > structure Hello :
2 | sig
3 | val text : string
4 | end
5 | . > val x = "hello world" : string
6 |
--------------------------------------------------------------------------------
/test_dev/a2.sml:
--------------------------------------------------------------------------------
1 | local
2 | val _ = print "world\n"
3 | val a = "This is also a string\n"
4 | val _ = print a
5 | in
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/js/doc/images/ui-bg_flat_75_ffffff_40x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/js/doc/images/ui-bg_flat_75_ffffff_40x100.png
--------------------------------------------------------------------------------
/js/test/dojo-flat/.gitignore:
--------------------------------------------------------------------------------
1 | basis
2 | dgrid
3 | dijit
4 | dojo
5 | dojox
6 | dstore
7 | prims.js
8 | put-selector
9 | xstyle
10 |
--------------------------------------------------------------------------------
/kitdemo/fold1.sml:
--------------------------------------------------------------------------------
1 | fun foldl f b xs =
2 | case xs of
3 | [] => b
4 | | x::xs' => foldl f (f x b) xs'
5 |
--------------------------------------------------------------------------------
/kitdemo/map.sml:
--------------------------------------------------------------------------------
1 | fun map f [] = []
2 | | map f (x::xs) = f(x) :: map f xs
3 |
4 | val x = map (fn x => x+1) [7,11]
5 |
--------------------------------------------------------------------------------
/kitlib/set.mlb:
--------------------------------------------------------------------------------
1 | local $(SML_LIB)/basis/basis.mlb
2 | set_impl.mlb
3 | in
4 | IntSet.sml
5 | NatSet.sml
6 | OrderSet.sml
7 | end
--------------------------------------------------------------------------------
/src/Common/EfficientElab/ModuleStatObject.sml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/src/Common/EfficientElab/ModuleStatObject.sml
--------------------------------------------------------------------------------
/src/Common/StringSet.sml:
--------------------------------------------------------------------------------
1 |
2 | structure StringSet : KIT_MONO_SET =
3 | OrderSet (struct type t = string val lt : t*t -> bool = op < end)
4 |
--------------------------------------------------------------------------------
/src/lib/github.com/diku-dk/sml-uref/test/test_uref.mlb:
--------------------------------------------------------------------------------
1 | local $(SML_LIB)/basis/basis.mlb
2 | ../uref.mlb
3 | in test_uref.sml
4 | end
5 |
--------------------------------------------------------------------------------
/test/lex.sml:
--------------------------------------------------------------------------------
1 |
2 | fun token0(tokFn) = tokFn
3 |
4 | and token1(tokFn, value) = tokFn(value)
5 |
6 | val a = token1(fn _ => "1", 2)
7 |
--------------------------------------------------------------------------------
/test/packreal3.sml.out.ok:
--------------------------------------------------------------------------------
1 | Testing PackRealBig
2 | OK
3 | OK
4 | OK
5 | OK
6 | Testing PackRealLittle
7 | OK
8 | OK
9 | OK
10 | OK
11 |
--------------------------------------------------------------------------------
/test/timer.sml.out.ok:
--------------------------------------------------------------------------------
1 |
2 | File timer.sml: Testing structure Timer...
3 | test1 OK
4 | test2 OK
5 | test3 OK
6 | test4 OK
7 |
--------------------------------------------------------------------------------
/test_dev/app1.sml:
--------------------------------------------------------------------------------
1 | infix :: +
2 |
3 | fun print (s:string) : unit = prim("printStringML", "printStringML", s)
4 |
5 | fun app f x = f x
6 |
--------------------------------------------------------------------------------
/test_dev/global_region.sml:
--------------------------------------------------------------------------------
1 |
2 | val p = (1,2)
3 | fun f (a,b,c,d,e,f,g,h,i,j) = if true then p else (2,3)
4 | val k = f(0,1,2,3,4,5,6,7,8,9)
--------------------------------------------------------------------------------
/test_dev/scratchmem.out.ok:
--------------------------------------------------------------------------------
1 | pack:
2 | Expect 4.3: Num: 4.30
3 | alloc:
4 | Expect 4.3: Num: 4.30
5 | scratch4:
6 | Expect 4.3: Num: 4.30
7 |
--------------------------------------------------------------------------------
/doc/manual/mlkit_compiling_kitkbjul9_400msec.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/doc/manual/mlkit_compiling_kitkbjul9_400msec.pdf
--------------------------------------------------------------------------------
/src/Tools/Tester/info.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 | in
4 | INFO.sig
5 | local LinuxInfo.sml
6 | in Info.sml
7 | end
8 | end
--------------------------------------------------------------------------------
/test/elabDecBug.sml:
--------------------------------------------------------------------------------
1 | type pair = {x : int, y : int}
2 | fun f ([]:pair list) = "Hi There"
3 | and f (xs as x::_ : pair list) = "Hi There again"
4 |
--------------------------------------------------------------------------------
/test/explicit_regions/server.sml.out.ok:
--------------------------------------------------------------------------------
1 | Starting mock server
2 | Response sent to client: Hello, this is a chat message.
3 | Server stopped
4 |
--------------------------------------------------------------------------------
/test/valrecpat3.sml:
--------------------------------------------------------------------------------
1 | val a = "OK\n"
2 | val a = "ERROR\n"
3 | and rec f = fn x => g x
4 | and g = fn y => (a, y)
5 |
6 | val _ = print (#1(f 23))
--------------------------------------------------------------------------------
/test/weeks.sml:
--------------------------------------------------------------------------------
1 | functor F(structure S: sig type 'a t end) =
2 | struct
3 | datatype t = T of u S.t
4 | withtype u = int
5 | end
6 |
--------------------------------------------------------------------------------
/test_dev/single.out.ok:
--------------------------------------------------------------------------------
1 | one hundred
2 | thirty
3 | one thousand
4 | one
5 | zero
6 | fifty
7 | other
8 | two
9 | Eq OK
10 | Num: 1255
11 |
--------------------------------------------------------------------------------
/basis/Ints.sml:
--------------------------------------------------------------------------------
1 | structure Int8 = IntN(struct open Int val precision=SOME 8 end)
2 | structure Int16 = IntN(struct open Int val precision=SOME 16 end)
3 |
--------------------------------------------------------------------------------
/basis/Makefile:
--------------------------------------------------------------------------------
1 | clean:
2 | rm -rf MLB run *~ *.vcg *.log
3 | rm -rf web/MLB web/*~ web/*.vcg web/*.log
4 | rm -rf io/MLB io/*~ io/*.vcg io/*.log
5 |
--------------------------------------------------------------------------------
/kitlib/pp.mlb:
--------------------------------------------------------------------------------
1 | local $(SML_LIB)/basis/basis.mlb
2 | in
3 | CRASH.sig Crash.sml
4 | REPORT.sig Report.sml
5 | PRETTYPRINT.sig PrettyPrint.sml
6 | end
--------------------------------------------------------------------------------
/src/Tools/ml-yacc/src/README:
--------------------------------------------------------------------------------
1 | These are the sources for the parser-generator part of ML-Yacc.
2 | The file FILES explains what each file contains.
3 |
--------------------------------------------------------------------------------
/test/pat.sml:
--------------------------------------------------------------------------------
1 |
2 | val (f, hd::tail) = (fn x => x, [fn y => (y,y)])
3 |
4 | val (s,_) = f (hd "hello world\n")
5 |
6 | val _ = print (s)
7 |
8 |
9 |
--------------------------------------------------------------------------------
/test_dev/div.sml:
--------------------------------------------------------------------------------
1 | infix div
2 | fun printNum (i:int) : unit = prim("printNum", "printNum", i)
3 |
4 | val a = 5232 div 3
5 |
6 | val _ = printNum a
7 |
--------------------------------------------------------------------------------
/test_dev/div0.sml:
--------------------------------------------------------------------------------
1 | infix div
2 | fun printNum (i:int) : unit = prim("printNum", "printNum", i)
3 |
4 | val a = 5232 div 0
5 |
6 | val _ = printNum a
7 |
--------------------------------------------------------------------------------
/test_dev/f1.out.ok:
--------------------------------------------------------------------------------
1 | Num: 10
2 | Num: 9
3 | Num: 8
4 | Num: 7
5 | Num: 6
6 | Num: 5
7 | Num: 4
8 | Num: 3
9 | Num: 2
10 | Num: 1
11 | Num: 42
12 |
--------------------------------------------------------------------------------
/test_dev/real_cmp.out.ok:
--------------------------------------------------------------------------------
1 | Num: 1.00
2 | Num: 0.80
3 | OK:gt
4 | OK:gt2
5 | OK:lt
6 | OK:lt2
7 | OK:lte
8 | OK:lte2
9 | OK:gte
10 | OK:gte2
11 |
--------------------------------------------------------------------------------
/js/basis/Control.sml:
--------------------------------------------------------------------------------
1 | structure Control : CONTROL = struct
2 | val printer_set = Initial.printer_set
3 | val printer_get = Initial.printer_get
4 | end
5 |
--------------------------------------------------------------------------------
/js/codemirror/sml/codemirror.mlb:
--------------------------------------------------------------------------------
1 |
2 | local
3 | $SML_LIB/basis/basis.mlb
4 | $SML_LIB/basis/js.mlb
5 | in
6 | codemirror.sig
7 | codemirror.sml
8 | end
9 |
--------------------------------------------------------------------------------
/js/test/appfuntest/smltojs_logo_transparent_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melsman/mlkit/HEAD/js/test/appfuntest/smltojs_logo_transparent_small.png
--------------------------------------------------------------------------------
/kitlib/set_impl.mlb:
--------------------------------------------------------------------------------
1 | local $(SML_LIB)/basis/basis.mlb
2 | in
3 | MONO_SET.sml
4 | IntSetImpl.sml
5 | NatSetImpl.sml
6 | OrderSetImpl.sml
7 | end
--------------------------------------------------------------------------------
/src/Common/StringFinMap.sml:
--------------------------------------------------------------------------------
1 | structure StringFinMap = OrderFinMap(struct type t = string
2 | fun lt (s1, s2:string) = s1 < s2
3 | end)
4 |
--------------------------------------------------------------------------------
/test/error2.mlb:
--------------------------------------------------------------------------------
1 | (* multible occurrences of a source file in the
2 | * same mlb-file is not allowed *)
3 |
4 | error2.sml
5 | error2b.sml
6 | error2.sml
7 |
--------------------------------------------------------------------------------
/test/explicit_regions/call.sml:
--------------------------------------------------------------------------------
1 | infix +
2 | fun f `[r] () : real = 4.3`r
3 |
4 | fun g () =
5 | let with r2
6 | in 0.0 + f `[r2] ()
7 | end
8 |
--------------------------------------------------------------------------------
/test/mlbtest/char.sml:
--------------------------------------------------------------------------------
1 | structure S :> sig type t end =
2 | struct
3 | datatype s = S of char
4 | datatype t = T of s
5 | end
6 |
7 | open S
--------------------------------------------------------------------------------
/basis/io/bin-stream-io.sig:
--------------------------------------------------------------------------------
1 | signature BIN_STREAM_IO =
2 | STREAM_IO
3 | where type elem = Word8Vector.elem
4 | where type vector = Word8Vector.vector
5 |
--------------------------------------------------------------------------------
/js/test/appfuntest/appfuntest.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 | $(SML_LIB)/basis/js.mlb
4 | ../../appfun/appfun2.mlb
5 | in
6 | appfuntest.sml
7 | end
--------------------------------------------------------------------------------
/kitlib/kitprofile.sig:
--------------------------------------------------------------------------------
1 | signature KIT_PROFILE =
2 | sig
3 | val tellTime: string -> unit (* tellTime(msg) stores msg for printing at next profile tick *)
4 | end
--------------------------------------------------------------------------------
/test/globalbotrho.sml:
--------------------------------------------------------------------------------
1 | fun go () a : ('a -> 'b) * ('a -> unit) =
2 | let val b = ref 7
3 | in
4 | (fn a => raise Match,
5 | fn a => ())
6 | end
--------------------------------------------------------------------------------
/test_dev/r.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | double a = 1.8;
4 |
5 | int main() {
6 | double b = 0 - a;
7 | printf("%f\n", b);
8 | return 0;
9 | }
10 |
--------------------------------------------------------------------------------
/js/appfun/appfun.mlb:
--------------------------------------------------------------------------------
1 | local $(SML_LIB)/basis/basis.mlb
2 | $(SML_LIB)/basis/js.mlb
3 | $(SML_LIB)/codemirror/sml/codemirror.mlb
4 | in AppFun.sml
5 | end
6 |
--------------------------------------------------------------------------------
/kitdemo/fold4.sml:
--------------------------------------------------------------------------------
1 | local
2 | fun foldl f e [] = e
3 | | foldl f e (x::xs) = foldl f (f(x,e)) xs
4 | in
5 | val a = foldl (op +) 0 [0,1,2]
6 | end
7 |
--------------------------------------------------------------------------------
/kitdemo/refs2.sml:
--------------------------------------------------------------------------------
1 | local
2 | val r = ref ([]:string list)
3 | in
4 | fun memo_id x = (r:= x:: !r; x)
5 | end
6 | val y = memo_id "abc"
7 | val z = memo_id "efg";
8 |
--------------------------------------------------------------------------------
/src/Pickle/test/test_pickle.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 | ../../../basis/test/test.mlb
4 | ../pickle.mlb
5 | in
6 | test_pickle.sml
7 | end
--------------------------------------------------------------------------------
/test/explicit_regions/err_expty1.sml:
--------------------------------------------------------------------------------
1 | (* The global region variable of type T cannot be associated with a pair type *)
2 |
3 | val a = (4,6) : (int * int)`r0top
4 |
--------------------------------------------------------------------------------
/test/kitfib35.sml:
--------------------------------------------------------------------------------
1 | (*kitfib35.sml*)
2 |
3 | let
4 | infix + - <
5 | fun fib n = if n < 1 then 1 else fib (n-1) + fib (n-2)
6 | in
7 | fib 35; ()
8 | end
9 |
--------------------------------------------------------------------------------
/js/test/dojo/dojo_test.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 | $(SML_LIB)/basis/js.mlb
4 | $(SML_LIB)/basis/dojo.mlb
5 | notify.sml
6 | in dojo_test.sml
7 | end
--------------------------------------------------------------------------------
/js/test/dojo/formlets_test.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 | $(SML_LIB)/basis/js.mlb
4 | $(SML_LIB)/basis/dojo.mlb
5 | in
6 | formlets_test.sml
7 | end
--------------------------------------------------------------------------------
/test/barry/fib35.sml:
--------------------------------------------------------------------------------
1 | (*kitfib35.sml*)
2 |
3 | let
4 | fun fib n = if n < 1 then 1 else fib (n-1) + fib (n-2)
5 | in
6 | print (Int.toString (fib 35) ^ "\n")
7 | end
8 |
--------------------------------------------------------------------------------
/test/kitmolgard.sml.out.ok:
--------------------------------------------------------------------------------
1 | init_stateSim.createCreating instances...
2 | Initializing markings...
3 | Iter: 0
4 | Iter: 1
5 | Iter: 2
6 | Iter: 3
7 | Iter: 4
8 | Iter: 5
9 |
--------------------------------------------------------------------------------
/js/basis/String2.sml:
--------------------------------------------------------------------------------
1 |
2 | structure String : STRING
3 | where type char = char
4 | and type string = string
5 | = String
6 |
7 | structure Char : CHAR = Char
8 |
--------------------------------------------------------------------------------
/js/test/dojo-flat/dojo_test.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 | $(SML_LIB)/basis/js.mlb
4 | $(SML_LIB)/basis/dojo.mlb
5 | notify.sml
6 | in dojo_test.sml
7 | end
--------------------------------------------------------------------------------
/kitdemo/escape.sml:
--------------------------------------------------------------------------------
1 | fun g () =
2 | let val x = [5,7]
3 | fun f y = (if y>3 then x@x else x;
4 | 5)
5 | in
6 | f 1; f 4
7 | end
8 |
--------------------------------------------------------------------------------
/kitdemo/escape2.sml:
--------------------------------------------------------------------------------
1 | fun g () =
2 | let fun f (x,y) = (if y>3 then x@x else x; 5)
3 | in let val x = [5,7]
4 | in f(x, 1); f(x, 4)
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/kitdemo/fromto.sml:
--------------------------------------------------------------------------------
1 | fun fromto(a, b) = if a>b then []
2 | else a :: fromto(a+1, b)
3 | val l = #1(fromto(1,10), fromto(100,110))
4 |
5 |
--------------------------------------------------------------------------------
/src/Tools/MlbMake/MLKit.sml:
--------------------------------------------------------------------------------
1 | local structure M = MlbStandAlone()
2 | in
3 | val _ = OS.Process.exit
4 | (M.mlbmake(M.cmdName(),
5 | CommandLine.arguments()))
6 | end
--------------------------------------------------------------------------------
/src/Tools/Rp2ps/PostScript.h:
--------------------------------------------------------------------------------
1 | #ifndef _POSTSCRIPT_H
2 | #define _POSTSCRIPT_H
3 |
4 | #include "Output.h"
5 |
6 | extern Format PsOutput;
7 |
8 | #endif /* _POSTSCRIPT_H */
9 |
--------------------------------------------------------------------------------
/test/explicit_regions/err_expty2.sml:
--------------------------------------------------------------------------------
1 | (* The global region variable of type pair cannot be associated with a function type *)
2 |
3 | val f : (int -> int)`r0pair = fn x => 4
4 |
--------------------------------------------------------------------------------
/test_dev/exn5.sml:
--------------------------------------------------------------------------------
1 |
2 | local
3 | val a = 5
4 |
5 | val _ = ceil 1E23 handle _ => 34
6 |
7 | fun f b = a + b
8 | in
9 | val _ = print (Int.toString (f 8))
10 | end
--------------------------------------------------------------------------------
/test_dev/explode.sml:
--------------------------------------------------------------------------------
1 | infix <
2 |
3 | fun print (s:string) : unit = prim("printStringML", "printStringML", s)
4 | val _ = if ~1 < 0 then print "OK"
5 | else print "ERROR"
6 |
--------------------------------------------------------------------------------
/basis/dynlink.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 |
4 | basis Dynlib = (* Dynamic linking support *)
5 | bas DYNLIB.sig Dynlib.sml end
6 | in open Dynlib
7 | end
8 |
--------------------------------------------------------------------------------
/basis/par.mlb:
--------------------------------------------------------------------------------
1 | local
2 | basis.mlb
3 | in
4 | THREAD.sig
5 | ThreadSeq.sml
6 | Thread.sml
7 | FORK_JOIN.sig
8 | ForkJoinSeq.sml
9 | ForkJoin.sml
10 | end
11 |
--------------------------------------------------------------------------------
/js/test/packreal3.html.out.ok:
--------------------------------------------------------------------------------
1 | Loading packreal3.html
2 | Testing PackRealBig
3 | OK
4 | OK
5 | OK
6 | OK
7 | Testing PackRealLittle
8 | OK
9 | OK
10 | OK
11 | OK
12 |
13 |
--------------------------------------------------------------------------------
/js/test/philip.sml:
--------------------------------------------------------------------------------
1 | fun bar x =
2 | fn x => ()
3 |
4 | fun foo () =
5 | (bar (Real.fromString "4.0"); ())
6 |
7 | val () = foo ()
8 |
9 | val () = print "ok\n"
10 |
--------------------------------------------------------------------------------
/kitdemo/tail.sml:
--------------------------------------------------------------------------------
1 | local
2 | fun f'(p as (0,b)) = p
3 | | f'(n,b) = f'(n-1,n*b)
4 | in
5 | fun f(a,b) = #2(f'(a,b))
6 | end;
7 |
8 |
--------------------------------------------------------------------------------
/src/Tools/MlbMake/environment.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 | ../../Common/tools.mlb
4 | in
5 | configuration.mlb
6 | ENVIRONMENT.sig Environment.sml
7 | end
8 |
--------------------------------------------------------------------------------
/test/explicit_regions/tup.sml:
--------------------------------------------------------------------------------
1 | (* Tuples can be allocated in explicit regions *)
2 | fun f () : int =
3 | let with r
4 | val x = (3,5)`r
5 | in #1 x
6 | end
7 |
--------------------------------------------------------------------------------
/test/export.sml:
--------------------------------------------------------------------------------
1 | val a = ref 34
2 | fun incr (x:int) = x + !a before a:=2
3 |
4 | val _ = _export ("incr", incr)
5 |
6 | (* Call to do work in C *)
7 | val _ = (prim("work",()):unit)
--------------------------------------------------------------------------------
/test/ftv.sml:
--------------------------------------------------------------------------------
1 | fun g h v = h v
2 |
3 | functor F() : sig end =
4 | struct
5 | val z = g (fn _ => ())
6 | end
7 |
8 | structure S1 = F()
9 |
10 | structure S2 = F();
--------------------------------------------------------------------------------
/test/seltuptup.sml:
--------------------------------------------------------------------------------
1 |
2 |
3 | fun f () : int * int * int =
4 | #1((1,2,3),4)
5 | handle X => raise X
6 |
7 | val () = print (if f() = (1,2,3) then "Ok\n" else "Wrong\n")
8 |
--------------------------------------------------------------------------------
/test_dev/auto.out.ok:
--------------------------------------------------------------------------------
1 | Num: 42
2 | Num: 42
3 | ok: i64
4 | Num: 42
5 | ok: i32
6 | ok: i64
7 | ok: i64(2)
8 | ok: i32 res
9 | ok: i32 res2
10 | hello
11 | ok: chararray
12 |
--------------------------------------------------------------------------------
/test_dev/real2.out.ok:
--------------------------------------------------------------------------------
1 | Num: 7.00
2 | Num: 7.00
3 | Num: 0.00
4 | Num: 0.00
5 | True
6 | Num: 7.00
7 | Num: 7.00
8 | Num: 0.00
9 | Num: 0.00
10 | Ok - +...
11 | OK
12 |
--------------------------------------------------------------------------------
/test_dev/xinline.mlbout.ok:
--------------------------------------------------------------------------------
1 | Num: 46
2 | Num: 47
3 | Num: 1
4 | Num: 3
5 | Num: 6
6 | Num: 10
7 | Num: 15
8 | Num: 21
9 | Num: 28
10 | Num: 36
11 | Num: 45
12 | Num: 55
13 |
--------------------------------------------------------------------------------
/basis/THREAD.sig:
--------------------------------------------------------------------------------
1 | signature THREAD = sig
2 | type 'a t
3 | val spawn : (unit->'a) -> ('a t->'b) -> 'b
4 | val get : 'a t -> 'a
5 | val numCores : unit -> int
6 | end
7 |
--------------------------------------------------------------------------------
/kitdemo/fold2.sml:
--------------------------------------------------------------------------------
1 | fun foldl f b xs =
2 | let fun loop(p as ([], b)) = p
3 | | loop(x::xs, b) = loop(xs,f x b)
4 | in
5 | #2(loop(xs,b))
6 | end
7 |
--------------------------------------------------------------------------------
/test/explicit_regions/rec.sml:
--------------------------------------------------------------------------------
1 | (* Records can be allocated in explicit regions *)
2 | fun f () : int =
3 | let with r
4 | val x = {a=3,b=5}`r
5 | in #b x
6 | end
7 |
--------------------------------------------------------------------------------
/test/upto.sml:
--------------------------------------------------------------------------------
1 | fun upto n =
2 | let fun loop(p as (0,acc)) = p
3 | | loop(n, acc) =
4 | loop(n-1, n::acc)
5 | in
6 | #2(loop(n,[]))
7 | end
8 |
9 |
--------------------------------------------------------------------------------
/test_dev/exception4.out.ok:
--------------------------------------------------------------------------------
1 | Ok - In handle BIND0
2 | Ok - In handle BIND1
3 | Ok, - no error...
4 | OK - In handle MATCH0
5 | Ok, - Match no error...
6 | OK if uncaught exception Match
7 |
--------------------------------------------------------------------------------
/test_dev/exn2.sml:
--------------------------------------------------------------------------------
1 | exception E
2 |
3 | fun print (s:string) : unit = prim("printStringML", s)
4 |
5 | val a : string = ("**5**"; raise E) handle _ => "**9**"
6 |
7 | val _ = print a
8 |
--------------------------------------------------------------------------------
/js/test/rwp3.mlb:
--------------------------------------------------------------------------------
1 | $SML_LIB/basis/basis.mlb
2 | $SML_LIB/basis/js.mlb
3 | rwp.sig
4 | rwp3.sml
5 | rhtml.sig
6 | rhtml.sml
7 | color.sig
8 | color.sml
9 | rwidget.sig
10 | rwidget.sml
--------------------------------------------------------------------------------
/kitdemo/refs3.sml:
--------------------------------------------------------------------------------
1 | val it =
2 | let val x : int ref = ref 3
3 | val y : bool ref = ref true
4 | val z : int ref = if !y then x else ref 5
5 | in z:= 6; !x
6 | end
7 |
--------------------------------------------------------------------------------
/kitdemo/upto.sml:
--------------------------------------------------------------------------------
1 | fun upto n =
2 | let fun loop(p as (0,acc)) = p
3 | | loop(n, acc) =
4 | loop(n-1, n::acc)
5 | in
6 | #2(loop(n,[]))
7 | end
8 |
9 |
--------------------------------------------------------------------------------
/src/Common/KitX86.sml:
--------------------------------------------------------------------------------
1 |
2 | structure K =
3 | let structure KC = KitCompiler(ExecutionX86)
4 | val _ = Flags.turn_on "garbage_collection"
5 | in KitMain(KC)
6 | end
7 |
8 |
--------------------------------------------------------------------------------
/src/Runtime/.gitignore:
--------------------------------------------------------------------------------
1 | *.o
2 | *.a
3 | Makefile
4 | KamInsts.c
5 | KamInsts.h
6 | SysErrTable.h
7 | gen_syserror
8 | jumptbl.h
9 | Prims.c
10 | PrimsApSml.c
11 | PrimsNsSml.c
12 | kam
--------------------------------------------------------------------------------
/test/kitfib35_mlton.sml:
--------------------------------------------------------------------------------
1 | (*kitfib35.sml*)
2 |
3 | val _ =
4 | let
5 | infix + - <
6 | fun fib n = if n < 1 then 1 else fib (n-1) + fib (n-2)
7 | in
8 | fib 35; ()
9 | end
10 |
--------------------------------------------------------------------------------
/test/mlbtest/datatype/d1.sml:
--------------------------------------------------------------------------------
1 | signature SIG = sig type t val a : t end
2 |
3 | structure S : SIG =
4 | struct
5 | datatype u = U
6 | datatype t = T of u
7 | val a : t = T U
8 | end
--------------------------------------------------------------------------------
/test/stringsz.sml.out.ok:
--------------------------------------------------------------------------------
1 | Trying with 1024: ok
2 | Trying with 1048576: ok
3 | Trying with 1073741824: ok
4 | Trying with 10485760: ok
5 | Trying concat (^): ok
6 | Trying with 20971520: ok
7 |
--------------------------------------------------------------------------------
/test/weeks5.sml:
--------------------------------------------------------------------------------
1 | val s = Array.sub and u = Array.update
2 |
3 | fun s2 x = s x
4 |
5 | (* or:
6 | fun f x = x
7 | fun g x = x
8 | val a = f and b = g
9 |
10 | fun h x = a x
11 | *)
--------------------------------------------------------------------------------
/test_dev/kit.script:
--------------------------------------------------------------------------------
1 | (*
2 | val optimiser : bool = false
3 | *)
4 | (*
5 | val print_physical_size_inference_expression : bool = true
6 | *)
7 | val print_call_explicit_expression : bool = true
--------------------------------------------------------------------------------
/basis/par-reml.mlb:
--------------------------------------------------------------------------------
1 | local
2 | basis.mlb
3 | in
4 | THREAD.sig
5 | ThreadSeq.sml
6 | Thread-reml.sml
7 | FORK_JOIN.sig
8 | ForkJoinSeq.sml
9 | ForkJoin-reml.sml
10 | end
11 |
--------------------------------------------------------------------------------
/kitdemo/lambda.sml:
--------------------------------------------------------------------------------
1 | val n = let val f = let val xs = [1,2]
2 | in fn ys => length xs + length ys
3 | end
4 | in f [7]
5 | end
6 |
--------------------------------------------------------------------------------
/src/Compiler/COMPILE_TO_LAMB.sml:
--------------------------------------------------------------------------------
1 |
2 | signature COMPILE_TO_LAMB = COMPILE_GEN
3 | where type target = LambdaExp.LambdaPgm
4 | and type CompBasis = CompBasisToLamb.CompBasis
5 |
6 |
--------------------------------------------------------------------------------
/src/Compiler/Regions/EffVarEnv.sml:
--------------------------------------------------------------------------------
1 | structure EffVarEnv=
2 | OrderFinMap(struct
3 | type t = Effect.effect
4 | val lt = Effect.lt_eps_or_rho
5 | end)
6 |
--------------------------------------------------------------------------------
/test/atExit0.sml.out.ok:
--------------------------------------------------------------------------------
1 | .hello d - fib(0) = 1
2 | ...hello c - fib(3) = 3
3 | .............hello b - fib(6) = 13
4 | .......................................................hello a - fib(9) = 55
5 |
--------------------------------------------------------------------------------
/test/kitfib35_smlnj.sml:
--------------------------------------------------------------------------------
1 | (*kitfib35.sml*)
2 |
3 | fun doit() =
4 | let
5 | infix + - <
6 | fun fib n = if n < 1 then 1 else fib (n-1) + fib (n-2)
7 | in
8 | fib 35; ()
9 | end
10 |
--------------------------------------------------------------------------------
/test_dev/exception5.out.ok:
--------------------------------------------------------------------------------
1 | Num: 1
2 | hej
3 | Testing generative exceptions:
4 | Enter f with x=Num: 1
5 |
6 | Enter f with x=Num: 0
7 |
8 | In handle _
9 | Ok - exn - generative...
10 |
--------------------------------------------------------------------------------
/test_dev/real_negabs.out.ok:
--------------------------------------------------------------------------------
1 | Num: 1.00
2 | Num: 0.80
3 | Num: -2.30
4 | Num: -0.40
5 | OK:neg1
6 | OK:neg2
7 | OK:neg3
8 | OK:neg4
9 | OK:abs1
10 | OK:abs2
11 | OK:abs3
12 | OK:abs4
13 |
--------------------------------------------------------------------------------
/js/basis/js.mlb:
--------------------------------------------------------------------------------
1 | local basis.mlb
2 | in JS_CORE.sml JsCore.sml
3 | JS.sig Js.sml
4 | html.mlb
5 | local xmlrpc.mlb
6 | in ann safeLinkTimeElimination in XMLrpcClient.sml end
7 | end
8 | end
--------------------------------------------------------------------------------
/src/Common/ORDSET.sml:
--------------------------------------------------------------------------------
1 | (*$ORDSET*)
2 | signature ORDSET =
3 | sig
4 | type item
5 | val lt: item * item -> bool
6 |
7 | type StringTree
8 | val show: item-> StringTree
9 | end
10 |
--------------------------------------------------------------------------------
/test/explicit_regions/er4.sml:
--------------------------------------------------------------------------------
1 |
2 | (* It is an error to refer to a region name that is not in scope *)
3 |
4 | fun f () =
5 | let val a = 3.2`r
6 | with r2
7 | in #1 (4,3.2`r2,a)
8 | end
9 |
--------------------------------------------------------------------------------
/test/explicit_regions/err_funty3.sml:
--------------------------------------------------------------------------------
1 | (* Inconsistent use of a parameter region. A region cannot hold both
2 | * pairs and strings. *)
3 |
4 | fun f `[r] (a:string`r) : (int * string)`r = (3, a)
5 |
--------------------------------------------------------------------------------
/test/explicit_regions/err_patty1.sml:
--------------------------------------------------------------------------------
1 | (* The global region variable of type T cannot be associated with a pair type
2 | (type in pattern version)
3 | *)
4 |
5 | val a : (int * int)`r0top = (4,6)
6 |
--------------------------------------------------------------------------------
/test/mlbtest/charsig.sml:
--------------------------------------------------------------------------------
1 | signature X =
2 | sig datatype s = S of t
3 | end
4 |
5 | structure K :> X =
6 | struct
7 | datatype s = S of t
8 | end
9 |
10 | val f = fn t => K.S t
--------------------------------------------------------------------------------
/test/weeks3.sml:
--------------------------------------------------------------------------------
1 | structure S =
2 | struct
3 | datatype 'a t = T of 'a u
4 | and 'a u = U
5 | end
6 |
7 | functor F() = S
8 |
9 | structure K = F()
10 |
11 | val a = K.U = K.U
--------------------------------------------------------------------------------
/test_dev/build.out.ok:
--------------------------------------------------------------------------------
1 | Hi there
2 | Num: 1010
3 | Num: 1009
4 | Num: 1008
5 | Num: 1007
6 | Num: 1006
7 | Num: 1005
8 | Num: 1004
9 | Num: 1003
10 | Num: 1002
11 | Num: 1001
12 | Num: 1000
13 |
--------------------------------------------------------------------------------
/test_dev/ceil.sml:
--------------------------------------------------------------------------------
1 |
2 |
3 | fun ceil (x : real) : int = prim ("ceilFloat", "ceilFloat", x) (* may raise Overflow *)
4 |
5 | val _ = ceil 1E32 handle Overflow => 43
6 |
7 | val _ = raise Match
8 |
--------------------------------------------------------------------------------
/basis/ThreadSeq.sml:
--------------------------------------------------------------------------------
1 | structure ThreadSeq :> THREAD = struct
2 | type 'a t = 'a
3 | fun spawn f g = g(f())
4 | fun get x = x
5 | fun numCores () = 1
6 | end
7 |
8 | structure Thread = ThreadSeq
9 |
--------------------------------------------------------------------------------
/js/test/rwp.mlb:
--------------------------------------------------------------------------------
1 | $SML_LIB/basis/basis.mlb
2 | $SML_LIB/basis/js.mlb
3 | rwp.sig
4 | rwp3.sml
5 | rhtml.sig
6 | rhtml.sml
7 | color.sig
8 | color.sml
9 | (*
10 | rwidget.sig
11 | rwidget.sml
12 | *)
--------------------------------------------------------------------------------
/src/Tools/Tester/INFO.sig:
--------------------------------------------------------------------------------
1 | signature INFO =
2 | sig
3 |
4 | val getInfo: string ->
5 | {size:int, rss:int, data:int,
6 | stk:int, exe:int} option (* bytes *)
7 |
8 | end (* signature INFO *)
9 |
--------------------------------------------------------------------------------
/test_dev/b3.sml:
--------------------------------------------------------------------------------
1 | local
2 | val b = ("Hej", "Med dig")
3 | fun print (s:string) : unit = prim("printStringML", s)
4 | in
5 | val () = print (#1 b)
6 | val () = print " "
7 | val () = print (#2 b)
8 | end
9 |
--------------------------------------------------------------------------------
/js/basis/xmlrpc.mlb:
--------------------------------------------------------------------------------
1 | local
2 | basis.mlb
3 | Parsercomb.sig
4 | Parsercomb.sml
5 | WSeq.sig
6 | WSeq.sml
7 | in
8 | XMLRPC_TYPE.sig
9 | XMLRPC.sig
10 | XMLrpc.sml
11 | end
12 |
--------------------------------------------------------------------------------
/kitdemo/fold3.sml:
--------------------------------------------------------------------------------
1 | fun foldl' f b xs =
2 | let fun loop(p as ([], b))= p
3 | | loop(x::xs, b) = loop(xs,f(x, b))
4 | in
5 | #2(loop(xs,b))
6 | end
7 |
--------------------------------------------------------------------------------
/src/lib/github.com/diku-dk/sml-uref/test/test_uref.out.ok:
--------------------------------------------------------------------------------
1 | Testing URef
2 | URef.eq.not: OK
3 | URef.eq.1: OK
4 | URef.eq.1: OK
5 | URef.find.1: OK
6 | URef.find.1: OK
7 | URef.update.1: OK
8 | URef.compare: OK
9 |
--------------------------------------------------------------------------------
/test/explicit_regions/err_funty1.sml:
--------------------------------------------------------------------------------
1 | (* The global region variable of type T cannot be associated with a pair type
2 | (type in function return pattern)
3 | *)
4 |
5 | fun f () : (int * int)`r0top = (4,6)
6 |
--------------------------------------------------------------------------------
/test_dev/app2.sml:
--------------------------------------------------------------------------------
1 |
2 | (*
3 | val _ = print "***Hello***\n"
4 | val _ = myprint "***MyHello***\n"
5 | *)
6 |
7 | val _ = app print "\n***Abe***\n"
8 |
9 | (*
10 | val _ = print "\n***End***\n"
11 | *)
--------------------------------------------------------------------------------
/test_dev/many_args.sml:
--------------------------------------------------------------------------------
1 | infix 6 +
2 |
3 | fun f x = x+x
4 | fun add (x1,x2,x3,x4,x5) = (f x1+x4,f x4+x3,#2(add(f x5+x2,x1,x4,x2,x4)),f x1+x3,f x3+x5+(#3(add(x1,x2,x4,x3,x5))))
5 |
6 | val _ = #3(add(1,2,3,4,5))
--------------------------------------------------------------------------------
/kitdemo/escape1.sml:
--------------------------------------------------------------------------------
1 | fun g () =
2 | let fun mk_x () = [5,7]
3 | fun f y = let val x = mk_x()
4 | in if y>3 then x@x else x; 5
5 | end
6 | in f 1; f 4
7 | end
8 |
--------------------------------------------------------------------------------
/test_dev/Initial.out.ok:
--------------------------------------------------------------------------------
1 | Starting
2 | Time
3 | Timer
4 | Real
5 | Math
6 | TextIO
7 | Posix
8 | - get
9 | - getTi
10 | - getT
11 | - getT
12 | - getT
13 | - getT
14 | - getN
15 | - getNS
16 | Done
17 |
--------------------------------------------------------------------------------
/test_dev/f64_simple2.sml:
--------------------------------------------------------------------------------
1 | infix 7 * / div mod
2 | infix 6 + -
3 | infix 4 = <> > >= < <=
4 |
5 | fun f () = 2.2 + 1.1
6 |
7 | fun printReal (n:real):unit = prim("printReal",n)
8 | val () = printReal (f())
9 |
--------------------------------------------------------------------------------
/kitdemo/takeanddrop.sml:
--------------------------------------------------------------------------------
1 | fun take([], i) = []
2 | | take(x::xs, i) =
3 | if i>0 then x::take(xs, i-1)
4 | else []
5 | fun drop(l as [], _) = l
6 | | drop(l as (x::xs),i) = if i>0 then drop(xs,i-1) else l;
--------------------------------------------------------------------------------
/ml-yacc-lib/ml-yacc-lib.mlb:
--------------------------------------------------------------------------------
1 | (* load file for ML-Yacc library *)
2 | local
3 | $(SML_LIB)/basis/basis.mlb
4 | in
5 | base.sig
6 | join.sml
7 | lrtable.sml
8 | stream.sml
9 | parser2.sml
10 | end
11 |
--------------------------------------------------------------------------------
/test/sharing.sml:
--------------------------------------------------------------------------------
1 | signature S = sig
2 | type t = int
3 | type u
4 | end
5 |
6 | functor F (structure S1 : S
7 | structure S2 : S
8 | sharing S1 = S2) = struct
9 | end
10 |
--------------------------------------------------------------------------------
/kitdemo/elimpair.sml:
--------------------------------------------------------------------------------
1 | val n = let
2 | val pair = if true then (3+4, 4+5)
3 | else (4, 5)
4 | in
5 | #1 pair
6 | end;
7 |
8 |
9 |
--------------------------------------------------------------------------------
/kitdemo/sma1.sml:
--------------------------------------------------------------------------------
1 |
2 | fun f [] = []
3 | | f (x::xs) = x+1 :: f xs
4 |
5 | val n = length(let val l1 = [1,2,3]
6 | in if true then f l1 else l1
7 | end)
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/kitlib/kitprofile.sml:
--------------------------------------------------------------------------------
1 | structure KitProfile : KIT_PROFILE =
2 | struct
3 | fun tellTime(s: string) : unit = prim("queueMark", s)
4 |
5 | (* queueMark is a no-op; queueMarkProf does stuff *)
6 |
7 | end
--------------------------------------------------------------------------------
/test/date2.sml:
--------------------------------------------------------------------------------
1 |
2 | val d = Date.day (Date.date {year=2014,month=Date.Nov,day=12,hour=0,
3 | minute=0,second=0,offset=NONE})
4 |
5 | val () = if d = 12 then print "Ok\n" else print "Error\n"
6 |
--------------------------------------------------------------------------------
/test/explicit_regions/er3.sml:
--------------------------------------------------------------------------------
1 |
2 | (* A region cannot be used for values that belong to different region types *)
3 |
4 | fun f () =
5 | let with r1
6 | val a = 3.2`r1
7 | in #1 (4, a, "hi there"`r1)
8 | end
9 |
--------------------------------------------------------------------------------
/test/ray/load:
--------------------------------------------------------------------------------
1 | exception Fail of string; (** not present in old versions **)
2 |
3 | app use [
4 | "objects.sml",
5 | "ray.sml",
6 | "interp.sml",
7 | "interface.sml",
8 | "main.sml"
9 | ];
10 |
--------------------------------------------------------------------------------
/test_dev/b2.sml:
--------------------------------------------------------------------------------
1 |
2 | local
3 | fun print (s:string) : unit = prim("printStringML", s)
4 | val () = print "Hi\n"
5 | val () = print a
6 | val () = (print (#1 b); print " "; print (#2 b))
7 | in
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/test_dev/fib0.sml:
--------------------------------------------------------------------------------
1 | infix - +
2 |
3 | fun printNum (i:int) : unit = prim("printNum", i)
4 |
5 | fun fib 0 = 1
6 | | fib 1 = 1
7 | | fib n = fib(n-1) + fib(n-2)
8 |
9 | val _ = printNum(fib 30) (* 1346269 *)
10 |
--------------------------------------------------------------------------------
/basis/CommandLine.sml:
--------------------------------------------------------------------------------
1 |
2 | structure CommandLine : COMMAND_LINE =
3 | struct
4 | fun name () : string = prim("sml_commandline_name", ())
5 | fun arguments () : string list = prim("sml_commandline_args", ())
6 | end
7 |
--------------------------------------------------------------------------------
/kitdemo/SetApp.sml:
--------------------------------------------------------------------------------
1 | structure IntSet = Set(type elem = int
2 | val lt = op <
3 | fun pr a = Int.toString a)
4 | open IntSet
5 | val _ = print (pr (union(singleton 2, singleton 5)))
6 |
--------------------------------------------------------------------------------
/kitlib/finmap_ext.mlb:
--------------------------------------------------------------------------------
1 | local $(SML_LIB)/basis/basis.mlb
2 | $(SML_LIB)/src/Pickle/pickle.mlb
3 | $(SML_LIB)/basis/kitlib/pp.mlb
4 | finmap_impl.mlb
5 | in
6 | MONO_FINMAP_EXT.sml
7 | IntFinMapPTExt.sml
8 | end
--------------------------------------------------------------------------------
/test/barry/precedence.sml:
--------------------------------------------------------------------------------
1 |
2 | fun f x =
3 | if !(ref false) then f x
4 | else let val a = ref 4
5 | in fn y => x + y * 2 - ((2 - x) + !a)
6 | end
7 |
8 | val () = print (Int.toString (f 8 9) ^ "\n")
9 |
--------------------------------------------------------------------------------
/kitdemo/INT_SET.sml:
--------------------------------------------------------------------------------
1 | signature INT_SET =
2 | sig
3 | type 'a set
4 | val empty : int set
5 | val singleton : int -> int set
6 | val mem : int * int set -> bool
7 | val union : int set * int set -> int set
8 | end
--------------------------------------------------------------------------------
/src/Common/KitMain.sml:
--------------------------------------------------------------------------------
1 | functor KitMain (K : KIT_COMPILER) : sig end =
2 | struct
3 | val name = CommandLine.name()
4 | val args = CommandLine.arguments()
5 | val _ = OS.Process.exit (K.kitexe(name,args))
6 | end
7 |
8 |
--------------------------------------------------------------------------------
/src/Common/StringFinMapPT.sml:
--------------------------------------------------------------------------------
1 | structure StringFinMap : MONO_FINMAP =
2 | FinMapPT(struct type T = string
3 | val eq = op =
4 | val lt = op <
5 | val hash = strhash
6 | fun toString a = a
7 | end)
8 |
--------------------------------------------------------------------------------
/src/Tools/ml-yacc/examples/calc/sources.cm:
--------------------------------------------------------------------------------
1 | Group is
2 |
3 | #if defined (NEW_CM)
4 | $/basis.cm
5 | $/ml-yacc-lib.cm
6 | #else
7 | ml-yacc-lib.cm
8 | #endif
9 |
10 | calc.grm
11 | calc.lex
12 | calc.sml
13 |
14 |
--------------------------------------------------------------------------------
/test/multiarg.sml:
--------------------------------------------------------------------------------
1 | infix - +
2 |
3 |
4 | fun myfun (a,b) = (b+1,a-1)
5 |
6 |
7 | fun one (a) = a+1
8 |
9 | fun myfun2 (a,b) c : int = a+b+c
10 | fun myfun3 a b c : int = a+b+c
11 |
12 | fun myfun4 a (b,c) : int = a+b+c
13 |
--------------------------------------------------------------------------------
/test/opaque3.sml:
--------------------------------------------------------------------------------
1 | signature A =
2 | sig
3 | type t
4 | val C : t
5 | end
6 |
7 | functor F() =
8 | struct
9 | type t = int
10 | val C : t = 4
11 | end :> A
12 |
13 | structure S0 = F() :> A
14 |
--------------------------------------------------------------------------------
/test/patricia.sml.out.ok:
--------------------------------------------------------------------------------
1 | OK : test1
2 | OK : test2
3 | OK : test3
4 | OK : test4
5 | OK : test5
6 | OK : test6
7 | OK : test6
8 | OK : test7
9 | OK : test8
10 | OK : test9
11 | OK : test10
12 | OK : test11
13 | OK : test12
14 |
--------------------------------------------------------------------------------
/test/explicit_regions/er2.sml:
--------------------------------------------------------------------------------
1 |
2 | (* It is an error to have duplicate region names in a with declaration *)
3 |
4 | fun f () =
5 | let with r1 r2 r10 r2 r3
6 | val a = 3.2`r10
7 | in #1 (4, 3.2`r2, a, "hi there"`r3)
8 | end
9 |
--------------------------------------------------------------------------------
/test/explicit_regions/er5.sml:
--------------------------------------------------------------------------------
1 | (* it is an error to declare a region variable that is already in
2 | * scope; we may later allow for shadowing *)
3 |
4 | fun f `[r] () : real =
5 | let with r2 r
6 | in #1 (4.3`r, 4.8`r2)
7 | end
8 |
--------------------------------------------------------------------------------
/kitdemo/SET.sig:
--------------------------------------------------------------------------------
1 | signature SET =
2 | sig
3 | eqtype elem and set
4 | val empty : set
5 | val singleton : elem -> set
6 | val mem : elem -> set -> bool
7 | val union : set * set -> set
8 | val pr : set -> string
9 | end
--------------------------------------------------------------------------------
/src/Common/TIMESTAMP.sig:
--------------------------------------------------------------------------------
1 | signature TIMESTAMP =
2 | sig
3 | eqtype stamp
4 | val new: unit -> stamp
5 | val stamp2int : stamp -> int (* an injective mapping from stamps to integers *)
6 | val print: stamp -> string
7 | end;
8 |
--------------------------------------------------------------------------------
/test/excon.sml:
--------------------------------------------------------------------------------
1 | datatype t = Opt
2 |
3 | exception Opt2
4 |
5 | val rec Opt = fn (a : int) => a + 6
6 |
7 | fun Opt2 0 = 0
8 | | Opt2 n = n + Opt2(n-1)
9 |
10 | val a = Opt2 10 + Opt 10
11 |
12 | val _ = print (Int.toString a ^ "\n")
--------------------------------------------------------------------------------
/test/explicit_regions/er1.sml:
--------------------------------------------------------------------------------
1 |
2 | (* It is an error to declare a region with a name that is already in
3 | * scope *)
4 |
5 | fun f () =
6 | let with r
7 | val a = 3.2`r
8 | with r
9 | in #1 (4,3.2`r,a)
10 | end
11 |
--------------------------------------------------------------------------------
/test/explicit_regions/er10.sml:
--------------------------------------------------------------------------------
1 | (* it is an error for a value in an explicit local
2 | * region to escape *)
3 |
4 | infix +
5 | fun f () : real =
6 | let with r
7 | val y = 3.4`r
8 | in if true then 2.0 else y
9 | end
10 |
--------------------------------------------------------------------------------
/test/explicit_regions/er19.sml:
--------------------------------------------------------------------------------
1 | (* It is an error to use an effect variable for allocation *)
2 |
3 | fun !(x: 'a ref): 'a = prim ("!", x)
4 |
5 | val x = ref 4.5
6 |
7 | fun f `[e] () : real =
8 | if true then 3.4`e
9 | else !x
10 |
--------------------------------------------------------------------------------
/test/explicit_regions/err_funty2.sml:
--------------------------------------------------------------------------------
1 | (* Inconsistent use of a parameter region. A region cannot hold both
2 | * pairs and triples. *)
3 |
4 | fun f `[r] () : (((int * int)`r -> (int * int)`r) * int * bool)`r =
5 | (fn z => z, 3, false)
6 |
--------------------------------------------------------------------------------
/test/explicit_regions/err_ty1.sml:
--------------------------------------------------------------------------------
1 | (* An effect variable (beginning with 'e') cannot be used as a region variable *)
2 |
3 | val x =
4 | let with e
5 | val a : int #e->string = fn x => "hi"
6 | in (a 3) : string`e
7 | end
8 |
--------------------------------------------------------------------------------
/basis/Vector.sml:
--------------------------------------------------------------------------------
1 | structure Vector : VECTOR =
2 | let structure T = PolyTable (type 'a table = 'a vector)
3 | in struct
4 | open T
5 | val update = updatev
6 | end
7 | end
8 |
9 | fun vector l = Vector.fromList l
10 |
--------------------------------------------------------------------------------
/basis/web/xmlrpc/xmlrpc.mlb:
--------------------------------------------------------------------------------
1 | local
2 | ../../basis.mlb
3 | ../../kitlib.mlb
4 | Parsercomb.sig
5 | Parsercomb.sml
6 | WSeq.sig
7 | WSeq.sml
8 | in
9 | XMLRPC_TYPE.sig
10 | XMLRPC.sig
11 | XMLrpc.sml
12 | end
13 |
--------------------------------------------------------------------------------
/src/Common/PostElabDecGrammar.sml:
--------------------------------------------------------------------------------
1 | structure PostElabDecGrammar =
2 | DecGrammar(struct
3 | type GrammarInfo = AllInfo.ElabInfo.ElabInfo
4 | val bogus_info = AllInfo.ElabInfo.from_ParseInfo PreElabDecGrammar.bogus_info
5 | end)
6 |
--------------------------------------------------------------------------------
/src/Tools/ml-yacc/examples/fol/absyn.sml:
--------------------------------------------------------------------------------
1 | signature ABSYN =
2 | sig
3 | type absyn
4 | val null : absyn
5 | end
6 |
7 | structure Absyn :> ABSYN =
8 | struct
9 | datatype absyn = NULL
10 | val null = NULL
11 | end
--------------------------------------------------------------------------------
/test/explicit_regions/err_copylist.sml:
--------------------------------------------------------------------------------
1 | (* Exomorphisms by non-unifiable explicit region variables *)
2 |
3 | infix ::
4 |
5 | fun copy `[r1 r2] (xs : int list`r1) : int list`r2 =
6 | case xs of
7 | nil => nil
8 | | x :: xs => x :: xs
9 |
--------------------------------------------------------------------------------
/test/freedatatype.sml.log.ok:
--------------------------------------------------------------------------------
1 |
2 |
3 | ********** freedatatype.sml *************
4 |
5 |
6 | freedatatype.sml, line 17, column 19:
7 | let datatype t = C of 'c
8 | ^^^^^^^^^^^
9 | unbound type variable 'c.
10 |
--------------------------------------------------------------------------------
/test/freedatatype2.sml.log.ok:
--------------------------------------------------------------------------------
1 |
2 |
3 | ********** freedatatype2.sml *************
4 |
5 |
6 | freedatatype2.sml, line 17, column 19:
7 | let datatype t = C of 'a
8 | ^^^^^^^^^^^
9 | unbound type variable 'a.
10 |
--------------------------------------------------------------------------------
/test/functor4.sml:
--------------------------------------------------------------------------------
1 | signature R = sig type r(*58*) val R : r end
2 |
3 | functor A(R : R (*59*)) =
4 | struct
5 | type r(*59*) = R.r
6 | end
7 |
8 | structure R = struct datatype r(*62*) = R end
9 |
10 | structure B = A(R)
11 |
12 |
--------------------------------------------------------------------------------
/basis/ArraySlice.sml:
--------------------------------------------------------------------------------
1 | structure ArraySlice :> ARRAY_SLICE =
2 | TableSlice(type 'a table = 'a array
3 | val maxLen = Array.maxLen
4 | type 'a vector_slice = 'a VectorSlice.slice
5 | val vector_slice_base = VectorSlice.base)
6 |
--------------------------------------------------------------------------------
/js/basis/ArraySlice.sml:
--------------------------------------------------------------------------------
1 | structure ArraySlice :> ARRAY_SLICE =
2 | TableSlice(type 'a table = 'a array
3 | val maxLen = Array.maxLen
4 | type 'a vector_slice = 'a VectorSlice.slice
5 | val vector_slice_base = VectorSlice.base)
6 |
--------------------------------------------------------------------------------
/kitdemo/utils/ListUtils.sml:
--------------------------------------------------------------------------------
1 | structure ListUtils =
2 | struct
3 | fun pr_list pr list =
4 | let fun loop [] = "}"
5 | | loop [x] = pr x ^ "}"
6 | | loop (x::xs) = pr x ^ "," ^ loop xs
7 | in "{" ^ loop list
8 | end
9 | end
--------------------------------------------------------------------------------
/test/barnes-hut/sources.mlb:
--------------------------------------------------------------------------------
1 | $(SML_LIB)/basis/basis.mlb
2 | rand-sig.sml
3 | rand.sml
4 | vector-sig.sml
5 | space.sml
6 | load.sml
7 | grav.sml
8 | getparam.sml
9 | data-io.sml
10 | main.sml
11 | vector3.sml
12 | main2.sml
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/test/explicit_regions/call2.sml:
--------------------------------------------------------------------------------
1 | infix +
2 | fun f `[rr rp] () : real*real =
3 | let val x = 4.3`rr
4 | in (x,x)`rp
5 | end
6 |
7 | fun g `[r] () =
8 | let with r2
9 | val (_,y) = f `[r r2] ()
10 | in y + 0.0
11 | end
12 |
--------------------------------------------------------------------------------
/test/explicit_regions/er1.sml.log.ok:
--------------------------------------------------------------------------------
1 | [reading source file: er1.sml]
2 |
3 | er1.sml, line 8, column 6:
4 | with r
5 | ^^^^^^
6 | Explicit region variable(s) already in scope: r
7 | Stopping compilation of MLB-file due to error (code 1).
8 |
--------------------------------------------------------------------------------
/test/explicit_regions/er12.sml:
--------------------------------------------------------------------------------
1 | (* It is an error to refer to a region that is not in
2 | * scope (function parameter) *)
3 |
4 | infix +
5 | fun f `[r] () : real = 4.3`r
6 | fun g () = let with r2
7 | in 0.0 + f `[r3] ()
8 | end
9 |
--------------------------------------------------------------------------------
/test/explicit_regions/er9.sml:
--------------------------------------------------------------------------------
1 | (* it is an error to unify two region parameters *)
2 |
3 | infix +
4 | fun f `[r1 r2] () : real =
5 | let val z = 8.0`r1
6 | val y = if true then 3.4`r2
7 | else z
8 | in 2.0 + y
9 | end
10 |
--------------------------------------------------------------------------------
/test/explicit_regions/tup2.sml:
--------------------------------------------------------------------------------
1 | (* Two tuples can be allocated in the same explicit region *)
2 |
3 | infix +
4 | fun f () : int =
5 | let with r
6 | val x = (3,5)`r
7 | val y = (5,8)`r
8 | in #1 x + #2 y
9 | end
10 |
--------------------------------------------------------------------------------
/test/oh-no2.sml.log.ok:
--------------------------------------------------------------------------------
1 |
2 |
3 | ********** oh-no2.sml *************
4 |
5 | > datatype 'a map
6 | con E : 'a map
7 | con N : 'a map * 'a map -> 'a map
8 | exception Impossible of string
9 | val plus : 'a map * 'a map -> 'a map
10 |
--------------------------------------------------------------------------------
/test/stream.mlb.out.ok:
--------------------------------------------------------------------------------
1 | Testing stream structure (part of Pickle library)...
2 | sz(s) = 8112
3 | test1 OK
4 | sz(s) = 5900
5 | test2 OK
6 | sz(s) = 7006
7 | test3 OK
8 | sz(s) = 7006
9 | test4 OK
10 | sz(s) = 6
11 | test5 OK
12 |
--------------------------------------------------------------------------------
/test_dev/f64_1.sml:
--------------------------------------------------------------------------------
1 | infix 7 * / div mod
2 | infix 6 + -
3 | infix 4 = <> > >= < <=
4 |
5 | fun f (a,b,c:real) = a * b - c
6 |
7 | fun printReal (n:real):unit = prim("printReal",n)
8 |
9 | val () = printReal (f(5.0,2.0,3.0)) (* 7.00 *)
10 |
--------------------------------------------------------------------------------
/src/Tools/Tester/KitTester.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 | info.mlb
4 | MemUsage.sml
5 | TestFile.sml
6 | CompilerTimings.sml
7 | test_report.sig
8 | test_report.sml
9 | TestReport.sml
10 | in
11 | Tester.sml
12 | end
13 |
--------------------------------------------------------------------------------
/src/Tools/ml-yacc/lib/ml-yacc-lib.mlb:
--------------------------------------------------------------------------------
1 | (* sources file for ML-Yacc library *)
2 |
3 | local
4 | $(SML_LIB)/basis/basis.mlb
5 | in
6 | base.sig
7 | join.sml
8 | lrtable.sml
9 | stream.sml
10 | parser2.sml (* error correcting version *)
11 | end
--------------------------------------------------------------------------------
/test/explicit_regions/er11.sml.log.ok:
--------------------------------------------------------------------------------
1 | [reading source file: er11.sml]
2 |
3 | er11.sml, line 6, column 6:
4 | let with r
5 | ^^^^^^
6 | Explicit region variable(s) already in scope: r
7 | Stopping compilation of MLB-file due to error (code 1).
8 |
--------------------------------------------------------------------------------
/test/explicit_regions/er5.sml.log.ok:
--------------------------------------------------------------------------------
1 | [reading source file: er5.sml]
2 |
3 | er5.sml, line 5, column 6:
4 | let with r2 r
5 | ^^^^^^^^^
6 | Explicit region variable(s) already in scope: r
7 | Stopping compilation of MLB-file due to error (code 1).
8 |
--------------------------------------------------------------------------------
/test/explicit_regions/err_expty3.sml:
--------------------------------------------------------------------------------
1 | (* Escaping functions cannot live in local regions *)
2 |
3 | val f : unit -> int -> int =
4 | (fn () =>
5 | let with r
6 | val g = (fn x => 4) : (int -> int)`r
7 | in g
8 | end)
9 |
--------------------------------------------------------------------------------
/test/unbox.sml:
--------------------------------------------------------------------------------
1 | (* Test to see if optimization of argument unboxing works ok *)
2 |
3 | fun do_list i =
4 | case i
5 | of 1 => (1,1)
6 | | _ => do_list 1
7 |
8 | fun doit (a:int,b:int) () = doit (do_list 1) ()
9 |
10 | val _ = print "Ok\n"
--------------------------------------------------------------------------------
/test_dev/interrupt.sml:
--------------------------------------------------------------------------------
1 | val n = ref 0
2 | fun loop () =
3 | (n := ((!n + 1) handle Overflow => 0);
4 | loop ())
5 |
6 | fun f () = (loop ()
7 | handle Interrupt => (print (Int.toString (!n) ^ "\n"); f ()))
8 |
9 | val _ = f ()
10 |
--------------------------------------------------------------------------------
/basis/io/io-close.sml:
--------------------------------------------------------------------------------
1 |
2 | signature BIN_IO = BIN_IO
3 | signature TEXT_IO = TEXT_IO
4 | signature TEXT_STREAM_IO = TEXT_STREAM_IO
5 |
6 | (** SigDoc *)
7 | structure BinIO : BIN_IO = BinIO
8 |
9 | (** SigDoc *)
10 | structure TextIO : TEXT_IO = TextIO
11 |
--------------------------------------------------------------------------------
/src/Common/CRASH.sig:
--------------------------------------------------------------------------------
1 | (* CRASH signature: used for internal consistency errors and so on. *)
2 |
3 | signature CRASH =
4 | sig
5 | val assert : (string * bool) -> unit
6 | val impossible : string -> 'a
7 | val unimplemented : string -> 'a
8 | end
9 |
--------------------------------------------------------------------------------
/test/explicit_regions/er18.sml.log.ok:
--------------------------------------------------------------------------------
1 | [reading source file: er18.sml]
2 |
3 | er18.sml, line 3, column 11:
4 | type t = {}`r0
5 | ^^^
6 | Unboxed types cannot be annotated with regions
7 | Stopping compilation of MLB-file due to error (code 1).
8 |
--------------------------------------------------------------------------------
/test/layout.sml:
--------------------------------------------------------------------------------
1 |
2 | fun layout (cbs : (string * real) list list) : string =
3 | let
4 | val layoutcb =
5 | map (fn (con,_) => con)
6 |
7 | fun layoutdb cb = "{" ^ concat(layoutcb cb) ^ "}"
8 | in concat(map layoutdb cbs)
9 | end
10 |
--------------------------------------------------------------------------------
/test/vector.sml.out.ok:
--------------------------------------------------------------------------------
1 | Testing Vector...
2 | test1: OK
3 | test2: OK
4 | test3: OK
5 | test4a: OK
6 | test4b: OK
7 | test4c: OK
8 | test5: OK
9 | test6a: OK
10 | test6b: OK
11 | test6c: OK
12 | test7: OK
13 | test8: OK
14 | test10a: OK
15 | test11a: OK
16 |
--------------------------------------------------------------------------------
/test/vesa2.sml:
--------------------------------------------------------------------------------
1 | functor F (A : sig type a end) =
2 | struct
3 | type u = A.a
4 | type s = A.a
5 | end :>
6 | sig
7 | type s
8 | type u = A.a
9 | end
10 |
11 | functor G () = F (datatype a = S)
12 |
13 | structure R = G ()
14 |
--------------------------------------------------------------------------------
/basis/web/WEB_DYNLIB.sml:
--------------------------------------------------------------------------------
1 | signature WEB_DYNLIB = sig
2 | datatype flag = NOW | LAZY
3 | type ForeignLib
4 | val dlopen : string option * flag * bool -> ForeignLib
5 | val dlsym : string * string * ForeignLib -> unit
6 | val isLinked : string -> bool
7 | end
8 |
--------------------------------------------------------------------------------
/kitlib/set_ext.mlb:
--------------------------------------------------------------------------------
1 | local $(SML_LIB)/basis/basis.mlb
2 | $(SML_LIB)/src/Pickle/pickle.mlb
3 | $(SML_LIB)/basis/kitlib/pp.mlb
4 | set_impl.mlb
5 | in
6 | MONO_SET_EXT.sml
7 | IntSetExt.sml
8 | NatSetExt.sml
9 | OrderSetExt.sml
10 | end
--------------------------------------------------------------------------------
/src/Common/Timestamp.sml:
--------------------------------------------------------------------------------
1 | structure Timestamp: TIMESTAMP =
2 | struct
3 | type stamp = int
4 |
5 | val r = ref 0
6 | fun new() = (r := !r + 1; !r)
7 |
8 | fun stamp2int i = i
9 |
10 | fun print i = (*"$" ^*) Int.toString i
11 | end;
12 |
--------------------------------------------------------------------------------
/test/explicit_regions/er2.sml.log.ok:
--------------------------------------------------------------------------------
1 | [reading source file: er2.sml]
2 |
3 | er2.sml, line 5, column 11:
4 | let with r1 r2 r10 r2 r3
5 | ^^^^^^^^^^^^^^^
6 | Repeated identifiers r2 and r2.
7 | Stopping compilation of MLB-file due to error (code 1).
8 |
--------------------------------------------------------------------------------
/test/explicit_regions/er6.sml:
--------------------------------------------------------------------------------
1 | (* it is an error to unify a region parameter with a
2 | * global region variable *)
3 |
4 | fun !(x: 'a ref): 'a = prim ("!", x)
5 |
6 | val x = ref 4.5
7 |
8 | fun f `[r] () : real =
9 | if true then 3.4`r
10 | else !x
11 |
--------------------------------------------------------------------------------
/test/explicit_regions/string.sml:
--------------------------------------------------------------------------------
1 | (* Strings can be allocated in explicit regions *)
2 |
3 | fun size (s : string) : int = prim ("__bytetable_size", s)
4 |
5 | fun f () : int =
6 | let with r
7 | val x = "Hi there"`r
8 | in size x
9 | end
10 |
--------------------------------------------------------------------------------
/test/logic/term.sml:
--------------------------------------------------------------------------------
1 | (* term.sml *)
2 |
3 | structure Term =
4 | struct
5 | datatype term
6 | = STR of string * term list
7 | | INT of int31
8 | | CON of string
9 | | REF of term option ref
10 |
11 | exception BadArg of string
12 | end;
13 |
--------------------------------------------------------------------------------
/test/stringcvt.sml.out.ok:
--------------------------------------------------------------------------------
1 |
2 | File stringcvt.sml: Testing structure StringCvt...
3 | test1 OK
4 | test2 OK
5 | test3 OK
6 | test4 OK
7 | test5 OK
8 | test6 OK
9 | test7 OK
10 | test8 OK
11 | test9 OK
12 | test10 OK
13 |
--------------------------------------------------------------------------------
/test/weeks2.sml.log.ok:
--------------------------------------------------------------------------------
1 |
2 |
3 | ********** weeks2.sml *************
4 |
5 | weeks2.sml, line 2, column 9:
6 | datatype t = K of t (* this one should not be accepted *)
7 | ^
8 | type constructor t is bound by both datatype binding and withtype binding
9 |
--------------------------------------------------------------------------------
/test_dev/if2.sml:
--------------------------------------------------------------------------------
1 |
2 | let
3 | infix <=
4 | infix <
5 | infix >
6 | infix >=
7 | fun print (s:string) : unit = prim("printStringML", "printStringML", s)
8 | in
9 | if 3<4 then
10 | print "It works!"
11 | else
12 | print "It does not work"
13 | end
14 |
--------------------------------------------------------------------------------
/basis/Prim.sml:
--------------------------------------------------------------------------------
1 | structure Prim =
2 | struct
3 | fun equal_int32ub(a:int,b) = a=b
4 | fun mod_int32ub(a:int,b,e) = a mod b handle _ => raise e
5 | fun div_int32ub(a:int,b,e) = a div b handle _ => raise e
6 | fun printStringML s = print s
7 | end
8 |
--------------------------------------------------------------------------------
/js/basis/Vector.sml:
--------------------------------------------------------------------------------
1 | structure Vector : VECTOR =
2 | let structure T = WordTable (type 'a table = 'a vector)
3 | in struct
4 | open T
5 | val update = updatev
6 | end
7 | end
8 |
9 | fun vector l = Vector.fromList l
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/js/test/stringcvt.html.out.ok:
--------------------------------------------------------------------------------
1 | Loading stringcvt.html
2 | File stringcvt.sml: Testing structure StringCvt...
3 |
4 | test1 OK
5 | test2 OK
6 | test3 OK
7 | test4 OK
8 | test5 OK
9 | test6 OK
10 | test7 OK
11 | test8 OK
12 | test9 OK
13 | test10 OK
14 | Test ended.
15 |
--------------------------------------------------------------------------------
/src/lib/github.com/diku-dk/sml-uref/Makefile:
--------------------------------------------------------------------------------
1 | MLCOMP ?= mlkit
2 |
3 | .PHONY: all
4 | all:
5 | $(MLCOMP) uref.mlb
6 |
7 | .PHONY: test
8 | test:
9 | $(MAKE) -C test test
10 |
11 | .PHONY: clean
12 | clean:
13 | $(MAKE) -C test clean
14 | rm -rf MLB *~ run
15 |
--------------------------------------------------------------------------------
/test_dev/word_problem.sml:
--------------------------------------------------------------------------------
1 | infix 1 seq
2 | fun e1 seq e2 = e2;
3 | fun pr_ln s s' = print (s ^ ": " ^ s' ^ "\n")
4 |
5 | val test13d = (Word8.fromString "FFFFFFFFFFF" seq "WRONG")
6 | handle Overflow => "OK" | _ => "WRONG";
7 | val _ = pr_ln "test13d" test13d
8 |
--------------------------------------------------------------------------------
/src/Common/PreElabDecGrammar.sml:
--------------------------------------------------------------------------------
1 | structure PreElabDecGrammar = DecGrammar
2 | (struct
3 | type GrammarInfo = ParseInfo.ParseInfo
4 | val bogus_info =
5 | ParseInfo.from_SourceInfo(SourceInfo.from_positions LexBasics.DUMMY LexBasics.DUMMY)
6 | end)
7 |
--------------------------------------------------------------------------------
/test/PermuteList.sig:
--------------------------------------------------------------------------------
1 | signature PERMUTELIST =
2 | sig
3 |
4 | type 'a permuteList
5 |
6 | val fromList : 'a list -> 'a permuteList
7 | val prj : 'a permuteList -> ('a * 'a permuteList) option
8 | val findSome : ('a -> 'b option) -> 'a permuteList -> 'b option
9 |
10 | end
11 |
--------------------------------------------------------------------------------
/test/explicit_regions/ref.sml:
--------------------------------------------------------------------------------
1 | (* Refs can be allocated in explicit regions *)
2 |
3 | infix +
4 | fun !(x: 'a ref): 'a = prim ("!", x)
5 |
6 | fun f () : int =
7 | let with r
8 | val x = ref`[r] 8
9 | val y = ref`r 9
10 | in !x + !y
11 | end
12 |
--------------------------------------------------------------------------------
/test/packreal.sml.out.ok:
--------------------------------------------------------------------------------
1 | Testing structure PackRealBig...
2 | [r = 0.0, sz(vector) = 8, sz(bs) 8, r' = 0.0]
3 | [r = 2.0, sz(vector) = 8, sz(bs) 8, r' = 2.0]
4 | [r = 43.23, sz(vector) = 8, sz(bs) 8, r' = 43.23]
5 | [r = ~43.2, sz(vector) = 8, sz(bs) 8, r' = ~43.2]
6 | test1 OK
7 |
--------------------------------------------------------------------------------
/src/Tools/MspComp/Makefile:
--------------------------------------------------------------------------------
1 | BINDIR=../../../bin
2 |
3 | include ../../../Makefiledefault
4 |
5 | $(BINDIR)/mspcomp: mspcomp
6 | cp mspcomp $(BINDIR)/
7 |
8 | mspcomp: Makefile MspComp.sml
9 | $(MLCOMP) -output mspcomp MspComp.sml
10 |
11 | clean:
12 | rm -rf mspcomp *~ MLB
13 |
--------------------------------------------------------------------------------
/test/explicit_regions/effty1.sml:
--------------------------------------------------------------------------------
1 | (* A function with a local effect cannot escape *)
2 |
3 | fun printNum (i:int) : unit = prim("printNum", i)
4 |
5 | val f =
6 | let with e
7 | val g : int #e-> int = fn x => x
8 | in g
9 | end
10 | val () = printNum (f 3)
11 |
--------------------------------------------------------------------------------
/test/explicit_regions/er4.sml.log.ok:
--------------------------------------------------------------------------------
1 | [reading source file: er4.sml]
2 | > val f : unit -> int
3 | er4.sml, line 5, column 17:
4 | let val a = 3.2`r
5 | ^^
6 | Explicit region variable `r is not in scope.
7 | Stopping compilation of MLB-file due to error (code 1).
8 |
--------------------------------------------------------------------------------
/test/foldbug.sml:
--------------------------------------------------------------------------------
1 | datatype 'a tree = L | T of 'a tree * 'a * 'a tree
2 |
3 | fun fold (_, L, acc) = acc
4 | | fold (f, T (l, x, r), acc) = fold (f, l, (f (x, fold (f, r, acc))))
5 |
6 | val v = fold (fn (x, a) => x+a, T(L,40,T(L,2,L)), 0)
7 |
8 | val () = print (Int.toString v ^ "\n")
9 |
--------------------------------------------------------------------------------
/test/helsen.sml:
--------------------------------------------------------------------------------
1 | val test = let val g = fn y (* : int *) => y in
2 | fn y => (let val f1 = fn x => (g 7)
3 | val f2 = fn f => 4
4 | in
5 | f2 f1
6 | end)
7 | end 2
--------------------------------------------------------------------------------
/test_dev/if.sml:
--------------------------------------------------------------------------------
1 |
2 | let
3 | infix <=
4 | infix <
5 | infix >
6 | infix >=
7 | fun print (s:string) : unit = prim("printStringML", s)
8 | in
9 | if 3<=3 andalso 2<4 andalso 2>1 andalso 4>=4 then
10 | print "It works!"
11 | else
12 | print "It does not work"
13 | end
14 |
--------------------------------------------------------------------------------
/basis/web/WEB_DB_BIND.sml:
--------------------------------------------------------------------------------
1 | signature WEB_DB_BIND =
2 | sig
3 | type sql = string
4 | structure Handle : WEB_DB_HANDLE
5 | val dml : sql -> Handle.db -> string list -> unit
6 | val fold : sql -> Handle.db -> string list -> ((string -> string) * 'a -> 'a) -> 'a -> 'a
7 | end
8 |
--------------------------------------------------------------------------------
/test/functor3.sml:
--------------------------------------------------------------------------------
1 | structure S =
2 | struct
3 | fun f a = a
4 | end
5 |
6 | functor A() = S
7 |
8 | functor B ( val f : string -> string ) =
9 | struct val f = f
10 | end
11 |
12 | functor C() = B( A() )
13 |
14 | structure M = C()
15 |
16 | val _ = print (M.f "Ok\n")
--------------------------------------------------------------------------------
/test/parallelism/exn1.sml.out.ok:
--------------------------------------------------------------------------------
1 | Num: 1
2 | Num: 2
3 | Num: 3
4 | Num: 4
5 | Num: 5
6 | Num: 6
7 | Num: 7
8 | Num: 8
9 | Num: 9
10 | Num: 10
11 | Num: 11
12 | Num: 12
13 | Num: 13
14 | Num: 14
15 | Num: 15
16 | Num: 16
17 | Num: 17
18 | Num: 18
19 | Num: 19
20 | Num: 20
21 | Num: 0
22 |
--------------------------------------------------------------------------------
/test/repl/basis.cmd:
--------------------------------------------------------------------------------
1 | val a = Int32.maxInt
2 | val b = List.tabulate(4, fn i => i)
3 | val c = 1234567890123456789012345678901234567890
4 | val d = c * c
5 | val e = IntInf.toString d
6 | val f = SOME {x = 34, y = 34.2}
7 | val g = case f of SOME r => Real.toString (#y r) | _ => "NO";
8 | :quit;
9 |
--------------------------------------------------------------------------------
/basis/VectorSlice.sml:
--------------------------------------------------------------------------------
1 | (* Opaque matching done in ArraySlice.sml *)
2 | structure VectorSlice :> VECTOR_SLICE =
3 | TableSlice(type 'a table = 'a vector
4 | val maxLen = Vector.maxLen
5 | type 'a vector_slice = 'a vector * int * int
6 | val vector_slice_base = fn x => x)
7 |
--------------------------------------------------------------------------------
/js/codemirror/Makefile:
--------------------------------------------------------------------------------
1 | clean:
2 | rm -rf sml/*~ sml/MLB
3 | rm -rf *~
4 | rm -rf dist/*~ dist/contrib/*~ dist/css/*~ dist/js/*~ dist/contrib/sml/*~ dist/contrib/sml/css/*~ dist/contrib/sml/js/*~
5 | rm -rf dist/contrib/fundamental/*~ dist/contrib/fundamental/css/*~ dist/contrib/fundamental/js/*~
--------------------------------------------------------------------------------
/test/explicit_regions/er10.sml.log.ok:
--------------------------------------------------------------------------------
1 | [reading source file: er10.sml]
2 | > infix 0 +
3 | val f : unit -> real
4 | er10.sml, line 6, column 11:
5 | let with r
6 | ^
7 | Explicit region variable `r has insufficient scope.
8 | Stopping compilation of MLB-file due to error (code 1).
9 |
--------------------------------------------------------------------------------
/test/explicit_regions/er14.sml:
--------------------------------------------------------------------------------
1 | (* It is an error to give multiple explicit regions to ref *)
2 |
3 | infix +
4 | fun !(x: 'a ref): 'a = prim ("!", x)
5 |
6 | fun f () : int =
7 | let with r
8 | val x = ref`[r r] 8
9 | val y = ref`r 9
10 | in !x + !y
11 | end
12 |
--------------------------------------------------------------------------------
/test/explicit_regions/er8.sml:
--------------------------------------------------------------------------------
1 | (* it is an error to unify a local region with a
2 | * region parameter *)
3 |
4 | infix +
5 | fun f `[r1] () : real =
6 | let with r2
7 | val z = 8.0`r1
8 | val y = if true then 3.4`r2
9 | else z
10 | in 2.0 + y
11 | end
12 |
--------------------------------------------------------------------------------
/test/explicit_regions/funty1.sml:
--------------------------------------------------------------------------------
1 | (* A local function can be forced to have toplevel effect *)
2 |
3 | infix +
4 | fun printNum (i:int) : unit = prim("printNum", i)
5 |
6 | val x =
7 | let val f : int #e0->int = fn x => x+8
8 | in f 3
9 | end
10 |
11 | val () = printNum x
12 |
--------------------------------------------------------------------------------
/js/basis/VectorSlice.sml:
--------------------------------------------------------------------------------
1 | (* Opaque matching done in ArraySlice.sml *)
2 | structure VectorSlice :> VECTOR_SLICE =
3 | TableSlice(type 'a table = 'a vector
4 | val maxLen = Vector.maxLen
5 | type 'a vector_slice = 'a vector * int * int
6 | val vector_slice_base = fn x => x)
7 |
--------------------------------------------------------------------------------
/js/test/tdom_ex1.sml:
--------------------------------------------------------------------------------
1 |
2 | open TimeVal
3 | open TDom
4 | infix &
5 |
6 | val _ = print ""
7 |
8 | val a = h1($(arr Time.toString (timer 100))) & h1($(arr (fn (x,y) => Int.toString x ^ " - " ^ Int.toString y) (mouse())))
9 |
10 | val _ = insertDOM "bdy" a
11 |
--------------------------------------------------------------------------------
/test/explicit_regions/expty2.sml:
--------------------------------------------------------------------------------
1 | (* A locally generated function that is returned can be stored in a passed region *)
2 |
3 | infix +
4 | fun printNum (i:int) : unit = prim("printNum", i)
5 |
6 | fun g `[r] (a:int) : (int->int)`r =
7 | fn x => #1(x+2,a)
8 |
9 | val () = printNum ((g 6) 8)
10 |
--------------------------------------------------------------------------------
/test/real_match.sml:
--------------------------------------------------------------------------------
1 | local
2 | fun print (s:string) : unit = prim("printStringML", s)
3 | datatype t = A of real | B
4 | fun pp p = case p of
5 | A _ => "OK\n"
6 | | B => "ERR\n"
7 | in
8 | val () = print "test: "
9 | val b = A 1.0
10 | val () = print (pp b)
11 | end
12 |
--------------------------------------------------------------------------------
/src/Pickle/Makefile:
--------------------------------------------------------------------------------
1 | FILES=$(shell ls -1 *.sml *.sig *.mlb Makefile ../../doc/license/copyright.att)
2 |
3 | clean:
4 | rm -rf MLB *~ *.log pickle pickle.tgz
5 |
6 | tgz:
7 | rm -rf pickle pickle.tgz
8 | mkdir pickle
9 | cp $(FILES) pickle/
10 | tar czvf pickle.tgz pickle
11 | rm -rf pickle
12 |
--------------------------------------------------------------------------------
/src/Tools/ml-yacc/examples/fol/sources.cm:
--------------------------------------------------------------------------------
1 | Group is
2 |
3 | #if defined (NEW_CM)
4 | $/basis.cm
5 | $/ml-yacc-lib.cm
6 | #else
7 | ml-yacc-lib.cm
8 | #endif
9 |
10 | fol.lex
11 | fol.grm
12 |
13 | absyn.sml
14 |
15 | interface.sml
16 |
17 | parse.sml
18 | link.sml
19 |
20 |
21 |
--------------------------------------------------------------------------------
/test/explicit_regions/er8.sml.log.ok:
--------------------------------------------------------------------------------
1 | [reading source file: er8.sml]
2 | > infix 0 +
3 | val f : unit -> real
4 | er8.sml, line 5, column 6:
5 | fun f `[r1] () : real =
6 | ^^^^^
7 | Cannot unify the explicit region variables `r1 and `r2
8 | Stopping compilation of MLB-file due to error (code 1).
9 |
--------------------------------------------------------------------------------
/test/arr2a.sml:
--------------------------------------------------------------------------------
1 |
2 | local
3 | val a = Array2.array (100,10,23)
4 | fun set(r,c,v) = Array2.update(a,r,c,v)
5 | fun get(r,c) = Array2.sub(a,r,c)
6 | val () = set(5,8,24)
7 | val () = print (Int.toString (get (50,7)) ^ "\n")
8 | val () = print (Int.toString (get (5,8)) ^ "\n")
9 | in
10 | end
11 |
--------------------------------------------------------------------------------
/test/explicit_regions/er9.sml.log.ok:
--------------------------------------------------------------------------------
1 | [reading source file: er9.sml]
2 | > infix 0 +
3 | val f : unit -> real
4 | er9.sml, line 4, column 6:
5 | fun f `[r1 r2] () : real =
6 | ^^^^^^^^
7 | Cannot unify the explicit region variables `r1 and `r2
8 | Stopping compilation of MLB-file due to error (code 1).
9 |
--------------------------------------------------------------------------------
/test/type_sharing.sml:
--------------------------------------------------------------------------------
1 |
2 | (* The following two signatures should elaborate *)
3 |
4 | signature S1 =
5 | sig
6 | type t
7 | sharing type t = t
8 | end where type t = int
9 |
10 | signature S2 =
11 | sig
12 | type t
13 | sharing type t = t
14 | sharing type t = t
15 | end
16 |
--------------------------------------------------------------------------------
/test_dev/f64_2.sml:
--------------------------------------------------------------------------------
1 | infix 7 * / div mod
2 | infix 6 + -
3 | infix 4 = <> > >= < <=
4 |
5 | fun f (a,b,c:real,d,e,f,g,h,i,j,k,l) = a * b - c + d*e+f*g+i*j+k*l
6 |
7 | fun printReal (n:real):unit = prim("printReal",n)
8 |
9 | val () = printReal (f(5.0,2.0,3.0, 1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0))
10 |
--------------------------------------------------------------------------------
/src/Common/AllInfo.sml:
--------------------------------------------------------------------------------
1 | structure AllInfo: ALL_INFO =
2 | struct
3 | structure SourceInfo = SourceInfo
4 | structure DFInfo = DFInfo
5 | structure ParseInfo = ParseInfo
6 | structure ErrorInfo = ErrorInfo
7 | structure OverloadingInfo = OverloadingInfo
8 | structure ElabInfo = ElabInfo
9 | end
10 |
--------------------------------------------------------------------------------
/src/Common/ERROR_TRAVERSE.sml:
--------------------------------------------------------------------------------
1 | signature ERROR_TRAVERSE =
2 | sig
3 | structure ErrorCode : ERROR_CODE
4 |
5 | type topdec
6 | type Report
7 |
8 | datatype result = SUCCESS
9 | | FAILURE of Report * ErrorCode.ErrorCode list
10 |
11 | val traverse: topdec -> result
12 | end;
13 |
--------------------------------------------------------------------------------
/src/Common/SMLofNJOnKit.sml:
--------------------------------------------------------------------------------
1 | structure SMLofNJ =
2 | struct
3 | structure SysInfo =
4 | struct
5 | fun getHostArch() = "X86"
6 | fun getOSName() = "Linux"
7 | (* fun getOSName() = "BSD" *)
8 | end
9 | fun exportFn(kitbinkit_path,kitexe) = print "SMLofNJ.exportFn not implemented"
10 | end
--------------------------------------------------------------------------------
/src/Tools/Benchmark/KitBench.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 | ../Tester/info.mlb
4 | ../Tester/TestFile.sml
5 | MemTime.sml
6 | COMPILE.sml
7 | CompileSMLNJ.sml
8 | (* CompileSMLNJ-110.40.sml *)
9 | CompileMLKIT.sml
10 | CompileMLTON.sml
11 | in
12 | Benchmark.sml
13 | end
14 |
--------------------------------------------------------------------------------
/test/datatypes.sml.out.ok:
--------------------------------------------------------------------------------
1 | Testing datatypes and unboxing schemes...
2 | test1a OK
3 | test1b OK
4 | test1c OK
5 | test1d OK
6 | test1e OK
7 | test2a OK
8 | test2b OK
9 | test2c OK
10 | test3a OK
11 | test3b OK
12 | test3c OK
13 | test3d OK
14 | test3e OK
15 |
--------------------------------------------------------------------------------
/test/explicit_regions/err_expty3.sml.log.ok:
--------------------------------------------------------------------------------
1 | [reading source file: err_expty3.sml]
2 | > val f : unit -> int -> int
3 | err_expty3.sml, line 5, column 17:
4 | let with r
5 | ^
6 | Explicit region variable `r has insufficient scope.
7 | Stopping compilation of MLB-file due to error (code 1).
8 |
--------------------------------------------------------------------------------
/test_dev/f64_simple1.sml:
--------------------------------------------------------------------------------
1 | infix 7 * / div mod
2 | infix 6 + -
3 | infix 4 = <> > >= < <=
4 |
5 | val a = (1.0,2.0,3.0)
6 | val b = (4.0,5.0,6.0)
7 |
8 | fun f () =
9 | #1(a) - #2(b)
10 | (* 1 - 5 = -4 *)
11 |
12 | fun printReal (n:real):unit = prim("printReal",n)
13 | val () = printReal (f())
14 |
--------------------------------------------------------------------------------
/js/test/listpair.html.out.ok:
--------------------------------------------------------------------------------
1 | Loading listpair.html
2 | File listpair.sml: Testing structure ListPair...
3 |
4 | test1 OK
5 | test2a OK
6 | test2b OK
7 | test3a OK
8 | checkv OK
9 | checkv OK
10 | test5a OK
11 | test5b OK
12 | test5c OK
13 | checkv OK
14 | checkv OK
15 | test6 OK
16 | test7 OK
17 | Test ended.
18 |
--------------------------------------------------------------------------------
/test/explicit_regions/effty1.sml.log.ok:
--------------------------------------------------------------------------------
1 | [reading source file: effty1.sml]
2 | > val f : int -> int
3 | val printNum : int -> unit
4 | effty1.sml, line 6, column 13:
5 | let with e
6 | ^
7 | Explicit effect variable `e has insufficient scope.
8 | Stopping compilation of MLB-file due to error (code 1).
9 |
--------------------------------------------------------------------------------
/test/rank.sml:
--------------------------------------------------------------------------------
1 | local
2 | val f = let val f = (fn x => x) (fn x => x)
3 | in f
4 | end
5 |
6 | datatype t = A
7 |
8 | val g = fn x => let val d = #1 x
9 | val k = #2 x
10 | val s = f (d,k)
11 | val _ = if true then (d,k) else x
12 | in s
13 | end
14 | in
15 | val a : t * t = g (A,A)
16 | end
--------------------------------------------------------------------------------
/test_dev/ref.sml:
--------------------------------------------------------------------------------
1 | let
2 | fun print (s:string) : unit = prim("printStringML", s)
3 | fun !(x: 'a ref): 'a = prim ("!", x)
4 | infix 3 := o
5 | fun (x: 'a ref) := (y: 'a): unit = prim (":=", (x, y))
6 | val r = ref "Hej med dig"
7 | in
8 | print (!r);
9 | r := "Hej igen";
10 | print (!r)
11 | end
12 |
--------------------------------------------------------------------------------
/src/Tools/Rp2ps/Alloc.h:
--------------------------------------------------------------------------------
1 | #ifndef ALLOC
2 | #define ALLOC
3 |
4 | #include "Types.h"
5 |
6 | void *xrealloc(void *p, int n);
7 | void* xmalloc(int n);
8 | char* MallocString(char *s);
9 | SAMPLEPTR MallocSample(void);
10 | void FreeSample(SAMPLEPTR s);
11 | ENTRYPTR MallocEntry(void);
12 |
13 | #endif /* ALLOC */
14 |
--------------------------------------------------------------------------------
/test/explicit_regions/er3.sml.log.ok:
--------------------------------------------------------------------------------
1 | [reading source file: er3.sml]
2 | > val f : unit -> int
3 | er3.sml, line 7, column 25:
4 | in #1 (4, a, "hi there"`r1)
5 | ^^^
6 | Mismatching region types s and T for explicit region variable `r1
7 | Stopping compilation of MLB-file due to error (code 1).
8 |
--------------------------------------------------------------------------------
/test/explicit_regions/err_ty1.sml.log.ok:
--------------------------------------------------------------------------------
1 | [reading source file: err_ty1.sml]
2 | > val x : string
3 | err_ty1.sml, line 6, column 22:
4 | in (a 3) : string`e
5 | ^
6 | Expects explicit region variable but e is an explicit effect variable
7 | Stopping compilation of MLB-file due to error (code 1).
8 |
--------------------------------------------------------------------------------
/test/listpair.sml.out.ok:
--------------------------------------------------------------------------------
1 |
2 | File listpair.sml: Testing structure ListPair...
3 | test1 OK
4 | test2a OK
5 | test2b OK
6 | test3a OK
7 | checkv OK
8 | checkv OK
9 | test5a OK
10 | test5b OK
11 | test5c OK
12 | checkv OK
13 | checkv OK
14 | test6 OK
15 | test7 OK
16 |
--------------------------------------------------------------------------------
/test_dev/p1.sml:
--------------------------------------------------------------------------------
1 | val () =
2 | let
3 | (* infix -
4 | infix 3 := o
5 |
6 | fun printNum (i:int) : unit = prim("printNum", "printNum", i)
7 | fun f 0 = printNum free
8 | | f n = (printNum n;f (n-1))
9 | *)
10 | fun print (s:string) : unit = prim("printStringML", s)
11 | in
12 | print "Hello\n"
13 | end
14 |
--------------------------------------------------------------------------------
/basis/web/WEB_MIME.sml:
--------------------------------------------------------------------------------
1 | signature WEB_MIME = sig
2 | val getMime : string -> string
3 | val addEncoding : string -> string
4 | end
5 | (*
6 | [getMime s] returns the mime-type of the file s based on the file's
7 | extension and it's content.
8 |
9 | [addEncoding s] adds configured encoding to mime-type s.
10 | *)
11 |
--------------------------------------------------------------------------------
/js/appfun/AppFun2.mlb:
--------------------------------------------------------------------------------
1 | local $(SML_LIB)/basis/basis.mlb
2 | $(SML_LIB)/basis/js.mlb
3 | $(SML_LIB)/codemirror/sml/codemirror.mlb
4 | $(SML_LIB)/basis/dojo.mlb
5 | $(SML_LIB)/basis/md5.mlb
6 | oauth.mlb
7 | json.mlb
8 | dropbox.sig
9 | dropbox.sml
10 | in AppFun2.sml
11 | end
12 |
--------------------------------------------------------------------------------
/src/Common/KitX64.sml:
--------------------------------------------------------------------------------
1 |
2 | structure K =
3 | let structure KC = KitCompiler(ExecutionX64)
4 | val _ = Flags.turn_on "garbage_collection"
5 | val () = List.app Flags.block_entry
6 | ["export_basis_js",
7 | "equalelim_opt_unboxed"]
8 | in KitMain(KC)
9 | end
10 |
--------------------------------------------------------------------------------
/src/Common/PostElabGrammar.sml:
--------------------------------------------------------------------------------
1 | structure PostElabDecGrammar =
2 | DecGrammar(struct
3 | type GrammarInfo = AllInfo.ElabInfo.ElabInfo
4 | val bogus_info = AllInfo.ElabInfo.from_ParseInfo PreElabDecGrammar.bogus_info
5 | end)
6 |
7 | structure PostElabTopdecGrammar =
8 | TopdecGrammar(PostElabDecGrammar)
9 |
--------------------------------------------------------------------------------
/src/Manager/MODCODE_MINI.sml:
--------------------------------------------------------------------------------
1 | signature MODCODE_MINI = sig
2 | type modcode
3 | type linkinfo
4 | type target
5 | val seq : modcode * modcode -> modcode
6 | val empty : modcode
7 | val mk_modcode : target * linkinfo * string -> modcode
8 | val emit : ModuleEnvironments.absprjid * modcode -> modcode
9 | end
10 |
--------------------------------------------------------------------------------
/src/Pickle/PACK_REAL.sml:
--------------------------------------------------------------------------------
1 | (*
2 | * Copyright, Martin Elsman 2003-01-07
3 | * GPL Licence
4 | *)
5 |
6 | signature PACK_REAL =
7 | sig
8 | type real
9 | val bytesPerElem : int
10 | val isBigEndian : bool
11 | val toBytes : real -> Word8Vector.vector
12 | val fromBytes : Word8Vector.vector -> real
13 | end
14 |
--------------------------------------------------------------------------------
/js/test/vector.html.out.ok:
--------------------------------------------------------------------------------
1 | Loading vector.html
2 | File vector.sml: Testing Vector...
3 |
4 | test1: OK
5 | test2: OK
6 | test3: OK
7 | test4a: OK
8 | test4b: OK
9 | test4c: OK
10 | test5: OK
11 | test6a: OK
12 | test6b: OK
13 | test6c: OK
14 | test7: OK
15 | test8: OK
16 | test10a: OK
17 | test11a: OK
18 |
19 | Test ended
20 |
--------------------------------------------------------------------------------
/test/.gitignore:
--------------------------------------------------------------------------------
1 | *.log
2 | *.out
3 | *.stderr
4 | MLB
5 | hardlinkA
6 | hardlinkB
7 | testbadl
8 | testcycl
9 | testlink
10 | runexe
11 | KITtimings
12 | KITversion
13 | TESTmessages
14 | test_report*.html
15 | textio.tmp
16 | small1.dat
17 | small2.dat
18 | empty.dat
19 | medium.dat
20 | text.dat
21 | outFuhMishra?
22 | ray/output
--------------------------------------------------------------------------------
/test/rank.sml.log.ok:
--------------------------------------------------------------------------------
1 |
2 |
3 | ********** rank.sml *************
4 |
5 |
6 | rank.sml, line 15, column 16:
7 | val a : t * t = g (A,A)
8 | ^^^^^^^
9 | Type rank error,
10 | expecting: t * t -> t * t
11 | found: 'a * 'b -> 'a * 'b
12 | The generative type t is newer than the free type variable 'a.
13 |
--------------------------------------------------------------------------------
/test_dev/list_nh.out.ok:
--------------------------------------------------------------------------------
1 | Num: 1
2 | ::Num: 2
3 | ::Num: 3
4 | ::Num: 4
5 | ::Num: 5
6 | ::[]
7 | str1::str2::str3::str4::str5::[]
8 | Num: 1
9 | ::Num: 2
10 | ::Num: 3
11 | ::Num: 4
12 | ::Num: 5
13 | ::[]
14 | intOK5
15 | strOK5
16 | datatypeOKniels
17 | Martin Elsman datatypeOKmartin
18 | noname OK
19 | true OK
20 | false OK
21 |
--------------------------------------------------------------------------------
/doc/manual/README:
--------------------------------------------------------------------------------
1 | This is "Programming with Regions in the MLKit", the user's guide to
2 | the MLKit.
3 |
4 | Style conventions:
5 | ------------------
6 |
7 | Profile graphs should be produced with the -eps 138mm option to rp2ps.
8 |
9 | We use the series comma.
10 |
11 | Pdf-version
12 | -----------
13 |
14 | See Makefile
15 |
--------------------------------------------------------------------------------
/src/Common/TYVAR.sig:
--------------------------------------------------------------------------------
1 | (* Explicit type variables *)
2 |
3 | signature TYVAR =
4 | sig
5 | eqtype SyntaxTyVar
6 |
7 | val mk_TyVar: string -> SyntaxTyVar (* NEW PARSER *)
8 | and pr_tyvar: SyntaxTyVar -> string
9 |
10 | val isEquality: SyntaxTyVar -> bool
11 |
12 | val pu : SyntaxTyVar Pickle.pu
13 | end;
14 |
--------------------------------------------------------------------------------
/src/Tools/Benchmark/Makefile:
--------------------------------------------------------------------------------
1 | BINDIR=../../../bin
2 | TARGET=kitbench
3 |
4 | include ../../../Makefiledefault
5 |
6 | $(BINDIR)/$(TARGET): $(TARGET)
7 | cp $(TARGET) $(BINDIR)/$(TARGET)
8 |
9 | $(TARGET): KitBench.mlb Makefile *.sml
10 | $(MLCOMP) -output $(TARGET) KitBench.mlb
11 |
12 | clean:
13 | rm -rf MLB *~ $(TARGET)
14 |
--------------------------------------------------------------------------------
/js/test/fix2.html.out.ok:
--------------------------------------------------------------------------------
1 | Loading fix2.html
2 | Testing mutual recursion
3 |
4 | Testing mutual recursion toplevel
5 |
6 | Ok - even...
7 | Ok - not even...
8 | Ok - odd...
9 | Ok - not odd...
10 | Testing mutual recursion local
11 |
12 | Ok - even...
13 | Ok - not even...
14 | Ok - odd...
15 | Ok - not odd...
16 |
17 | End of test.
18 |
--------------------------------------------------------------------------------
/src/Common/FunId.sml:
--------------------------------------------------------------------------------
1 | (* Functor identifiers *)
2 |
3 | structure FunId :> FUNID =
4 | struct
5 | type funid = string
6 |
7 | fun mk_FunId x = x
8 | fun pr_FunId x = x
9 |
10 | val op < = fn (str1:string, str2) => str1 < str2
11 |
12 | val pu = Pickle.string
13 |
14 | structure Map = StringFinMap
15 | end
16 |
--------------------------------------------------------------------------------
/test/explicit_regions/er11.sml:
--------------------------------------------------------------------------------
1 | (* it is an error for a value in an explicit local
2 | * region to escape; here r must be live as long as
3 | * the closure can be called *)
4 |
5 | fun f `[r] () : unit -> real =
6 | let with r
7 | val y = if true then (3.4,3)`r else (2.0,3)
8 | in fn () => if true then #1 y else 5.0
9 | end
10 |
--------------------------------------------------------------------------------
/test/explicit_regions/er6.sml.log.ok:
--------------------------------------------------------------------------------
1 | [reading source file: er6.sml]
2 | > val ! : 'a ref -> 'a
3 | val f : unit -> real
4 | val x : real ref
5 | er6.sml, line 8, column 6:
6 | fun f `[r] () : real =
7 | ^^^^
8 | Explicit region variable `r has insufficient scope.
9 | Stopping compilation of MLB-file due to error (code 1).
10 |
--------------------------------------------------------------------------------
/test_dev/eqdat.sml:
--------------------------------------------------------------------------------
1 | fun print (s:string) : unit = prim("printStringML", "printStringML", s)
2 |
3 | val _ =
4 | let
5 | val _ = print "Start...\n"
6 | datatype k = A of int * string
7 |
8 | val k1 = A(5,"hej")
9 |
10 | in
11 | case k1 of
12 | A(i,s) => (print s) ;
13 | print "End\n"
14 | end
15 |
--------------------------------------------------------------------------------
/test_dev/xinlB.sml:
--------------------------------------------------------------------------------
1 |
2 | fun printNum (i:int) : unit = prim("printNum", i)
3 |
4 | val () = printNum(incr())
5 | val () = printNum(incr())
6 |
7 | fun iota n = if n <= 0 then [] else iota(n-1) @ [n]
8 | fun repl a n = if n <= 0 then [] else a :: repl a (n-1)
9 |
10 | val ys = scan (op +) 0 (iota 10)
11 |
12 | val _ = map printNum ys
13 |
--------------------------------------------------------------------------------
/src/Common/SigId.sml:
--------------------------------------------------------------------------------
1 | (* Signature identifiers *)
2 |
3 | structure SigId :> SIGID =
4 | struct
5 | type sigid = string
6 |
7 | fun mk_SigId x = x
8 | fun pr_SigId x = x
9 |
10 | val op < = fn (str1:string, str2) => str1 < str2
11 |
12 | val pu = Pickle.string
13 |
14 | structure Map = StringFinMap
15 | end
16 |
--------------------------------------------------------------------------------
/test/explicit_regions/con1.sml:
--------------------------------------------------------------------------------
1 | (* Con1 can be allocated in explicit regions *)
2 |
3 | datatype t = A of int | B (* t is boxed, which means that B and A are allocated *)
4 |
5 | fun f () : int =
6 | let with r
7 | val x = if true then B else A`r 9
8 | in case x of
9 | B => 1
10 | | A a => a
11 | end
12 |
--------------------------------------------------------------------------------
/test/explicit_regions/err_patty1.sml.log.ok:
--------------------------------------------------------------------------------
1 | [reading source file: err_patty1.sml]
2 | > val a : int * int
3 | err_patty1.sml, line 5, column 20:
4 | val a : (int * int)`r0top = (4,6)
5 | ^^^^^
6 | Explicit region variable r0top is of type T and cannot also be of type p
7 | Stopping compilation of MLB-file due to error (code 1).
8 |
--------------------------------------------------------------------------------
/test/pat.sml.log.ok:
--------------------------------------------------------------------------------
1 |
2 |
3 | ********** pat.sml *************
4 |
5 | > val f : 'a -> 'a
6 | val hd : 'a -> 'a * 'a
7 | val s : string
8 | val tail : ('a -> 'a * 'a) list
9 | *** Warnings ***
10 | pat.sml, line 2, column 4:
11 | val (f, hd::tail) = (fn x => x, [fn y => (y,y)])
12 | ^^^^^^^^^^^^^
13 | Pattern not exhaustive.
14 |
--------------------------------------------------------------------------------
/test_dev/floor.sml:
--------------------------------------------------------------------------------
1 | fun print (s:string) : unit = prim("printStringML", "printStringML", s)
2 |
3 | fun getCtx () : foreignptr = prim("__get_ctx",())
4 | fun floor (x : real) : int = prim ("floorFloat", "floorFloat", (getCtx(),x)) (* may raise Overflow *)
5 | val _ = floor (23.0E23) handle Overflow => 4
6 | val _ = print "End\n";
7 |
--------------------------------------------------------------------------------
/test_dev/rev.sml:
--------------------------------------------------------------------------------
1 | let
2 | infix ::
3 | fun printList (l:int list) : unit = prim("printList", "printList", l)
4 |
5 | fun revAcc [] ys = ys
6 | | revAcc (x::xs) ys = revAcc xs (x::ys)
7 |
8 | val l = [1,2]
9 |
10 | val _ = printList l
11 |
12 | val l2 = revAcc l []
13 |
14 | val _ = printList l2
15 |
16 | in ()
17 | end
--------------------------------------------------------------------------------
/kitdemo/PolySet.sml:
--------------------------------------------------------------------------------
1 | structure PolySet =
2 | struct
3 | type 'a set = 'a list
4 | val empty = []
5 | fun singleton x = [x]
6 | fun mem(x,[]) = false
7 | | mem(x,y::ys) = x=y orelse mem(x,ys)
8 | fun union(s1,[]) = s1
9 | | union(s1,x::s2) = if mem(x,s1) then union(s1,s2)
10 | else x::union(s1,s2)
11 | end
12 |
--------------------------------------------------------------------------------
/kitlib/CRASH.sig:
--------------------------------------------------------------------------------
1 | (* CRASH signature: used for internal consistency errors and so on. *)
2 | signature CRASH =
3 | sig
4 | val assert: (string * bool) -> unit
5 | val impossible: string -> 'a
6 | val unimplemented: string -> 'a
7 |
8 | exception CRASH (* So we can catch it and reenter
9 | at top-level. *)
10 | end
11 |
--------------------------------------------------------------------------------
/src/Common/KitSmlserver.sml:
--------------------------------------------------------------------------------
1 | structure Compiler = KitCompiler(ExecutionKAM)
2 | val _ =
3 | Flags.turn_off "garbage_collection";
4 | Flags.turn_off "cross_module_opt"; (* better module reuse *)
5 | Flags.turn_on "quotation"; (* support for quotation-antiquotation *)
6 | Flags.SMLserver := true;
7 |
8 | structure K = KitMain(Compiler)
9 |
--------------------------------------------------------------------------------
/src/Common/test/IntFinMapPT_Test.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 | ../../Pickle/pickle.mlb
4 | ../REPORT.sig
5 | ../Report.sml
6 | ../PRETTYPRINT.sig
7 | ../PrettyPrint.sml
8 | ../MONO_FINMAP.sml
9 | ../IntFinMapPT.sml
10 | in
11 | IntFinMapPT_Test.sml
12 | end
13 |
--------------------------------------------------------------------------------
/src/Edlib/edlib.mlb:
--------------------------------------------------------------------------------
1 | local
2 | $(SML_LIB)/basis/basis.mlb
3 | EDLIB_GENERAL.sml EdlibGeneral.sml
4 | LIST.sml (*List.sml *) edList.sml
5 | EQ_SET.sml SET.sig
6 | LIST_PAIR.sml (*ListPair.sml*) edListPair.sml LIST_SORT.sml
7 | in
8 | ListSort.sml
9 | Set.sml
10 | EqSet.sml
11 | ORDERING.sml
12 | (* Edlib.sml *)
13 | end
14 |
--------------------------------------------------------------------------------
/test/elabDecBug.sml.log.ok:
--------------------------------------------------------------------------------
1 |
2 |
3 | ********** elabDecBug.sml *************
4 |
5 |
6 | elabDecBug.sml, line 2, column 4:
7 | fun f ([]:pair list) = "Hi There"
8 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9 | and f (xs as x::_ : pair list) = "Hi There again"
10 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 | Repeated identifier f.
12 |
--------------------------------------------------------------------------------
/test/explicit_regions/con0.sml:
--------------------------------------------------------------------------------
1 | (* Con0 can be allocated in explicit regions *)
2 |
3 | datatype t = A of int | B (* t is boxed, which means that B and A are allocated *)
4 |
5 | fun f () : int =
6 | let with r
7 | val x = if true then B`[r] else A 9
8 | in case x of
9 | B => 1
10 | | A a => a
11 | end
12 |
--------------------------------------------------------------------------------
/test/explicit_regions/er12.sml.log.ok:
--------------------------------------------------------------------------------
1 | [reading source file: er12.sml]
2 | > infix 0 +
3 | val f : unit -> real
4 | val g : unit -> real
5 | er12.sml, line 7, column 22:
6 | in 0.0 + f `[r3] ()
7 | ^^^^^
8 | Explicit region variable `r3 not in scope
9 | Stopping compilation of MLB-file due to error (code 1).
10 |
--------------------------------------------------------------------------------
/test/explicit_regions/er17.sml.log.ok:
--------------------------------------------------------------------------------
1 | [reading source file: er17.sml]
2 | > datatype t
3 | con A : int -> t
4 | con B : t
5 | val f : unit -> int
6 | er17.sml, line 6, column 13:
7 | let with r
8 | ^
9 | Cannot unify the explicit region variables `r and `r0
10 | Stopping compilation of MLB-file due to error (code 1).
11 |
--------------------------------------------------------------------------------
/basis/Text.sml:
--------------------------------------------------------------------------------
1 | structure Text : TEXT =
2 | struct
3 | structure Char = Char
4 | structure String = String
5 | structure Substring = Substring
6 | structure CharVector = CharVector
7 | structure CharArray = CharArray
8 | structure CharVectorSlice = CharVectorSlice
9 | structure CharArraySlice = CharArraySlice
10 | end
11 |
--------------------------------------------------------------------------------
/doc/manual/Makefile:
--------------------------------------------------------------------------------
1 | all: mlkit.pdf
2 |
3 | mlkit.pdf: mlkit.tex Makefile sml.tex
4 | pdflatex mlkit
5 | bibtex mlkit
6 | pdflatex mlkit
7 | pdflatex mlkit
8 | makeindex mlkit
9 | pdflatex mlkit
10 | pdflatex mlkit
11 |
12 | clean:
13 | rm -rf *~ auto *.ind *.log *.idx *.aux *.dvi *.toc *.info *.ilg *.blg .xvpics *.bbl *.out .\#* mlkit.pdf
14 |
--------------------------------------------------------------------------------
/js/basis/Text.sml:
--------------------------------------------------------------------------------
1 | structure Text : TEXT =
2 | struct
3 | structure Char = Char
4 | structure String = String
5 | structure Substring = Substring
6 | structure CharVector = CharVector
7 | structure CharArray = CharArray
8 | structure CharVectorSlice = CharVectorSlice
9 | structure CharArraySlice = CharArraySlice
10 | end
11 |
--------------------------------------------------------------------------------
/test/explicit_regions/er17.sml:
--------------------------------------------------------------------------------
1 | (* Con1 can be allocated in explicit regions *)
2 |
3 | datatype t = A of int | B (* t is boxed, which means that B and A are allocated *)
4 |
5 | fun f `r0 () : int =
6 | let with r
7 | val x = if true then B`r0 else A`r 9
8 | in case x of
9 | B => 1
10 | | A a => a
11 | end
12 |
--------------------------------------------------------------------------------
/test/explicit_regions/er7.sml.log.ok:
--------------------------------------------------------------------------------
1 | [reading source file: er7.sml]
2 | > infix 0 +
3 | val ! : 'a ref -> 'a
4 | val f : unit -> real
5 | val x : real ref
6 | er7.sml, line 10, column 11:
7 | let with r2
8 | ^^
9 | Explicit region variable `r2 has insufficient scope.
10 | Stopping compilation of MLB-file due to error (code 1).
11 |
--------------------------------------------------------------------------------
/test/explicit_regions/err_expty1.sml.log.ok:
--------------------------------------------------------------------------------
1 | [reading source file: err_expty1.sml]
2 | > val a : int * int
3 | err_expty1.sml, line 3, column 28:
4 | val a = (4,6) : (int * int)`r0top
5 | ^^^^^
6 | Explicit region variable r0top is of type T and cannot also be of type p
7 | Stopping compilation of MLB-file due to error (code 1).
8 |
--------------------------------------------------------------------------------
/test/explicit_regions/expty1.sml:
--------------------------------------------------------------------------------
1 | (* A local function can be forced into a global region *)
2 |
3 | infix +
4 | fun printNum (i:int) : unit = prim("printNum", i)
5 |
6 | val x : int =
7 | let with r
8 | val t = 3.0 + 4.0
9 | val f : (int->int)`r0top = fn x => #1(x+2,t)
10 | in f 4
11 | end
12 |
13 | val () = printNum x
14 |
--------------------------------------------------------------------------------
/test_dev/strs.sml:
--------------------------------------------------------------------------------
1 | infix ^
2 | fun implode (chars : char list) : string = prim ("implodeCharsML", chars)
3 | fun (s : string) ^ (s' : string) : string = prim ("concatStringML", (s, s'))
4 | fun print (x : string) : unit = prim ("printStringML", x)
5 |
6 | val _ = print ("Hello " ^ " You world " ^ "1" ^ "2\n")
7 | val _ = print (implode [#"a",#"b",#"e"] ^ "\n")
8 |
--------------------------------------------------------------------------------
/test/explicit_regions/err_funty1.sml.log.ok:
--------------------------------------------------------------------------------
1 | [reading source file: err_funty1.sml]
2 | > val f : unit -> int * int
3 | err_funty1.sml, line 5, column 23:
4 | fun f () : (int * int)`r0top = (4,6)
5 | ^^^^^
6 | Explicit region variable r0top is of type T and cannot also be of type p
7 | Stopping compilation of MLB-file due to error (code 1).
8 |
--------------------------------------------------------------------------------
/test/tak.sml:
--------------------------------------------------------------------------------
1 | fun tak (x,y,z) =
2 | if not (y < x)
3 | then z
4 | else tak (tak (x - 1, y, z),
5 | tak (y - 1, z, x),
6 | tak (z - 1, x, y))
7 |
8 | val rec f =
9 | fn 0 => ()
10 | | n => (tak (18,12,6); f (n-1))
11 |
12 | structure Main =
13 | struct
14 | fun doit () = f 5000
15 | end
16 |
17 | val _ = Main.doit()
--------------------------------------------------------------------------------
/test_dev/f1.sml:
--------------------------------------------------------------------------------
1 | let
2 | infix -
3 | infix 3 := o
4 | fun !(x: 'a ref): 'a = prim ("!", x)
5 | fun print (s:string) : unit = prim("printStringML", s)
6 |
7 | fun printNum (i:int) : unit = prim("printNum", i)
8 | val r = ref 42
9 | val free = !r
10 | fun f 0 = printNum free
11 | | f n = (printNum n;f (n-1))
12 | in
13 | f 10
14 | end
15 |
--------------------------------------------------------------------------------
/test_dev/f64_simple.sml:
--------------------------------------------------------------------------------
1 | infix 7 * / div mod
2 | infix 6 + -
3 | infix 4 = <> > >= < <=
4 |
5 | val a = (1.0,2.0,3.0)
6 | val b = (4.0,5.0,6.0)
7 |
8 | fun f () =
9 | #1(a) * #2(a) + #3(b) * #3(a) + #1(b) - #2(b)
10 | (* 1 * 2 + 6 * 3 + 4 - 5 = 19 *)
11 |
12 | fun printReal (n:real):unit = prim("printReal",n)
13 | val () = printReal (f())
14 |
--------------------------------------------------------------------------------
/js/otests/content:
--------------------------------------------------------------------------------
1 | Examples=github.sml,life.sml,war.sml;
2 | Simple=fac.sml;
3 | Utests=array.sml,array2.sml,arrayslice.sml,bytechar.sml,date.sml,general.sml,int.sml,int31.sml,int32.sml,list.sml,listpair.sml,math.sml,
4 | real.sml,string.sml,stringcvt.sml,testdyn1.sml,time.sml,vector.sml,vectorslice.sml;
5 | Reactive=frp.sml,sheeps.sml,showtime.sml,svgballs.sml;
6 |
--------------------------------------------------------------------------------
/src/Common/ERROR_CODE.sml:
--------------------------------------------------------------------------------
1 |
2 | signature ERROR_CODE = (* Support for error testing. *)
3 | sig
4 | type ErrorCode and ErrorInfo
5 | val from_ErrorInfo : ErrorInfo -> ErrorCode
6 | val error_code_parse : ErrorCode
7 | val error_code_eof : ErrorCode
8 | val eq : ErrorCode * ErrorCode -> bool
9 | val pr : ErrorCode -> string
10 | end
11 |
--------------------------------------------------------------------------------
/test/explicit_regions/err_expty2.sml.log.ok:
--------------------------------------------------------------------------------
1 | [reading source file: err_expty2.sml]
2 | > val f : (int -> int)`r0pair
3 | err_expty2.sml, line 3, column 21:
4 | val f : (int -> int)`r0pair = fn x => 4
5 | ^^^^^^
6 | Explicit region variable r0pair is of type p and cannot also be of type T
7 | Stopping compilation of MLB-file due to error (code 1).
8 |
--------------------------------------------------------------------------------
/test_dev/c2.sml:
--------------------------------------------------------------------------------
1 | infix 7 * / div mod
2 | infix 6 + - ^
3 | infixr 5 :: @
4 | infix 4 = <> > >= < <=
5 | infix 3 := o
6 | infix 0 before
7 |
8 | fun print (s:string) : unit = prim("printStringML", s)
9 | fun (s : string) ^ (s' : string) : string = prim ("concatStringML", (s, s'))
10 |
11 | val b = "world"
12 | val c = a ^ b
13 |
14 | val () = print c
15 |
--------------------------------------------------------------------------------
/kitdemo/vpprob.sml:
--------------------------------------------------------------------------------
1 | (*vpprob.sml 27/08/1997 13:06. tho.*)
2 |
3 | (*gives Impossible: StatObject.TyVar.equality; ought only to give the warning
4 | ``Free type variables are not allowed ...''. For instance, if everyting
5 | is put in a let, there is no problem.*)
6 |
7 | fun i x = x
8 |
9 | val revonto = i i
10 | val mk_nextgen_fn = revonto
11 |
--------------------------------------------------------------------------------
/test/explicit_regions/er19.sml.log.ok:
--------------------------------------------------------------------------------
1 | [reading source file: er19.sml]
2 | > val ! : 'a ref -> 'a
3 | val f : unit -> real
4 | val x : real ref
5 | er19.sml, line 8, column 18:
6 | if true then 3.4`e
7 | ^^
8 | Expecting explicit region variable but e is an explicit effect variable
9 | Stopping compilation of MLB-file due to error (code 1).
10 |
--------------------------------------------------------------------------------
/test/explicit_regions/er7.sml:
--------------------------------------------------------------------------------
1 | (* it is an error to unify a local region with a
2 | * global region variable *)
3 |
4 | infix +
5 | fun !(x: 'a ref): 'a = prim ("!", x)
6 |
7 | val x = ref 4.5
8 |
9 | fun f `[r1] () : real =
10 | let with r2
11 | val z = 8.0`r1
12 | val y = if true then 3.4`r2
13 | else !x
14 | in z + y
15 | end
16 |
--------------------------------------------------------------------------------
/test/export.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | long int incr(long int);
4 |
5 | void
6 | work() {
7 | long int b;
8 | long int a = 8;
9 | printf("Calling ML function \"incr\"\n");
10 | b = incr(a);
11 | printf("incr(%ld) = %ld\n", a,b);
12 | printf("Calling ML function \"incr\" again\n");
13 | b = incr(a);
14 | printf("incr(%ld) = %ld\n", a,b);
15 | }
16 |
--------------------------------------------------------------------------------
/test/posix.sml.out.ok:
--------------------------------------------------------------------------------
1 |
2 | File posix.sml: Testing structure Posix...
3 |
4 | File posix.sml: Testing structure Posix.IO...
5 | Posix.IO.pipe OK
6 | Posix.Process.fork - start OK
7 | Posix.Process.fork - in child OK
8 | Posix.IO.close OK
9 | Posix.Process.fork - in parent - child finished OK
10 | Posix.uname OK
11 | Posix.FileSys.fstat OK
12 |
--------------------------------------------------------------------------------
/test/tak_smlnj.sml:
--------------------------------------------------------------------------------
1 | fun tak (x,y,z) =
2 | if not (y < x)
3 | then z
4 | else tak (tak (x - 1, y, z),
5 | tak (y - 1, z, x),
6 | tak (z - 1, x, y))
7 |
8 | val rec f =
9 | fn 0 => ()
10 | | n => (tak (18,12,6); f (n-1))
11 |
12 | structure Main =
13 | struct
14 | fun doit () = f 5000
15 | end
16 |
17 | fun doit() = Main.doit()
--------------------------------------------------------------------------------