Re: The question is not "how?", but "why?"
It may be helpful to point out that Purescript is best described as "Haskell done right". I.e. it's a very rigorous, principled language that just happens to compile down to JavaScript, which just happens to be gross. But so is x86 assembly and somehow we manage.
Also Harry is a really great guy.