on develop help sign in
Merge pull request #31 from k0001/deps1
4bbe386Ryan Trinkle
reflex.cabal+2−2
@@ -19,10 +19,10 @@ library
19 base >= 4.7 && < 4.9,
19 base >= 4.7 && < 4.9,
20 dependent-sum == 0.2.*,
20 dependent-sum == 0.2.*,
21 dependent-map == 0.1.*,
21 dependent-map == 0.1.*,
22− semigroups == 0.16.*,
22+ semigroups >= 0.16 && < 0.18,
23 mtl >= 2.1 && < 2.3,
23 mtl >= 2.1 && < 2.3,
24 containers == 0.5.*,
24 containers == 0.5.*,
25− these == 0.4.*,
25+ these >= 0.4 && < 0.7,
26 primitive >= 0.5 && < 0.7,
26 primitive >= 0.5 && < 0.7,
27 template-haskell >= 2.9 && < 2.11,
27 template-haskell >= 2.9 && < 2.11,
28 ref-tf == 0.4.*,
28 ref-tf == 0.4.*,
src/Reflex/Class.hs+5−1
@@ -1,4 +1,4 @@
1−{-# LANGUAGE TypeFamilies, FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, RankNTypes, GADTs, ScopedTypeVariables, FunctionalDependencies, RecursiveDo, UndecidableInstances, GeneralizedNewtypeDeriving, StandaloneDeriving, EmptyDataDecls, NoMonomorphismRestriction, TypeOperators, DeriveDataTypeable, PackageImports, TemplateHaskell, LambdaCase #-}
1+{-# LANGUAGE TypeFamilies, FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, RankNTypes, GADTs, ScopedTypeVariables, FunctionalDependencies, RecursiveDo, UndecidableInstances, GeneralizedNewtypeDeriving, StandaloneDeriving, EmptyDataDecls, NoMonomorphismRestriction, TypeOperators, DeriveDataTypeable, PackageImports, TemplateHaskell, LambdaCase, CPP #-}
2module Reflex.Class where
2module Reflex.Class where
3
3
4import Control.Applicative
4import Control.Applicative
@@ -134,7 +134,11 @@ instance Reflex t => Monad (Behavior t) where
134instance (Reflex t, Semigroup a) => Semigroup (Behavior t a) where
134instance (Reflex t, Semigroup a) => Semigroup (Behavior t a) where
135 a <> b = pull $ liftM2 (<>) (sample a) (sample b)
135 a <> b = pull $ liftM2 (<>) (sample a) (sample b)
136 sconcat = pull . liftM sconcat . mapM sample
136 sconcat = pull . liftM sconcat . mapM sample
137+#if MIN_VERSION_semigroups(0,17,0)
138+ stimes n = fmap $ stimes n
139+#else
137 times1p n = fmap $ times1p n
140 times1p n = fmap $ times1p n
141+#endif
138
142
139instance (Reflex t, Monoid a) => Monoid (Behavior t a) where
143instance (Reflex t, Monoid a) => Monoid (Behavior t a) where
140 mempty = constant mempty
144 mempty = constant mempty