[Haskell-cafe] Public floggings
Anthony Clayden
anthony.d.clayden at gmail.com
Thu Oct 7 19:52:51 UTC 2021
> how I've found perversely delightful ways to use the C preprocessor.
Especially token-pasting.
Then boy! do I have an offer for you/you'll be like a pig in muck.
There's a Haskell compiler written in C++, using all the tricks you love:
* #define nested inside #if, so you're never quite sure which version of a
macro is in play.
* #defines that expand to a series of assignments and routine calls.
* Module-wide and global variables that get updated as side-effects of
routine calls
(as well as those routines passing back results)
* All data structures being cons pairs deeply nested, typically routines
poke into hd(hd(tl(e))) or some such.
Someone's generously put the source online
https://github.com/FranklinChen/hugs98-plus-Sep2006/tree/master/src
You can load it up into Visual Studio, and produce a genuine Windows
executable with a Haskell REPL. (Ah, silly me, of course you'd want the
familiar *nix command line -- that's even easier.)
And there's real work you could contribute to
https://mail.haskell.org/pipermail/hugs-bugs/2021-October/thread.html
Enjoy!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20211008/823608e5/attachment.html>
More information about the Haskell-Cafe
mailing list