on develop help sign in
Drop semigroups dependency

... and transformers-compat As GHC-8.0 has Data.Semigroup Also dependent-sum is released.

commit5a8abe2acabf8b3acebe93503837384d663da5c2 authorOleg Grenrus <oleg.grenrus@iki.fi> dateSun 4 Aug 2019, 22:22 (7 years ago) parent61b5222
5 files changed+1−40
cabal.project−6 reflex.cabal+1−6 src/Reflex/Class.hs−12 src/Reflex/Patch/IntMap.hs−8 src/Reflex/Patch/Map.hs−8
cabal.project−6
@@ -1,11 +1,5 @@
11packages: .
22
3−source-repository-package
4− type: git
5− location: https://github.com/mokus0/dependent-sum.git
6− tag: fe726cfd50997792c691d3009a3ee1ba38c435a5
7− subdir: dependent-sum
8−
93-- why 0.3 is not in mokus0 tree?
104-- this is no-tag-classes branch from obsidiansystems fork
115source-repository-package
reflex.cabal+1−6
@@ -68,12 +68,10 @@ library
6868 ref-tf == 0.4.*,
6969 reflection == 2.1.*,
7070 semigroupoids >= 4.0 && < 6,
71− semigroups >= 0.16 && < 0.20,
7271 stm >= 2.4 && < 2.6,
7372 syb >= 0.5 && < 0.8,
7473 time >= 1.4 && < 1.9,
75− transformers >= 0.2,
76− transformers-compat >= 0.3,
74+ transformers >= 0.5.2.0,
7775 unbounded-delays >= 0.1.0.0 && < 0.2,
7876 witherable >= 0.2 && < 0.4
7977
@@ -289,7 +287,6 @@ test-suite QueryT
289287 , mtl
290288 , ref-tf
291289 , reflex
292− , semigroups
293290 , these
294291 , transformers
295292
@@ -320,8 +317,6 @@ test-suite GC-Semantics
320317 if flag(split-these)
321318 build-depends: semialign
322319
323− if impl(ghc < 8)
324− build-depends: semigroups
325320 other-modules:
326321 Reflex.Plan.Pure
327322 Reflex.Plan.Reflex
src/Reflex/Class.hs−12
@@ -677,11 +677,7 @@ instance (Num a, Reflex t) => Num (Dynamic t a) where
677677instance (Reflex t, Semigroup a) => Semigroup (Behavior t a) where
678678 a <> b = pull $ liftM2 (<>) (sample a) (sample b)
679679 sconcat = pull . fmap sconcat . mapM sample
680−#if MIN_VERSION_semigroups(0,17,0)
681680 stimes n = fmap $ stimes n
682−#else
683− times1p n = fmap $ times1p n
684−#endif
685681
686682-- | Alias for 'mapMaybe'
687683fmapMaybe :: Filterable f => (a -> Maybe b) -> f a -> f b
@@ -879,11 +875,7 @@ traceEventWith f = push $ \x -> trace (f x) $ return $ Just x
879875instance (Semigroup a, Reflex t) => Semigroup (Event t a) where
880876 (<>) = alignWith (mergeThese (<>))
881877 sconcat = fmap sconcat . mergeList . toList
882−#if MIN_VERSION_semigroups(0,17,0)
883878 stimes n = fmap $ stimes n
884−#else
885− times1p n = fmap $ times1p n
886−#endif
887879
888880instance (Semigroup a, Reflex t) => Monoid (Event t a) where
889881 mempty = never
@@ -1116,11 +1108,7 @@ zipDynWith f da db =
11161108
11171109instance (Reflex t, Semigroup a) => Semigroup (Dynamic t a) where
11181110 (<>) = zipDynWith (<>)
1119−#if MIN_VERSION_semigroups(0,17,0)
11201111 stimes n = fmap $ stimes n
1121−#else
1122− times1p n = fmap $ times1p n
1123−#endif
11241112
11251113instance (Reflex t, Monoid a) => Monoid (Dynamic t a) where
11261114 mconcat = distributeListOverDynWith mconcat
src/Reflex/Patch/IntMap.hs−8
@@ -1,4 +1,3 @@
1−{-# LANGUAGE CPP #-}
21{-# LANGUAGE DeriveFoldable #-}
32{-# LANGUAGE DeriveFunctor #-}
43{-# LANGUAGE DeriveTraversable #-}
@@ -33,14 +32,7 @@ instance Patch (PatchIntMap a) where
3332instance Semigroup (PatchIntMap v) where
3433 PatchIntMap a <> PatchIntMap b = PatchIntMap $ a `mappend` b --TODO: Add a semigroup instance for Map
3534 -- PatchMap is idempotent, so stimes n is id for every n
36−#if MIN_VERSION_semigroups(0,17,0)
3735 stimes = stimesIdempotentMonoid
38−#else
39− times1p n x = case compare n 0 of
40− LT -> error "stimesIdempotentMonoid: negative multiplier"
41− EQ -> mempty
42− GT -> x
43−#endif
4436
4537-- | Map a function @Int -> a -> b@ over all @a@s in the given @'PatchIntMap' a@
4638-- (that is, all inserts/updates), producing a @PatchIntMap b@.
src/Reflex/Patch/Map.hs−8
@@ -1,4 +1,3 @@
1−{-# LANGUAGE CPP #-}
21{-# LANGUAGE LambdaCase #-}
32{-# LANGUAGE TypeFamilies #-}
43-- | 'Patch'es on 'Map' that consist only of insertions (including overwrites)
@@ -35,14 +34,7 @@ instance Ord k => Patch (PatchMap k v) where
3534instance Ord k => Semigroup (PatchMap k v) where
3635 PatchMap a <> PatchMap b = PatchMap $ a `mappend` b --TODO: Add a semigroup instance for Map
3736 -- PatchMap is idempotent, so stimes n is id for every n
38−#if MIN_VERSION_semigroups(0,17,0)
3937 stimes = stimesIdempotentMonoid
40−#else
41− times1p n x = case compare n 0 of
42− LT -> error "stimesIdempotentMonoid: negative multiplier"
43− EQ -> mempty
44− GT -> x
45−#endif
4638
4739-- | The empty 'PatchMap' contains no insertions or deletions
4840instance Ord k => Monoid (PatchMap k v) where