7
$\begingroup$

From Simon Peyton Jones (recent Royal Society member) we read the paper: Implementing lazy functional languages on stock hardware: the Spineless Tagless G-Machine.

Now this paper is part of how they made Haskell a lazy language when they were implementing it, and solved some problems they had at the time.

The only comparable paper seems to be: Compiling Lazy Functional Programs Based on the Spineless Tagless G-machine for the Java Virtual Machine but there doesn't appear to be an implementation available.

One tangentially related is: Compiling Haskell to Java. However in this approach they leave the implementation of the Spineless Tagless G-Machine in GHC and just read the output.

My question is: Are there any implementations of the spineless tagless G-machine other than in GHC?

$\endgroup$
2
$\begingroup$

I used this Google search:

"spineless tagless g-machine" site:github.com

and found 2 repos that (try?) to implement the STG in non-Haskell languages:

PHP: lechimp-p/php-stg

RPython ("restricted" subset of Python developed for Pypy): cgswords/laurens

$\endgroup$
0
$\begingroup$

Here is a good one with nice visualisations: https://github.com/quchen/stgi

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.