mbeidler 2017-03-06 08:51:39
I'd say for react-flux yes. I haven't used reflex much, but I think it's more of a full-fledged FRP system.
louispan 2017-03-06 08:53:18
you might want to check out glazier-react that I'm currently working on
jle` 2017-03-06 08:53:25
filipovsky: it might be fruitful to ask in #reflex-frp, or also on the reddit :) not everyone relevant might be online on irc at the moment
louispan 2017-03-06 08:53:58
I think it's a simpler version of FRP. It's Elm-inspired - but IMHO better because in haskell we can use typeclasses
louispan 2017-03-06 08:55:38
And widgets are actually composable (you can make bigger widgets out of smaller ones) without changing any code in the smaller widgets.
filipovsky 2017-03-06 08:55:45
louispan 2017-03-06 08:55:50
Does anyone know if it's possible to run multiple template haskell splices in one go?
louispan 2017-03-06 08:57:20
makeClassyPrisms ''Action
louispan 2017-03-06 08:57:20
makeClassy ''Callbacks
louispan 2017-03-06 08:57:20
makeClassy ''Model
louispan 2017-03-06 08:57:20
Can I do o
louispan 2017-03-06 08:57:20
$(makeClassy ''Action, makeClassy ''Callbacks, makeClassy ''Model) instead
louispan 2017-03-06 08:57:45
I'm just wondering because generating TH using GHCJS takes a bit of time, and I'm wondering if generating three at once will save time.
geekosaur 2017-03-06 08:58:40
probably not, since ghcjs is using a backend process so the overhead should only apply to the first splice
louispan 2017-03-06 08:59:34
geekosaur: thanks for answering
geekosaur 2017-03-06 09:00:11
basically those kinds of splices *themselves* are expensive, and youre far from the only one to notice (whether using ghc or ghcjs)
geekosaur 2017-03-06 09:00:38
makeClassy is doing a lot of work behind the scenes
cris_ 2017-03-06 09:00:40
hi all, i want to install "haste" into cabal sandbox , i first type $cabal sandbox init
cris_ 2017-03-06 09:00:51
1.0 create a folder , say ~/Downloads/sand 1.1 go to https://hackage.haskell.org/package/haste 1.2 download - haste-0.1.1.tar.gz to ~/Download 1.3 extracted to ~/Downloads/sand ; 1.4 go to ~/Downloads/sand/haste-0.1.1 2.0 $ cabal install --only-dependencies
cris_ 2017-03-06 09:01:46
but after the last command: cabal install --only-dependencies, the following errors occur:
geekosaur 2017-03-06 09:03:39
cris_, for starters I would 'cabal get haste', 'cd haste', 'cabal sandbox init'
geekosaur 2017-03-06 09:04:04
(or whatever dir haste ends up in, which will likely be versioned)
cris_ 2017-03-06 09:05:01
curl-1.3.8 failed during th ecnofigure step
cris_ 2017-03-06 09:05:23
configure step
ski 2017-03-06 09:15:34
zcourts : hard to see what you're trying to do, or even why you're defining a new type class in the first place ..
ski 2017-03-06 09:16:05
zcourts : typically, one should only make a new type class in case one has at least two different instances of it in mind
ski 2017-03-06 09:16:25
(and even then one should consider whether one really needs a type class)
ski 2017-03-06 09:17:51
zcourts : perhaps you want functional dependencies, perhaps you want something completely different. please elaborate on what you want to do
zcourts 2017-03-06 09:17:59
I'm not implementing any real world code, I am reading about typeclasses again and writing quick snippets to refresh my memory, it's been a while since I;ve written any Haskell. My intention was just to define a type class that hadd 1 function for which I could create 2 instances that i'd then have do diff things and just print
ski 2017-03-06 09:18:25
which two instances ?
zcourts 2017-03-06 09:20:50
Hadn't gotten as far as to implement a second one because the first didn't work, but I had something as simple as addition in mind, so data Y and data Z's constr were just going to have 2 ints put in. Complete waste for a typeclass since one would do the same thing but it'd get me two types to start playing with as I worked through the book
ski 2017-03-06 09:21:50
perhaps you could try playing around with `class X c where (>>>) :: Int -> Int -> c' or `class X c where (>>>) :: c -> c -> c' ?
zcourts 2017-03-06 09:24:06
Yeah, I'm totally jumping the gun, I'm sure the book gets to this. I'll start with what you've suggested, get it to work and finish the chapter before doing anything else.
ski 2017-03-06 09:25:57
one could also imagine `class X a b c where (>>>) :: a -> b -> c' (with or without FDs added), but that strikes me as being enough "amorphous" that probably it won't be very useful