on develop help sign in
Bump a number of upper version bounds

Dependent.Map stopped some reexport, so I now export them from their original modules. This caused some issues with the Some pattern on ghc 8.0.1 so I replaced it by mkSome.

commita191ed9ded708ed7ff0cf53ad6dafaf54db5b95a authorMalte Brandy <malte.brandy@maralorn.de> dateSun 14 Jun 2020, 00:45 (6 years ago) parentf79d1b2
4 files changed+15−12
patch.cabal+4−4 src/Data/Functor/Misc.hs+2−2 src/Data/Patch/DMap.hs+3−1 src/Data/Patch/DMapWithMove.hs+6−5
patch.cabal+4−4
@@ -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+2−2
@@ -48,7 +48,7 @@ import Data.IntMap (IntMap)
4848import qualified Data.IntMap as IntMap
4949import Data.Map (Map)
5050import qualified Data.Map as Map
51−import Data.Some (Some(Some))
51+import Data.Some (Some, mkSome)
5252import Data.These
5353import Data.Type.Equality ((:~:)(Refl))
5454import Data.Typeable hiding (Refl)
@@ -117,7 +117,7 @@ intMapWithFunctorToDMap = DMap.fromDistinctAscList . map (\(k, v) -> Const2 k :=
117117-- | Convert a 'DMap' to a regular 'Map' by forgetting the types associated with
118118-- the keys, using a function to remove the wrapping 'Functor'
119119weakenDMapWith :: (forall a. v a -> v') -> DMap k v -> Map (Some k) v'
120−weakenDMapWith f = Map.fromDistinctAscList . map (\(k :=> v) -> (Some k, f v)) . DMap.toAscList
120+weakenDMapWith f = Map.fromDistinctAscList . map (\(k :=> v) -> (mkSome k, f v)) . DMap.toAscList
121121
122122--------------------------------------------------------------------------------
123123-- WrapArg
src/Data/Patch/DMap.hs+3−1
@@ -14,7 +14,9 @@ import Data.Patch.Class
1414import Data.Patch.IntMap
1515import 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 (..))
1820import qualified Data.Dependent.Map as DMap
1921import Data.Functor.Constant
2022import Data.Functor.Misc
src/Data/Patch/DMapWithMove.hs+6−5
@@ -20,12 +20,13 @@ import Data.Patch.MapWithMove (PatchMapWithMove (..))
2020import qualified Data.Patch.MapWithMove as MapWithMove
2121
2222import Data.Constraint.Extras
23−import Data.Dependent.Map (DMap, DSum (..), GCompare (..))
23+import Data.Dependent.Map (DMap)
24+import Data.Dependent.Sum (DSum (..))
2425import qualified Data.Dependent.Map as DMap
2526import Data.Functor.Constant
2627import Data.Functor.Misc
2728import Data.Functor.Product
28−import Data.GADT.Compare (GEq (..))
29+import Data.GADT.Compare (GEq (..), GCompare (..))
2930import Data.GADT.Show (GShow, gshow)
3031import qualified Data.Map as Map
3132import Data.Maybe
@@ -33,7 +34,7 @@ import Data.Monoid.DecidablyEmpty
3334#if !MIN_VERSION_base(4,11,0)
3435import Data.Semigroup (Semigroup (..))
3536#endif
36−import Data.Some (Some(Some))
37+import Data.Some (Some, mkSome)
3738import 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