
Nathan Hüsken
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/