[Haskell-cafe] Haskell/JS -- better through typeclasses?

Jason Dusek jason.dusek at gmail.com
Sun Apr 26 14:33:34 EDT 2009

2009/04/26 Dimitry Golubovsky <golubovsky at gmail.com>:
> John wrote:
>> I can't speak for Jason, but for me, this is not very useful.
>> I don't want to write in a Haskell DSL, I want to write in
>> Haskell. And not the whole program, either, just the parts
>> that really lend themselves to functional programming
>> (parsers, numeric computations, code generators, various
>> algorithms).
> What I presented is of course not a complete solution; this is
> just a tool to construct Javascript expressions in haskellized
> type-safe form.
> What I also mentioned: this monadic form may be an end-point
> for some other conversion, like GRIN. This answers the
> question how to translate a true Haskell program (like a
> parser) into Javascript (or a similar language). There are
> some experimental compilers with GRIN backends, plus I did my
> own experiments with GRIN that gave me some ideas.
> So I would just look at it as a starting point of some new
> family of tools which hopefully will end up opening
> possibility to translate Haskell things to Javascript.
> PS For now I am more concerned with the IDL part of it, but
> any suggestions on GRIN are welcome.

  I didn't mean to ignore your earlier mail -- I felt John's was
  easier to comment on. As some people remarked in the other
  thread, it's maybe not so unreasonable that the best way to
  start with translating Haskell to JavaScript is developing a
  DSL for writing JavaScript in Haskell.

  When I said that earlier work on Haskell/JS was not directly
  relevant to my interests, it was not my intention to suggest
  it was all silly stuff. I'm really just trying to get some
  perspective on how to go about this sort of thing; it's
  desirable to me to be able stuff Haskell libs into
  environments that only allow JavaScript or Python. I'm
  beginning to appreciate that the core translation I imagined
  is perhaps not the most direct route.

Jason Dusek

More information about the Haskell-Cafe mailing list