Hi, Ben here, one of people who worked on blynn-compiler and proposed
the Scheme in Haskell. Indeed thanks to the Ben Lynn's single file
implementation in C, blynn-compiler it was ported quickly to be
M2-Planet compatible and is a capable subset of Haskell 98 (see
precisely.hs to see how idiomatic it is).
What's the status of implementing the hygienic macro expander, and what
are the main challenges?
Could we use Matt Might's meta-circular evaluator with first-class
hygienic macros?[1] It runs successfully on my Scheme interpreter[2]
with some modifications so it may be promising. Though, performance
would suffer badly.
On 2021-01-15 08:27, jeremiah@xxxxxxxxxx wrote:
> 3) not actually converge the code and simply throw one or both of them
> away. Say write the whole thing in a better language than C (haskell
> perhaps but ultimately requires abandoning previous work).
Also, the one resource I've found that explains and shows the
implementation of hygienic expansion algorithms is[3]. It also shows
that syntax-case can be defined in terms of plambda (a primitive binding
a pattern variable to a body) and expose (see paper).
[1]
https://matt.might.net/articles/metacircular-evaluation-and-first-class-run-time-macros/
[2] https://github.com/siraben/r5rs-denot
[3] https://legacy.cs.indiana.edu/~dyb/pubs/LaSC-5-4-pp295-326.pdf
--
Siraphob (Ben) Phipathananunth
Class of 2023 in CS and Math at Vanderbilt University, TN
Bangkok/Nashville
GitHub: https://github.com/siraben