Skip to content

Commit 7551cf1

Browse files
authored
Merge pull request #17 from maralorn/bump-version-bounds
Bump a number of upper version bounds
2 parents 45d804b + a191ed9 commit 7551cf1

File tree

4 files changed

+15
-12
lines changed

4 files changed

+15
-12
lines changed

patch.cabal

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ library
3535
build-depends: base >= 4.9 && < 4.14
3636
, constraints-extras >= 0.3 && < 0.4
3737
, containers >= 0.6 && < 0.7
38-
, dependent-map >= 0.3 && < 0.4
39-
, dependent-sum >= 0.6 && < 0.7
38+
, dependent-map >= 0.3 && < 0.5
39+
, dependent-sum >= 0.6 && < 0.8
4040
, lens >= 4.7 && < 5
4141
, semigroupoids >= 4.0 && < 6
4242
, transformers >= 0.5.6.0 && < 0.6
43-
, witherable >= 0.3 && < 0.3.2
43+
, witherable >= 0.3 && < 0.4
4444

4545
exposed-modules: Data.Functor.Misc
4646
, Data.Monoid.DecidablyEmpty
@@ -56,7 +56,7 @@ library
5656
ghc-options: -Wall -fwarn-redundant-constraints -fwarn-tabs
5757

5858
if flag(split-these)
59-
build-depends: these >= 1 && <1.1
59+
build-depends: these >= 1 && <1.2
6060
, semialign >=1 && <1.2
6161
, monoidal-containers >= 0.6 && < 0.7
6262
else

src/Data/Functor/Misc.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import Data.IntMap (IntMap)
4747
import qualified Data.IntMap as IntMap
4848
import Data.Map (Map)
4949
import qualified Data.Map as Map
50-
import Data.Some (Some(Some))
50+
import Data.Some (Some, mkSome)
5151
import Data.These
5252
import Data.Type.Equality ((:~:)(Refl))
5353
import Data.Typeable hiding (Refl)
@@ -116,7 +116,7 @@ intMapWithFunctorToDMap = DMap.fromDistinctAscList . map (\(k, v) -> Const2 k :=
116116
-- | Convert a 'DMap' to a regular 'Map' by forgetting the types associated with
117117
-- the keys, using a function to remove the wrapping 'Functor'
118118
weakenDMapWith :: (forall a. v a -> v') -> DMap k v -> Map (Some k) v'
119-
weakenDMapWith f = Map.fromDistinctAscList . map (\(k :=> v) -> (Some k, f v)) . DMap.toAscList
119+
weakenDMapWith f = Map.fromDistinctAscList . map (\(k :=> v) -> (mkSome k, f v)) . DMap.toAscList
120120

121121
--------------------------------------------------------------------------------
122122
-- WrapArg

src/Data/Patch/DMap.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ import Data.Patch.Class
1414
import Data.Patch.IntMap
1515
import Data.Patch.Map
1616

17-
import Data.Dependent.Map (DMap, DSum (..), GCompare (..))
17+
import Data.Dependent.Map (DMap)
18+
import Data.Dependent.Sum (DSum (..))
19+
import Data.GADT.Compare (GCompare (..))
1820
import qualified Data.Dependent.Map as DMap
1921
import Data.Functor.Constant
2022
import Data.Functor.Misc

src/Data/Patch/DMapWithMove.hs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,21 @@ import Data.Patch.MapWithMove (PatchMapWithMove (..))
2020
import qualified Data.Patch.MapWithMove as MapWithMove
2121

2222
import Data.Constraint.Extras
23-
import Data.Dependent.Map (DMap, DSum (..), GCompare (..))
23+
import Data.Dependent.Map (DMap)
24+
import Data.Dependent.Sum (DSum (..))
2425
import qualified Data.Dependent.Map as DMap
2526
import Data.Functor.Constant
2627
import Data.Functor.Misc
2728
import Data.Functor.Product
28-
import Data.GADT.Compare (GEq (..))
29+
import Data.GADT.Compare (GEq (..), GCompare (..))
2930
import Data.GADT.Show (GShow, gshow)
3031
import qualified Data.Map as Map
3132
import Data.Maybe
3233
import Data.Monoid.DecidablyEmpty
3334
#if !MIN_VERSION_base(4,11,0)
3435
import Data.Semigroup (Semigroup (..))
3536
#endif
36-
import Data.Some (Some(Some))
37+
import Data.Some (Some, mkSome)
3738
import Data.These
3839

3940
-- | Like 'PatchMapWithMove', but for 'DMap'. Each key carries a 'NodeInfo' which describes how it will be changed by the patch and connects move sources and
@@ -317,8 +318,8 @@ weakenPatchDMapWithMoveWith f (PatchDMapWithMove p) = PatchMapWithMove $ weakenD
317318
{ MapWithMove._nodeInfo_from = case _nodeInfo_from ni of
318319
From_Insert v -> MapWithMove.From_Insert $ f v
319320
From_Delete -> MapWithMove.From_Delete
320-
From_Move k -> MapWithMove.From_Move $ Some k
321-
, MapWithMove._nodeInfo_to = Some <$> getComposeMaybe (_nodeInfo_to ni)
321+
From_Move k -> MapWithMove.From_Move $ mkSome k
322+
, MapWithMove._nodeInfo_to = mkSome <$> getComposeMaybe (_nodeInfo_to ni)
322323
}
323324

324325
-- |"Weaken" a @'PatchDMapWithMove' (Const2 k a) v@ to a @'PatchMapWithMove' k v'@. Weaken is in scare quotes because the 'Const2' has already disabled any

0 commit comments

Comments
 (0)