@@ -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
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
137 times1p n = fmap $ times1p n
140 times1p n = fmap $ times1p n
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