About the project
fml is a small programming language from the ML family (functional languages such as OCaml and F#), implemented from scratch in F#. It has four parts: a lexer that splits the program text into tokens, a parser that arranges them into a syntax tree, a type system that checks the program is correct, and an evaluator that computes the result. Together they form a complete chain from source code to result, so a program written in fml can be run straight away.
The challenge
A custom ML-family language is a whole chain in which each stage must agree with the next: what the parser returns has to be typeable, and what passes type checking has to be computable. The type system was the hardest part here.