Skip to content

minoki/min-caml-hs

Repository files navigation

MinCaml implementation in Haskell

This is a clone of MinCaml that targets AArch64.

Supported platforms:

  • AArch64 Darwin (macOS)
  • AArch64 Linux

Steps to run:

$ cabal build
$ cabal run -- min-caml <basename>
$ cc <basename>.s libmincaml-aarch64.S stub.c -lm
$ ./a.out

Features:

  • Lexer
  • Parser
  • Type inference
  • K-normalization
  • Alpha conversion
  • Beta reduction
  • Flatten lets
  • Inlining
  • Constant folding
  • Dead definition elimination
  • Closure conversion
  • Virtual machine code generation
  • Immediate operand
  • Register allocation
  • Assembly generation