Member-only story
⏩ GHC 9.6.1 Announces Javascript Cross-Compilation

Update: The article got 100 claps prooving it is valuable to the community. I am glad for that and will write more about Haskell! Cheers!
In the final days of Javascript, Haskell announces cross-compilation technical preview to make Web purely functional for real
Haskell is a purely functional programming language that found its place in industrial applications, for example its used by Facebooka anti spam system.
Glasgow Haskell Compiler is the most famous, open source Haskell compiler available.
On tenth of March, 2023, Ben Gamari announced the release of GHC 9.6.1. I was reporting on the version 9.2.5 in November. Since that time the team came with some exciting news.
As announced GHC 9.6.1 the version makes it possible to cross compile code to WebAssembly and Javascript marking a milestone in Haskell history as it joins the group of Web supremacy languages.
The new functionality is in early stage and presented as a technical preview of a new angle that may revolutionize both Haskell usage as well as the Web development as it is.
As we can read in the release news:
GHC is not yet run-time retargetable; a given GHC binary targets exactly one platform, and both WebAssembly and JavaScript are considered platforms for this purpose. Cross-compilers must be built from source by their users
Another notable feature in this release is to generate bytecode for modules on demand. Mercury reported initial 40% compile speed improvement on Template Haskell code heavy project.
Check out the release note for other improvements and bugfixes.
Have a nice day!
Only 1% of people read such long articles to the end. Congrats! It must be a pleasure to talk with you about coding. You are my favorite people, I hope you will connect by subscribing!
BTW. I am designing fantasy flashcard games for coders. Check them out!
Do you like Haskell? Clap, subscribe, like and share in your social media!
Join 3300 developers who follow Tom Smykowski! For $5 per month you will have access to all Medium articles and Tom will get a part of it, so he will write more about Haskell and GHC! Become a member now!