Re: [Haskell-cafe] Public floggings

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!
participants (1)
-
Anthony Clayden