[Haskell-beginners] Non ghc specific FRP (using uhc js backend)

Ertugrul Söylemez es at ertes.de
Fri Mar 30 01:28:05 CEST 2012


Nathan Hüsken <nathan.huesken at posteo.de> wrote:

> I read that it is ghc specific because of mutable references. I am
> trying to use the js backend of uhc and that does not support this.  I
> have tried to use other FRP libraries with uhc (by compiling a file
> which does nothing but import the library) and all failed because of
> something missing in Control.Concurrent.
>
> So I am wondering: Is it a property FRP that it needs something like
> mutable references for an efficient implementation.
> Is there a FRP library that can be used (or can be changed so that it
> can be used) with uhc and its js backend?

Well, for one thing there is the Flapjax project, which is an FRP
library implemented in JavaScript.

If you want to stay in Haskell, my Netwire library is based on the
automaton arrow, so it's a pure library with no need for mutable
references or anything.  However, it does require two extensions UHC
apparently doesn't support:  arrow syntax and type families.

For the former there is a preprocessor you can use.  The latter is more
tricky.  You can get around the type families requirement by
implementing the wire arrow as a monad transformer instead of an arrow
transformer.  This will require some refactoring though, so you might
not want to do that.

My suggestion is to give Heinrich's reactive-banana library a try.  It's
less flexible, but gets along with comparably few language extensions
and is also easier to learn.

If you like the AFRP approach you can also wait for a new library I'm
currently working on, which will be a simplified, more flexible variant
of the wire arrow as defined by Netwire.  You might observe it as a new
version of Netwire, but more likely I will make it its own library.


Greets,
Ertugrul

-- 
nightmare = unsafePerformIO (getWrongWife >>= sex)
http://ertes.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/beginners/attachments/20120330/2b276298/attachment.pgp>


More information about the Beginners mailing list