on develop help sign in
Drop semigroups dependency
5a8abe2Oleg Grenrus
cabal.project−6
@@ -1,11 +1,5 @@
1packages: .
1packages: .
2
2
3−source-repository-package
4− type: git
5− location: https://github.com/mokus0/dependent-sum.git
6− tag: fe726cfd50997792c691d3009a3ee1ba38c435a5
7− subdir: dependent-sum
8−
9-- why 0.3 is not in mokus0 tree?
3-- why 0.3 is not in mokus0 tree?
10-- this is no-tag-classes branch from obsidiansystems fork
4-- this is no-tag-classes branch from obsidiansystems fork
11source-repository-package
5source-repository-package
reflex.cabal+1−6
@@ -68,12 +68,10 @@ library
68 ref-tf == 0.4.*,
68 ref-tf == 0.4.*,
69 reflection == 2.1.*,
69 reflection == 2.1.*,
70 semigroupoids >= 4.0 && < 6,
70 semigroupoids >= 4.0 && < 6,
71− semigroups >= 0.16 && < 0.20,
72 stm >= 2.4 && < 2.6,
71 stm >= 2.4 && < 2.6,
73 syb >= 0.5 && < 0.8,
72 syb >= 0.5 && < 0.8,
74 time >= 1.4 && < 1.9,
73 time >= 1.4 && < 1.9,
75− transformers >= 0.2,
74+ transformers >= 0.5.2.0,
76− transformers-compat >= 0.3,
77 unbounded-delays >= 0.1.0.0 && < 0.2,
75 unbounded-delays >= 0.1.0.0 && < 0.2,
78 witherable >= 0.2 && < 0.4
76 witherable >= 0.2 && < 0.4
79
77
@@ -289,7 +287,6 @@ test-suite QueryT
289 , mtl
287 , mtl
290 , ref-tf
288 , ref-tf
291 , reflex
289 , reflex
292− , semigroups
293 , these
290 , these
294 , transformers
291 , transformers
295
292
@@ -320,8 +317,6 @@ test-suite GC-Semantics
320 if flag(split-these)
317 if flag(split-these)
321 build-depends: semialign
318 build-depends: semialign
322
319
323− if impl(ghc < 8)
324− build-depends: semigroups
325 other-modules:
320 other-modules:
326 Reflex.Plan.Pure
321 Reflex.Plan.Pure
327 Reflex.Plan.Reflex
322 Reflex.Plan.Reflex
src/Reflex/Class.hs−12
@@ -677,11 +677,7 @@ instance (Num a, Reflex t) => Num (Dynamic t a) where
677instance (Reflex t, Semigroup a) => Semigroup (Behavior t a) where
677instance (Reflex t, Semigroup a) => Semigroup (Behavior t a) where
678 a <> b = pull $ liftM2 (<>) (sample a) (sample b)
678 a <> b = pull $ liftM2 (<>) (sample a) (sample b)
679 sconcat = pull . fmap sconcat . mapM sample
679 sconcat = pull . fmap sconcat . mapM sample
680−#if MIN_VERSION_semigroups(0,17,0)
681 stimes n = fmap $ stimes n
680 stimes n = fmap $ stimes n
682−#else
683− times1p n = fmap $ times1p n
684−#endif
685
681
686-- | Alias for 'mapMaybe'
682-- | Alias for 'mapMaybe'
687fmapMaybe :: Filterable f => (a -> Maybe b) -> f a -> f b
683fmapMaybe :: Filterable f => (a -> Maybe b) -> f a -> f b
@@ -879,11 +875,7 @@ traceEventWith f = push $ \x -> trace (f x) $ return $ Just x
879instance (Semigroup a, Reflex t) => Semigroup (Event t a) where
875instance (Semigroup a, Reflex t) => Semigroup (Event t a) where
880 (<>) = alignWith (mergeThese (<>))
876 (<>) = alignWith (mergeThese (<>))
881 sconcat = fmap sconcat . mergeList . toList
877 sconcat = fmap sconcat . mergeList . toList
882−#if MIN_VERSION_semigroups(0,17,0)
883 stimes n = fmap $ stimes n
878 stimes n = fmap $ stimes n
884−#else
885− times1p n = fmap $ times1p n
886−#endif
887
879
888instance (Semigroup a, Reflex t) => Monoid (Event t a) where
880instance (Semigroup a, Reflex t) => Monoid (Event t a) where
889 mempty = never
881 mempty = never
@@ -1116,11 +1108,7 @@ zipDynWith f da db =
1116
1108
1117instance (Reflex t, Semigroup a) => Semigroup (Dynamic t a) where
1109instance (Reflex t, Semigroup a) => Semigroup (Dynamic t a) where
1118 (<>) = zipDynWith (<>)
1110 (<>) = zipDynWith (<>)
1119−#if MIN_VERSION_semigroups(0,17,0)
1120 stimes n = fmap $ stimes n
1111 stimes n = fmap $ stimes n
1121−#else
1122− times1p n = fmap $ times1p n
1123−#endif
1124
1112
1125instance (Reflex t, Monoid a) => Monoid (Dynamic t a) where
1113instance (Reflex t, Monoid a) => Monoid (Dynamic t a) where
1126 mconcat = distributeListOverDynWith mconcat
1114 mconcat = distributeListOverDynWith mconcat
src/Reflex/Patch/IntMap.hs−8
@@ -1,4 +1,3 @@
1−{-# LANGUAGE CPP #-}
2{-# LANGUAGE DeriveFoldable #-}
1{-# LANGUAGE DeriveFoldable #-}
3{-# LANGUAGE DeriveFunctor #-}
2{-# LANGUAGE DeriveFunctor #-}
4{-# LANGUAGE DeriveTraversable #-}
3{-# LANGUAGE DeriveTraversable #-}
@@ -33,14 +32,7 @@ instance Patch (PatchIntMap a) where
33instance Semigroup (PatchIntMap v) where
32instance Semigroup (PatchIntMap v) where
34 PatchIntMap a <> PatchIntMap b = PatchIntMap $ a `mappend` b --TODO: Add a semigroup instance for Map
33 PatchIntMap a <> PatchIntMap b = PatchIntMap $ a `mappend` b --TODO: Add a semigroup instance for Map
35 -- PatchMap is idempotent, so stimes n is id for every n
34 -- PatchMap is idempotent, so stimes n is id for every n
36−#if MIN_VERSION_semigroups(0,17,0)
37 stimes = stimesIdempotentMonoid
35 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
44
36
45-- | Map a function @Int -> a -> b@ over all @a@s in the given @'PatchIntMap' a@
37-- | Map a function @Int -> a -> b@ over all @a@s in the given @'PatchIntMap' a@
46-- (that is, all inserts/updates), producing a @PatchIntMap b@.
38-- (that is, all inserts/updates), producing a @PatchIntMap b@.
src/Reflex/Patch/Map.hs−8
@@ -1,4 +1,3 @@
1−{-# LANGUAGE CPP #-}
2{-# LANGUAGE LambdaCase #-}
1{-# LANGUAGE LambdaCase #-}
3{-# LANGUAGE TypeFamilies #-}
2{-# LANGUAGE TypeFamilies #-}
4-- | 'Patch'es on 'Map' that consist only of insertions (including overwrites)
3-- | 'Patch'es on 'Map' that consist only of insertions (including overwrites)
@@ -35,14 +34,7 @@ instance Ord k => Patch (PatchMap k v) where
35instance Ord k => Semigroup (PatchMap k v) where
34instance Ord k => Semigroup (PatchMap k v) where
36 PatchMap a <> PatchMap b = PatchMap $ a `mappend` b --TODO: Add a semigroup instance for Map
35 PatchMap a <> PatchMap b = PatchMap $ a `mappend` b --TODO: Add a semigroup instance for Map
37 -- PatchMap is idempotent, so stimes n is id for every n
36 -- PatchMap is idempotent, so stimes n is id for every n
38−#if MIN_VERSION_semigroups(0,17,0)
39 stimes = stimesIdempotentMonoid
37 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
46
38
47-- | The empty 'PatchMap' contains no insertions or deletions
39-- | The empty 'PatchMap' contains no insertions or deletions
48instance Ord k => Monoid (PatchMap k v) where
40instance Ord k => Monoid (PatchMap k v) where