I implemented the Nimble type inference algorithm from Henry Baker's old Common Lisp paper in Clojure awhile back for #reasons. It's based on lattice/algebraic data flow (Kaplan-Ullman) rather than logical unification (Milner), and works well to calculate type specialization while compiling dynamic languages:

https://www.plover.com/misc/hbaker-archive/TInference.html

Yesterday I added a simple C generator to make something like Pre-Scheme <https://prescheme.org> for #Clojure

I couldn't leave it alone, so now it correctly refuses to emit C until it can ground every expression in a C-compatible type (type hints can be used to resolve ambiguities), and the generated C compiles to perfectly good WASM modules. This is now dangerously close to being useful. 🤔
Okay, it now emits Zig and the process to get native and WASM modules out is very straightforward. I think the next step is adding array support so I can compile numeric code written interactively in Clojure to fast native code. It might be interesting to automatically generate JNA bindings so one can livecode native modules that get loaded into the JVM on the fly? 🤔
@jack would it be possible to see your source code? I'm kinda struggling to understand the paper properly.
@abnv I’ll release it at some stage, once it tells me what it really wants to be.