MIML is a simple functional language with the syntax similar to Standard ML. The intention was that it will meet all the requirements for 24 points and use Hindley-Miller algorithm for type inference, but it's not present in the first version. I'll update it later
It requires ghc >= 7.10 to run, but it's installed on students and Makefile knows about it.
Simple make
will be enough.
You can also run test.sh
which runs all tests.
Currently it supports:
- Integers, Booleans, Lists and functions as types and first class citizens. (e.c. Program result can be a function) bool_result function_result
- Let _ in let let_area
- Functions with recursion and application application fact
- Multi parameter functions multi_parameter_function
- Arithmetic let_area fact double_unary_minus
- Comparasions fact
- Currying partially_apply
- High-order functions high_order map
- Lists with syntax sugar, cons & nil list nil_cons
- If's if
- Functions in functions lambda partially_apply
- Lists of functions list
- Lambdas (only single parameter) lambda
- Static binding of identifiers static_bind
It will support in the next version:
- Builtin functions
- Multi parameter lambdas
- Polymorphic types
- ADTs
- Static type checking
- Pattern matching
It will not support:
- GADT's
- Existential types
- Rank > 2 Types
Error handling:
- I think, that error messages are quite good now, but I'll make them even better in future version
#BNF grammar #Some examples of correct programs #Some examples of incorrect programs #Testing script test.sh