[Haskell-beginners] Javascript with Haskell

David McBride toad3k
Wed Oct 9 13:50:18 UTC 2013


There's actually some really good stuff for this now.  I have experimented
a bit with haste.  Cabal install it, then use the haste-inst to install
haskell libraries as javascript, then compile your program with it and then
load it into your browser.  The only downside is that some lower level
functions don't work, so  like I couldn't use the vector library in an
application I had already written.  But if you keep that in mind while you
are developing it works pretty well.  You should be able to do a text
adventure no problem.

There is also GHCJS which is set to release on the next ghc release (it
only works with new versions of ghc) which promises to go even further to
get those last few bits of code working.  But of course it isn't out just
yet.


On Tue, Oct 8, 2013 at 4:30 PM, Franco <franco00 at gmx.com> wrote:

> Hello mailing list,
>
>     I am developing a small text adventure game, which now runs nicely on a
> Linux terminal. I was going to ask a friend of mine to compile it on
> Windows,
> but then I thought: "Wouldn't it be awesome if people could run that in
> their
> browser?"
>
> I searched a bit and found this little example game [1]. As you can see it
> was written in Haskell but you can play it in your browser.
>
> Now, to the problem: it seems to me that the code requires UHC (Utrecht
> Haskell Compiler), which I don't have (I use GHC).
> What are the alternatives (if any)? As stated above, I am not going to code
> anything complex graphic wise, so the simpler the merrier!
> Thanks
>
> -F
>
>
> [1] http://jshaskell.blogspot.de/2012/09/breakout.html
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20131009/cdefea9b/attachment.html>



More information about the Beginners mailing list