Looking for VM's or AM's for functional languages.

I am wanting to review source code for virtual or abstract machines for statically typed functional languages.

Candidates would be both native implementations in C, C++, Rust, etc. Or assembler, or higher source language bootstrapped languages.

Many thanks in advance.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

one that never went anywhere fwiw

but was interesting at the time, i thought. hlvm.

HLVM was an attempt at

HLVM was an attempt at putting another layer ontop of LLVM it was not functional as such IIRC it had common imperative language constructs and worked like an AST lowering to LLVM. It was a bit too 'opinionated for most usages, iI seem to remember.

Is F# functional enough?

F# is using CLI VM. It is open source. https://github.com/dotnet/runtime

And I do not think that VM layer has to be 'functional'. Even prolog VMs were quite imperative. Rich enough VM like JVM or CLI will work just fine, and you will have libraries.

CLI IR is richer than JVM bytecode, but JVM is catching up and it will be possibly at the similar point in 2-4 years (the project Valhala and so on).

Moonad/Formality

Victor Maia has been working on an abstract machine to optimize lambda calculus, based on Yves Lafont's Interaction Nets. See medium post. The language built above this is Formality, see github moonad/Formality.