Journal entry for
The Haskell Implementor’s Workshop says they’re open to “crazy half-baked ideas”, so maybe I can work out some.
When working on GHC I found the way everything is based off the big TTG AST data structure to be quite complicated. I suspect that an approach with macros, like Typed Racket, would lead to much cleaner code. The code would also be easier to extend. I don’t know enough about the GHC frontend code or how Typed Racket is implemented yet to convincingly say whether this is doable though.
Another idea I have is what if GHC had support for multiple languages like Racket? The runtime is great, I don’t know any other lazy language except Racket’s lazy version. I doubt that is anywhere near as efficient as Haskell though, and Haskell has lots of libraries.
Allowing users to experiment with multiple languages on the same runtime could help projects like Dependent Haskell, where you’d be free to create the perfect syntax for a dependently typed language rather than tacking on potentially awkward syntax.
I think right now for any experiment you have to essentially fork GHC, and compile the whole thing etc. In Racket you just make a module and it’s ready to use.