PS or ghcjs for Frontend with Haskell Backend

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.

1 Like