on develop help sign in
deps: relax upper bound: these, semigroups
commite9b2f777ad07875149614e8337507afd5b1a2466 authorRenzo Carbonara <gnuk0001@gmail.com> dateWed 23 Sep 2015, 15:34 (11 years ago) parente7e40d0
2 files changed+7−3
reflex.cabal+2−2 src/Reflex/Class.hs+5−1
reflex.cabal+2−2
@@ -19,10 +19,10 @@ library
1919 base >= 4.7 && < 4.9,
2020 dependent-sum == 0.2.*,
2121 dependent-map == 0.1.*,
22− semigroups == 0.16.*,
22+ semigroups >= 0.16 && < 0.18,
2323 mtl >= 2.1 && < 2.3,
2424 containers == 0.5.*,
25− these == 0.4.*,
25+ these >= 0.4 && < 0.7,
2626 primitive >= 0.5 && < 0.7,
2727 template-haskell >= 2.9 && < 2.11,
2828 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 #-}
22module Reflex.Class where
33
44import Control.Applicative
@@ -134,7 +134,11 @@ instance Reflex t => Monad (Behavior t) where
134134instance (Reflex t, Semigroup a) => Semigroup (Behavior t a) where
135135 a <> b = pull $ liftM2 (<>) (sample a) (sample b)
136136 sconcat = pull . liftM sconcat . mapM sample
137+#if MIN_VERSION_semigroups(0,17,0)
138+ stimes n = fmap $ stimes n
139+#else
137140 times1p n = fmap $ times1p n
141+#endif
138142
139143instance (Reflex t, Monoid a) => Monoid (Behavior t a) where
140144 mempty = constant mempty