Questions tagged [reactive-banana]

reactive banana is a Haskell library for functional reactive programming

Reactive Banana:

Functional reactive programming offers an elegant and concise way to express interactive programs such as graphical user interfaces, animations, computer music or robot controllers. It promises to avoid the spaghetti code that is all too common in traditional approaches to GUI programming.

The goal of the library is to provide a solid foundation.

115 questions
1
vote
1 answer

How to know what made a behavior change?

I'm writing a network description for a a listbox logic. It's really simple: I have a behavior for the (Maybe) current selected item, and I want it so that whenever the user adds a new item to the list, the current selected item will select the…
MasterMastic
  • 20,711
  • 12
  • 68
  • 90
1
vote
1 answer

reactive-banana GLFW event register example

In a related thread there has been given a quasi-code example, that is, supposedly, easy to fix: registerMouseButton :: IO (Event MouseButton) registerMouseButton = do (addHandler, fire) <- newAddHandler setMouseButtonCallback $ \button _ -> fire…
1
vote
1 answer

where is Paths.getDataFile in Haskell (reactive-banana)?

I am testing reactive-banana 0.8.0.0 using one of the examples involving animation I get an error about the Paths module not found. The problem line is: import Paths (getDataFile) and error is: D:\temp\animation.hs:11:8: Could not find module…
thor
  • 21,418
  • 31
  • 87
  • 173
1
vote
2 answers

How to make a player jump (set it's y velocity)?

Given the following: integralB :: Num a => Behavior t a -> Behavior t a -- definite integral of a behaviour eJump :: Event t a -- tells the player to jump bYAccel = pure 4000 -- y acceleration bYVel = integralB bYAccel -- y velocity bY = integralB…
mcjohnalds45
  • 667
  • 1
  • 8
  • 16
1
vote
0 answers

Functional Banana Traveller - Broken Type Mystery

I'm getting the following error: Libraries/Reactive/GameMechanic.hs:34:80: No instance for (Apply (Behavior t0) (Event t)) arising from a use of `<@' Possible fix: add an instance declaration for (Apply (Behavior t0) (Event t)) In the second…
user1198582
0
votes
0 answers

Are FRP frameworks good tools for creating a network of spiking neurons

Do functional reactive programming (FRP) frameworks provide a good setting for creating a network of spiking neurons? Such a network looks as follows: There is a connectivity graph that defines which neurons receive input from which other neurons…
0
votes
1 answer

Setup custom Events with data in reactive-banana

I have a sample I picked up from the reactive-banana repo. This uses gloss. But when I work with events I have my own events with data. These events are not necessarily UI events. So I was expecting that FRP can help me code with custom events. So,…
Mohan Radhakrishnan
  • 3,002
  • 5
  • 28
  • 42
0
votes
1 answer

wxc-0.91.0.0 failed to install

I'm trying to install reactive-banana, wx, wxcore in cabal sandbox. When cabal install --only-dependencies is run following error message is given: src\cpp\eljlistctrl.cpp: In function 'int ListCmp(long int, long int, long…
Dulguun Otgon
  • 1,925
  • 1
  • 19
  • 38
0
votes
1 answer

Functional Banana Traveller - Input Handling

This is a sub-problem from my Traveller project. I've put together the rudementary code that will handle input. It works, until I introduce a TChan to the mix. Below is the working code, with an example of how to use it. Then, I will change it and…
user1198582
-1
votes
1 answer

Reactive banana : model implementation, 120 line of code really fully describes Reactive Banana's semantics ?

Is this 120 lines of code fully and completly describes Reactive Banana's semantics ? https://github.com/HeinrichApfelmus/reactive-banana/blob/develop/reactive-banana/src/Reactive/Banana/Model.hs Can this 120 lines of code be considered as a…
jhegedus
  • 20,244
  • 16
  • 99
  • 167
1 2 3 4 5 6 7
8