PS or ghcjs for Frontend with Haskell Backend



Currently, I’m working on finishing a Haskell backend and am looking into creating single page web frontend for it.
I really like both languages.
Purescript seems to be easier to work with and has a more dedicated active community than ghcjs.
However, I also see a lot of potential with using ghcjs for code re-usability if I want to start pushing more to the frontend.
I’m sure that a many have looked long and hard at this, but I haven’t found any compelling comparisons.
What are your thoughts?


I think your title is a bit misleading. It seems to suggest you want to know which language to use for a back-end, but your comment suggests you want to know which to use for a front-end.

AFAIK, GHCJS’s downsides are:

  • all or nothing: you can’t slowly migrate an already existing app one component at a time.
  • the entire GHC is compiled into Javascript (I think), so that might affect your bundle sizes
  • people usually have problems building it

PS’s downsides are:

  • it’s strict by default, so the equivalent Haskell code doesn’t work as expected sometimes.
  • a few language features that exist in Haskell require workarounds/hacks in PureScript because some features haven’t yet been implemented

I imagine you’re already familiar with each’s upsides and others will likely correct me where I’ve misstated something above.


Thanks for the input. Those are good considerations.
Also, I have changed the title to be more clear.



Also, you might find Introduction to PureScript for Haskell Developers (PDF) useful.


Your link seems to be missing an href?


Fixed it. Thanks.

Not sure why the markdown didn’t work, but possibly because it didn’t start with https://?