Questions tagged [elerea]

Elerea is a functional reactive programming package for Haskell

Elerea is a functional reactive programming package for the Haskell programming language. It is used to model the discrete and continuous time, and is often used for implementing graphical user interfaces and in robotics.

Relevant Links:

Elerea home page
Wikipedia Entry on Functional Reactive Programming

5 questions
12
votes
1 answer

A Haskell Game of life crashes when launched

I'm currently trying to develop a tiny Conway's Game of Life in Haskell. I wrote a library, lifegame, that enables to manage a grid of cells and to compute its generations (see github.com/qleguennec/lifegame.git). Generations is an infinite list. So…
qleguennec
  • 544
  • 4
  • 12
7
votes
1 answer

How do I unify two or more Signals in elerea?

Is there something like reactive-bananas union function in elerea? union :: Signal a -> Signal a -> Signal a This just merges the two signals into one stream. Ideally I am searching for an efficient union of a large number (14k) of signals: unions…
fho
  • 6,787
  • 26
  • 71
4
votes
0 answers

How do I avoid runaway memory/cpu usage in Helm/Elerea (Haskell FRP)?

I'm dipping my toes in FRP, and I've thrown together a basic "hello world" style app with Helm (based on the example here): import FRP.Helm import qualified FRP.Helm.Window as Window import qualified FRP.Helm.Keyboard as Keyboard import…
T.R.
  • 7,442
  • 6
  • 30
  • 34
2
votes
1 answer

Creating Applicative instance of a stateful signal type with Elerea

I am hacking around in Helm trying to create a stateful signal type that will carry additional info on whether the value has changed since the last sampling. I have managed to make the new signal type an instance of Functor but I am struggling to…
kasbah
  • 903
  • 5
  • 23
1
vote
1 answer

In Elerea, why doesn't stateful return the state after the last state transformation?

Let's take a look at an example given in the hackage documentation for stateful do smp <- start (stateful "" (:)) res <- forM "olleh~" smp print res the output is: ["","o","lo","llo","ello","hello"] What it does is push one character after…
Higemaru
  • 354
  • 4
  • 10