on develop help sign in
Allow newer dependent-sum
22c3a90Ryan Trinkle
reflex.cabal+3−2
@@ -44,6 +44,7 @@ library
44 base >= 4.9 && < 4.13,
44 base >= 4.9 && < 4.13,
45 bifunctors >= 5.2 && < 5.6,
45 bifunctors >= 5.2 && < 5.6,
46 comonad,
46 comonad,
47+ constraints-extras,
47 containers >= 0.5 && < 0.7,
48 containers >= 0.5 && < 0.7,
48 data-default >= 0.5 && < 0.8,
49 data-default >= 0.5 && < 0.8,
49 dependent-map >= 0.2.4 && < 0.3,
50 dependent-map >= 0.2.4 && < 0.3,
@@ -134,7 +135,7 @@ library
134 if flag(use-template-haskell)
135 if flag(use-template-haskell)
135 cpp-options: -DUSE_TEMPLATE_HASKELL
136 cpp-options: -DUSE_TEMPLATE_HASKELL
136 build-depends:
137 build-depends:
137− dependent-sum >= 0.3 && < 0.5,
138+ dependent-sum >= 0.3 && < 0.7,
138 haskell-src-exts >= 1.16 && < 1.21,
139 haskell-src-exts >= 1.16 && < 1.21,
139 haskell-src-meta >= 0.6 && < 0.9,
140 haskell-src-meta >= 0.6 && < 0.9,
140 template-haskell >= 2.9 && < 2.15
141 template-haskell >= 2.9 && < 2.15
@@ -143,7 +144,7 @@ library
143 other-extensions: TemplateHaskell
144 other-extensions: TemplateHaskell
144 else
145 else
145 build-depends:
146 build-depends:
146− dependent-sum == 0.4.*
147+ dependent-sum >= 0.4 && < 0.7
147
148
148 if flag(fast-weak) && impl(ghcjs)
149 if flag(fast-weak) && impl(ghcjs)
149 cpp-options: -DGHCJS_FAST_WEAK
150 cpp-options: -DGHCJS_FAST_WEAK
src/Data/Functor/Misc.hs−8
@@ -79,9 +79,6 @@ deriving instance Read k => Read (Const2 k v v)
79instance Show k => GShow (Const2 k v) where
79instance Show k => GShow (Const2 k v) where
80 gshowsPrec n x@(Const2 _) = showsPrec n x
80 gshowsPrec n x@(Const2 _) = showsPrec n x
81
81
82−instance (Show k, Show (f v)) => ShowTag (Const2 k v) f where
83− showTaggedPrec (Const2 _) = showsPrec
84−
85instance Eq k => GEq (Const2 k v) where
82instance Eq k => GEq (Const2 k v) where
86 geq (Const2 a) (Const2 b) =
83 geq (Const2 a) (Const2 b) =
87 if a == b
84 if a == b
@@ -214,11 +211,6 @@ instance GShow (EitherTag l r) where
214 LeftTag -> showString "LeftTag"
211 LeftTag -> showString "LeftTag"
215 RightTag -> showString "RightTag"
212 RightTag -> showString "RightTag"
216
213
217−instance (Show l, Show r) => ShowTag (EitherTag l r) Identity where
218− showTaggedPrec t n (Identity a) = case t of
219− LeftTag -> showsPrec n a
220− RightTag -> showsPrec n a
221−
222-- | Convert 'Either' to a 'DSum'. Inverse of 'dsumToEither'.
214-- | Convert 'Either' to a 'DSum'. Inverse of 'dsumToEither'.
223eitherToDSum :: Either a b -> DSum (EitherTag a b) Identity
215eitherToDSum :: Either a b -> DSum (EitherTag a b) Identity
224eitherToDSum = \case
216eitherToDSum = \case
src/Reflex/Patch/DMapWithMove.hs+2−1
@@ -19,6 +19,7 @@ import Reflex.Patch.Class
19import Reflex.Patch.MapWithMove (PatchMapWithMove (..))
19import Reflex.Patch.MapWithMove (PatchMapWithMove (..))
20import qualified Reflex.Patch.MapWithMove as MapWithMove
20import qualified Reflex.Patch.MapWithMove as MapWithMove
21
21
22+import Data.Constraint.Extras
22import Data.Dependent.Map (DMap, DSum (..), GCompare (..))
23import Data.Dependent.Map (DMap, DSum (..), GCompare (..))
23import qualified Data.Dependent.Map as DMap
24import qualified Data.Dependent.Map as DMap
24import Data.Dependent.Sum (EqTag (..))
25import Data.Dependent.Sum (EqTag (..))
@@ -105,7 +106,7 @@ validationErrorsForPatchDMapWithMove m =
105 unbalancedMove _ = Nothing
106 unbalancedMove _ = Nothing
106
107
107-- |Test whether two @'PatchDMapWithMove' k v@ contain the same patch operations.
108-- |Test whether two @'PatchDMapWithMove' k v@ contain the same patch operations.
108−instance EqTag k (NodeInfo k v) => Eq (PatchDMapWithMove k v) where
109+instance (GEq k, Has' Eq k (NodeInfo k v)) => Eq (PatchDMapWithMove k v) where
109 PatchDMapWithMove a == PatchDMapWithMove b = a == b
110 PatchDMapWithMove a == PatchDMapWithMove b = a == b
110
111
111-- |Higher kinded 2-tuple, identical to @Data.Functor.Product@ from base ≥ 4.9
112-- |Higher kinded 2-tuple, identical to @Data.Functor.Product@ from base ≥ 4.9