fay

Fay JQuery work with array of elements

ぃ、小莉子 提交于 2019-12-22 10:44:02
问题 What is the preferred way, how to compute the number of elements selected by a selector? One way I can think of, is to call JQuery's size : size :: JQuery -> Fay Int size = ffi "%1['size']()" The other way is to get a list from a function call and then count the elements. The type of the function, that retrieves the elements would probably be: elems :: JQuery -> Fay [Elem] Anyone know, how to implement it? How does one describe the mapping between javascript types and haskell types? 回答1:

Using Fay in a cabal sandbox

瘦欲@ 提交于 2019-12-14 01:26:53
问题 I've just started using both cabal sandboxes and Fay. However, Fay seems unable to find the packages automatically, presumably as they are not in the 'global' cabal package database. I tried unsuccessfully to follow the advice on this wiki page, which to me looked like: ./cabal-sandbox/bin/fay.exe --base-path .cabal-sandbox/i386-windows-ghc-7.6.3/fay-base-0.19/src/ Frontend.hs But Fay still complains it cannot find package fay-base . Is there something I can do about this, or must I install

Functional reactive programming — is Fay expressive enough? [closed]

耗尽温柔 提交于 2019-12-06 18:23:17
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . So I'm doing a fairly involved javascript/html client with lots of ajax calls and other involvements of callback-ism. I'm entertaining

Functional reactive programming — is Fay expressive enough? [closed]

与世无争的帅哥 提交于 2019-12-05 00:02:42
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . So I'm doing a fairly involved javascript/html client with lots of ajax calls and other involvements of callback-ism. I'm entertaining the thought of using Fay for this purpose. I'm aware of Elm. Tried it and liked the FRP elements. Now