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
0 answers

Obelisk OAuth router type mismatch

I am using Obelisk OAuth to handle multiple OAuth options (Facebook, Google, & Apple, though only FB is shown below). I have getOAuthDetails which gets the correct details for each provider. I use it in backend (at the bottom), but it gives me this…
LevelChart8
  • 207
  • 1
  • 8
1
vote
1 answer

Cannot find "route" and "Https" in Obelisk OAuth project

I am working on implementing Obelisk OAuth and running into 2 problems. When trying to implement this: https://github.com/obsidiansystems/obelisk-oauth/blob/master/example/backend/src/Backend.hs I am getting: backend/src/Backend.hs:15:1: error: …
LevelChart8
  • 207
  • 1
  • 8
1
vote
1 answer

Installing Obelisk-OAuth

I am trying to add Obelisk-OAuth to my project: https://github.com/obsidiansystems/obelisk-oauth At this instruction I am stuck: Your backend route encoder should handle this case: ... pathComponentEncoder $ \case BackendRoute_OAuth ->…
LevelChart8
  • 207
  • 1
  • 8
1
vote
1 answer

RoutedT interpreted as T.Text when using Obelisk routes

I am trying to build a basic web app with Obelisk and have been following this tutorial: https://github.com/obsidiansystems/obelisk/pull/733/files#diff-fe2dadb00af0583d3841e501760804eaR457 I do not understand why I would get this type error when my…
LevelChart8
  • 207
  • 1
  • 8
1
vote
1 answer

Can't install packages to nix-build project

After running nix-build -o frontend-result -A ghcjs.frontend for obelist project it errors for several imports one of which is: src/Frontend.hs:10:1: error: Could not find module ‘Control.Monad.Trans’ Perhaps you meant …
janat08
  • 1,725
  • 2
  • 16
  • 27
1
vote
1 answer

Haskell Reflex-Dom JSaddle error when stack building

Wanted to give Reflex-Dom a try but get an error from the jsaddle package when stack-building. Would love some tips on how to resolve this.…
Madderote
  • 1,107
  • 10
  • 19
1
vote
1 answer

Broken dependency in haskell stack?

I am relatively new to haskell, stack, ghc, etc. Have been trying a few projects with ghcjs and haven't been able to build any of them, including reflex-dom-stack-demo. I am getting the following error: In the dependencies for semigroupoids-5.0.0.4:…
RecencyEffect
  • 736
  • 7
  • 18
1
vote
1 answer

Reflex: Delaying events based on a behavior

Using reflex-frp and reflex-dom I need to delay events based on a behavior. I have: delayEvent :: (MonadWidget t m, Reflex t) => Event t () -> Behavior t NominalDiffTime -> m (Event t ()) delayEvent e b = switch . current <$> widgetHold…
trevor cook
  • 1,531
  • 8
  • 22
1
vote
0 answers

Reflex: Sending multiple http requests for a dynamic list of entries on event

Working with reflex-frp I have a list of entries which contain a text input. I also have a button that on click should trigger n http requests where n is the number of entries, and each request should contain the corresponding text. Therefore I…
Jesuspc
  • 1,664
  • 10
  • 25
1
vote
1 answer

How do I build stack configuration that allows me to build project with reflex-frp as dependency?

As in question. I can't get working stack configuration. I want to build project that uses reflex with ghc, preferably 8.0.2 or higher. How do I do it, cause specifying it as an extra deps doesn't seem to work either..
1
vote
1 answer

Conditionally adding DOM elements with Reflex

I have a function that receives a Dynamic and has to display a dom element which will contain a different kind of child depending on the value in the Dynamic. Is there a way to do such thing using Reflex and Reflex-Dom? The code would look like this…
Jesuspc
  • 1,664
  • 10
  • 25
1
vote
1 answer

Dynamic parent element

I have this piece of code and it works perfectly fine. It toggles some styles on the text input field depending on the field value. numberInput :: (MonadWidget t m) => m (Dynamic t (Maybe Double)) numberInput = divClass "form-group" $ do let…
Schoon
  • 394
  • 1
  • 9
1
vote
1 answer

Best way to bring the contents of a textfile into a reflex project

I have a 70 line text file, whose contents I want to have as the initial value of a text area within my project. What is the best way to do this? Normally I would use readFile but I can't seem to use it in this context.
user181407
  • 235
  • 1
  • 6
1
vote
1 answer

Haddock breaks down on #if #else #endif clauses

I am trying to generate documentations for a github library using haddock. Here's the code I entered: $ find -name '*.hs' | xargs haddock --html -o docs src/Reflex/Dom/Xhr.hs:154:0: error: missing binary operator before token "(" #if…
john mangual
  • 7,718
  • 13
  • 56
  • 95
1
vote
0 answers

material UI + reflex-frp => dropdown/select not working

I have tried to integrate Material UI with reflex frp - while normal (css only elements) look nice and slick - it seems that dropdowns/select-form elements need some jQuery to initialize - which does not work: I have tried to reorder the