Skip to content
/ mini-ml Public

小さな関数型言語のインタプリタ

License

Notifications You must be signed in to change notification settings

seelx3/mini-ml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mini-ml

About

  • [WIP] ミニ関数型言語 with 型検査

How to build

dune build

How to run

chmod +x miniml
./miniml
  • press Ctrl+D to exit.

For developers

How to debug

dune utop
  • Check infer function like this:
utop # Miniml.Infer.infer (Miniml.Parse.parse "if (1 + 2) < 3 then 4 else 5");;
- : Miniml.Infer.typ = Miniml.Infer.TInt
  • Check normalize function like this:
utop # Miniml.Reduction.normalize (Miniml.Parse.parse "if (1 + 2) < 3 then 4 else 5");;
- : Miniml.Syntax.prog = Miniml.Syntax.Int 5

How to format

dune fmt

References