I wrote a simple curry function in JavaScript which works correctly for most cases:    const add = curry((a, b, c) => a + b + c);  const add2 = add(2);  const add5 = add2(3);  console.log(add5(5)); <script> const curried = Symbol("curr...
In my Yesod project i have the following route:  /api/hide/thread/#Text/#Int      ApiHideThreadR   GET   I want to request it on the client side with javascript:  function hideThreadCompletely(threadId, board) {     $.getJSON("/api/hide/thread/&#...
I have an element of type Data.Vector.Unboxed.Vector Word32. I want to convert that to a native JS TypedArray (an Uint32Array, specifically). I'm aware of toJsArray and toJsValListOf, but both functions deal with lists, not vectors, and are ineff...
Still most potential for a GUI to Haskell for me, but missing some essential info in the examples, being a noob Haskeller. Assuming one of the examples:   {-   webviewhs   (C) 2018 David Lettier   lettier.com -}  {-# LANGUAGE     OverloadedStrings #-...
I'd like to understand the original meaning of functional reactive programming in Haskell and how it differs from the actual application of FRP in Javascript. Unfortunately, I have only a superficial understanding of Haskell and have to stick wit...
How do I import in GHCJS a Javascript function like the following ?  xs.subscribe(function(x) { console.log(x) })   I tried various combinations of the following without success:  data Observable_ data Disposable_  type Observable a = JSRef Observabl...
I've been reading up on Functional Reactive Programming, and though I have not used monads extensively in any language, I can't help but see them everywhere in the FRP design.  This question's answers have some fantastic descriptions of w...
I always believed GHCJS, for obvious reasons, generated very slow JavaScript programs, compared to manually written and optimized code. When experimenting with it, though, I noticed it was not as bad as I expected. I decided to run a series of small...
Note: This is a repost of another question, which the author deleted. Here's the original question:    I have this polyvariadic comp function in Javascript and was wondering if a similar implementation in Haskell were possible. I am mostly intere...
I'm trying to run a program built with GHCJS using node.js. However, I get the following error:  SyntaxError: Too many variables declared (only 131071 allowed)     at Module._compile (module.js:439:25)     at Object.Module._extensions..js (module...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.