Skip to content
/ MLogic Public

An implementation of a mini-ML written entirely in prolog

License

Notifications You must be signed in to change notification settings

TOTBWF/MLogic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MLogic

MLogic is a parser, type checker, and interpreter for a subset of ML written in Prolog. This includes HM Type Inference.

The basic syntax is as follows:

Let Bindings

let f = 1

Lambda Expressions

let inc = λx. (x + 1)

Function Application

let foo = inc $ 2

Recursive Functions

let or = λx y. (if x then true else (if y then true else false))
let rec fib = (if ((or $ (n == 1)) $ (n == 2)) then 1 else ((fib $ (n - 1)) + (fib $ (n - 2))))

Usage

mlogic <filepath>

About

An implementation of a mini-ML written entirely in prolog

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published