https://github.com/jl2/Compiler-Algorithm-Code/tree/master/h...
I tried it out and after renaming fold -> foldr, it still builds and seems to work. The main function takes a regex as a command line argument and creates a finite automata graph using GraphViz's dot.
In the Compiler-Algorithm-Code/haskell directory:
make
./test "(foo)+(bar)*(foo+)" | dot -Tpdf -ofoobarfoo.pdf && xdg-open foobarfoo.pdfhttps://github.com/sdiehl/kaleidoscope https://github.com/arbipher/llvm-ocaml-tutorial
The Haskell one is a nice one. Can say nothing about the OCaml one since I found it using a google search.
I've had a try at implementing an Caleidoscope compiler in OCaml but did not finish it. But it was fun to write.
XMonad is a bit bigger: https://github.com/xmonad/xmonad
No idea how it holds up, it was my first try at a compiler, but it’s quite small. I was following the Crafting Interpreters book.