on develop help sign in
Allow newer dependent-sum
commit22c3a90984add18e07315372f7f5596c3da08ad2 authorRyan Trinkle <ryan.trinkle@gmail.com> dateThu 9 May 2019, 13:52 (7 years ago) parent49e0bb8
3 files changed+5−11
reflex.cabal+3−2 src/Data/Functor/Misc.hs−8 src/Reflex/Patch/DMapWithMove.hs+2−1
reflex.cabal+3−2
@@ -44,6 +44,7 @@ library
4444 base >= 4.9 && < 4.13,
4545 bifunctors >= 5.2 && < 5.6,
4646 comonad,
47+ constraints-extras,
4748 containers >= 0.5 && < 0.7,
4849 data-default >= 0.5 && < 0.8,
4950 dependent-map >= 0.2.4 && < 0.3,
@@ -134,7 +135,7 @@ library
134135 if flag(use-template-haskell)
135136 cpp-options: -DUSE_TEMPLATE_HASKELL
136137 build-depends:
137− dependent-sum >= 0.3 && < 0.5,
138+ dependent-sum >= 0.3 && < 0.7,
138139 haskell-src-exts >= 1.16 && < 1.21,
139140 haskell-src-meta >= 0.6 && < 0.9,
140141 template-haskell >= 2.9 && < 2.15
@@ -143,7 +144,7 @@ library
143144 other-extensions: TemplateHaskell
144145 else
145146 build-depends:
146− dependent-sum == 0.4.*
147+ dependent-sum >= 0.4 && < 0.7
147148
148149 if flag(fast-weak) && impl(ghcjs)
149150 cpp-options: -DGHCJS_FAST_WEAK
src/Data/Functor/Misc.hs−8
@@ -79,9 +79,6 @@ deriving instance Read k => Read (Const2 k v v)
7979instance Show k => GShow (Const2 k v) where
8080 gshowsPrec n x@(Const2 _) = showsPrec n x
8181
82−instance (Show k, Show (f v)) => ShowTag (Const2 k v) f where
83− showTaggedPrec (Const2 _) = showsPrec
84−
8582instance Eq k => GEq (Const2 k v) where
8683 geq (Const2 a) (Const2 b) =
8784 if a == b
@@ -214,11 +211,6 @@ instance GShow (EitherTag l r) where
214211 LeftTag -> showString "LeftTag"
215212 RightTag -> showString "RightTag"
216213
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−
222214-- | Convert 'Either' to a 'DSum'. Inverse of 'dsumToEither'.
223215eitherToDSum :: Either a b -> DSum (EitherTag a b) Identity
224216eitherToDSum = \case
src/Reflex/Patch/DMapWithMove.hs+2−1
@@ -19,6 +19,7 @@ import Reflex.Patch.Class
1919import Reflex.Patch.MapWithMove (PatchMapWithMove (..))
2020import qualified Reflex.Patch.MapWithMove as MapWithMove
2121
22+import Data.Constraint.Extras
2223import Data.Dependent.Map (DMap, DSum (..), GCompare (..))
2324import qualified Data.Dependent.Map as DMap
2425import Data.Dependent.Sum (EqTag (..))
@@ -105,7 +106,7 @@ validationErrorsForPatchDMapWithMove m =
105106 unbalancedMove _ = Nothing
106107
107108-- |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
109110 PatchDMapWithMove a == PatchDMapWithMove b = a == b
110111
111112-- |Higher kinded 2-tuple, identical to @Data.Functor.Product@ from base ≥ 4.9