Questions tagged [reflex]

Reflex is a Haskell library, providing high-performance, deterministic, higher-order Functional Reactive Programming system

Reflex is a Haskell library, providing high-performance, deterministic, higher-order Functional Reactive Programming system

74 questions
1
vote
2 answers

Switching to an event wrapped in monadic context

My specific problem is like this: Given an Event t [a] and an Event t () (let's say it's a tick event), I want to produce an Event t a, that is, an event that is giving me consecutive items from input list for every occurence of tick event. Reflex…
Bartosz
  • 3,318
  • 21
  • 31
0
votes
1 answer

How to match *anything* until a delimiter is encountered in RE-flex lexer?

I was using RE/flex lexer for my project. In that, I want to match the syntax corresponding to ('*)".*?"\1. For eg, it should match "foo", ''"bar"'', but should not match ''"baz"'. But RE/flex matcher doesn't work with lookaheads, lookbehinds and…
Sourav Kannantha B
  • 2,860
  • 1
  • 11
  • 35
0
votes
0 answers

nix attribute `stdenv` missing on a reflex-stone haskell project

I was able to run nix-shell in my codebase about two years back on another macbook. I got a new freshly installed nix setup ❯ nix-env --version nix-env (Nix) 2.12.0 ❯ uname Darwin ❯ sw_vers ProductName: macOS ProductVersion: 12.0.1 BuildVersion: …
iluvAS
  • 513
  • 4
  • 9
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
0 answers

How to link Reflex with PCRE2?

After installing pcre2, i tried to compile the project with reflex however i get the following error, not sure, I guess I have this set up wrong, however I don't know how to get it done. how I can fix this?
Nguyen Manh
  • 73
  • 1
  • 6
0
votes
1 answer

Can I get IntPtr from IDirect3D11Device

I am using Win2D. I want to apply NVIDIA Reflex SDK to my game. To achieve this, NVIDIA Reflex SDK requests Direct3DDevice object. I think CanvasDevice (which implements IDirect3D11Device) matches Direct3DDevice. So, how can I get a native…
P. ful
  • 113
  • 9
0
votes
1 answer

Sharing dynamic between frontend head and body

New to haskell, but I'm not sure that you can create a dynamic that can go into both head and body. I'd like to update page title.
janat08
  • 1,725
  • 2
  • 16
  • 27
0
votes
1 answer

Monadwidget in Frontend type

Some of the examples use monadwidget, with mainwidget. While obelisk generated project expects you to use a frontend data type. I couldn't find a reference to this type in the guide, but how would you use monadwidget within the type?
janat08
  • 1,725
  • 2
  • 16
  • 27
0
votes
1 answer

getAndDecodeResponseEvent runs 3 times, instead of just once

This little pice of code has me confused: respCount counts to 3 in case the url exists, to 2 in case of 404, but shouldn't it only count to 1? Also, the actual request gets issued just once. I'm on the latest develop branch of reflex,…
Schoon
  • 394
  • 1
  • 9
0
votes
1 answer

How to make MonadError work with ghcjs/reflex

I'm struggling to compile the following program: import Data.Maybe import qualified Data.Text as T import qualified Data.Text.IO as T import Data.URLEncoded import Reflex.Dom url :: T.Text url = T.pack…
bongsun
  • 15
  • 4
0
votes
1 answer

Cannot map through Dynamic: No instance for (Functor (Dynamic Spider))

My intention is to alternate the colour of a div between bright red and dark red as a button gets pressed, starting with dark red. I have this code: {-# LANGUAGE OverloadedStrings #-} module Main where import Data.Map (Map) import…
Ignat Insarov
  • 4,660
  • 18
  • 37
0
votes
1 answer

How to add an html entity with Reflex.Dom?

As it should be text "© is rendered escaped. How then should I render the © html entity unescaped with Reflex.Dom?
philderbeast
  • 267
  • 2
  • 8
0
votes
1 answer

Haskell: How to fix the "type variable ambigous" compiler error?

I'm using GHCJSi, version 0.2.0-7.10.3: http://www.github.com/ghcjs/ghcjs/ and the reflex-dom library version 0-4 from https://github.com/reflex-frp/reflex-dom. I'm not using reflex-dom-0.3 from Hackage. The following Haskell program does not…
Jogger
  • 1,617
  • 2
  • 12
  • 22
-1
votes
1 answer

Need help understanding this this function

Dim i as Long, arr(5) As Long for i = 1 to 6 arr(i-1) = i-1 next console.writeLine(arr(LBound(arr)+5) + arr(UBound(arr)-2)) I understand the output is 8 but could someone explain why it is 8, Lbound and UBound, this type of question comes up…
loco3424
  • 23
  • 2
  • 6
1 2 3 4
5