Marginal is a Whitespace language interpreter implemented in Haskell. For those unfamiliar with it, Whitespace is an esoteric programming language that only uses the tokens
"\n". This project is just an excuse to refresh on same lexing & parsing basics, as well as playing with some interesting Haskell features.
Marginal is largely implemented as a library, with a thin CLI wrapper around it. At the time of writing
Marginal contains 2 parser implementatons (one using just
Alex, and the other using a more appropriate
Happy combination), and a single strict VM implementation. Assuming my own interest remains I plan on adding another parser implementation, probably with
Megaparsec, as well as a debugger implementation for the strict VM implementation and implementations that use the default lazy evaluation strategy (but not making whitespace itself lazy).