January 7, 2026, 9:35am 1
I’m proud to showcase Hazy, my Haskell compiler. This is a project I have been working on in private for 3 years. It’s unfortunately not finished but it’s at the point where it’s fairly interesting. The type checker largely works and it’s able to generate Javascript. Though I haven’t tested the generated code yet.
My main goal with this is to explore how I can make Haskell more performant. I plan to implement lifetimes, linear types, levity polymorphism etc, like I did with my toy language Aith.
13 Likes
Very interesting! There are some very good ideas here, looking forward to seeing where you take Hazy!
1 Like
simonpj January 7, 2026, 10:55am 3
It’s great to see more…
January 7, 2026, 9:35am 1
I’m proud to showcase Hazy, my Haskell compiler. This is a project I have been working on in private for 3 years. It’s unfortunately not finished but it’s at the point where it’s fairly interesting. The type checker largely works and it’s able to generate Javascript. Though I haven’t tested the generated code yet.
My main goal with this is to explore how I can make Haskell more performant. I plan to implement lifetimes, linear types, levity polymorphism etc, like I did with my toy language Aith.
13 Likes
Very interesting! There are some very good ideas here, looking forward to seeing where you take Hazy!
1 Like
simonpj January 7, 2026, 10:55am 3
It’s great to see more diversity in the Haskell-compiler world.
It’s always good to say what the main goal(s) are, so that others can learn from what you are doing. (E.g. for microHs it’s “small footprint, compiles fast”) And you do indeed say what your main goal is:
Do you mean “compiles fast” or “runs fast”? I think probably the latter.
If you mean “runs fast” do you have any ideas for how to make Haskell run fast? GHC tries to do that too, but you may well have new ideas.
3 Likes
Great news, thanks a lot for sharing your work!
1 Like
Yes, I do want to make Haskell run faster, but my approach will be different from GHC’s. My plan is to effectively treat current Haskell as legacy and bolt-on a bunch of extensions that let you write fast code. That way you can have nice and friendly Haskell by default but optimize to C-level if you really need to.
My current plans to achieve this are to first implement current Haskell using Preceus (reference counting). This has the advantage that it doesn’t need a fancy runtime and would make Haskell follow C++’s “you don’t pay for what you don’t use” principle. Once that’s done, then I can focus on adding things like strict functions, multiargument functions, effectful functions, levity polymorphism, pointers (with lifetimes), and whatever else I would need. Then finally, when LLVM sees C-like code, it can optimize like C-like code.
I should note these plans are for the far future. Right now I need to focus on actually getting the compiler to work and I plan to do that with my test Javascript backend.
1 Like
That’s very ambitious, I’d love to contribute in the future. 
1 Like