Don't know if my language is considered Lil' enough for this, but it's a pure, lazy functional language based upon Miranda (progenitor language to Haskell) that compiles to x86-64 asm. ~6700 SLOC for the (self-hosted!) compiler, and ~3300 SLOC additional for the extensive library of functional data structures and functions.
My little language Newt is 7 kloc. Dunno if it's worth including, it's mostly an exercise to learn how these things work and is not as polished as I'd like.
- Self-hosted
- Compiles to javascript
- Bidirectional typechecking with NbE (based on elaboration zoo)
- Dependent type checking
- type classes
- ADTs with dependent pattern matching
- TCO (trampoline for mutually tail recursive functions)
- Erasure of compile-time only values (0, ω quantities, but not linear)
Either newt was already in the list, or it got added. We talked a bit about using our languages for AoC 2024 -- looks like you've been keeping busy working on it!
The hardest part with small languages isn't the parser, it's the standard library and error messages. Getting a helpful IDE experience in that footprint is a significant engineering challenge.
https://github.com/taolson/Admiran
- Self-hosted
- Compiles to javascript
- Bidirectional typechecking with NbE (based on elaboration zoo)
- Dependent type checking
- type classes
- ADTs with dependent pattern matching
- TCO (trampoline for mutually tail recursive functions)
- Erasure of compile-time only values (0, ω quantities, but not linear)
- Web playground
- LSP (added this month)
- Syntax is similar to Agda / Idris / Haskell
https://github.com/dunhamsteve/newt
https://github.com/mlajtos/fluent/blob/main/client.tsx
EDIT: Actually, it's not quite "ML-family" enough for this post. But it is a remarkably cool project! :)
And here is a set of single file lambda calculus implementations with a variety of extensions: https://github.com/solomon-b/lambda-calculus-hs
`polytt` is kind of an ended experiment but that lambda calculus repo i plan to extend in the near future.
https://justine.lol/sectorlisp2/