Hasty Briefsbeta

Microhs – Haskell subset which can target microcontrollers

a day ago
  • #Haskell
  • #Compiler
  • #Functional Programming
  • MicroHs is an extended subset of Haskell implemented using combinators for runtime execution.
  • The runtime system has minimal dependencies and can be compiled for micro-controllers.
  • Sample code for STM32F407G-DISC1 board is available in the 'boards/' directory.
  • The compiler can compile itself and supports two different compilation methods: using GHC or the included combinator file and runtime.
  • MicroHs can be installed using 'make minstall' or 'make oldinstall', with environment variable 'MHSDIR' required for the latter.
  • The language includes many Haskell extensions by default, with 'CPP' being the only extension not always enabled.
  • MicroHs supports record dot syntax for field access and updates, with typeclasses 'HasField' and 'SetField'.
  • The runtime system includes a mark-scan garbage collector and supports serialization and deserialization of expressions.
  • MicroHs can be bootstrapped using Hugs, making it bootstrappable in the sense of bootstrappable.org.
  • Contributions are welcome, especially for adding missing functions, instances, and types from the Haskell Report and GHC boot libraries.