Skip to content

Commit d69cfc7

Browse files
committed
Bump dependent-sum; Remove reliance on EqTag
1 parent 49c1dec commit d69cfc7

File tree

3 files changed

+6
-13
lines changed

3 files changed

+6
-13
lines changed

reflex.cabal

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ library
4343
base >= 4.9 && < 4.13,
4444
bifunctors >= 5.2 && < 5.6,
4545
comonad,
46+
constraints-extras >= 0.2,
4647
containers >= 0.5 && < 0.7,
4748
data-default >= 0.5 && < 0.8,
4849
dependent-map >= 0.2.4 && < 0.3,
@@ -131,7 +132,7 @@ library
131132
if flag(use-template-haskell)
132133
cpp-options: -DUSE_TEMPLATE_HASKELL
133134
build-depends:
134-
dependent-sum >= 0.3 && < 0.5,
135+
dependent-sum >= 0.5,
135136
haskell-src-exts >= 1.16 && < 1.21,
136137
haskell-src-meta >= 0.6 && < 0.9,
137138
template-haskell >= 2.9 && < 2.15
@@ -140,7 +141,7 @@ library
140141
other-extensions: TemplateHaskell
141142
else
142143
build-depends:
143-
dependent-sum == 0.4.*
144+
dependent-sum >= 0.5
144145

145146
if flag(fast-weak) && impl(ghcjs)
146147
cpp-options: -DGHCJS_FAST_WEAK

src/Data/Functor/Misc.hs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@ deriving instance Read k => Read (Const2 k v v)
8686
instance Show k => GShow (Const2 k v) where
8787
gshowsPrec n x@(Const2 _) = showsPrec n x
8888

89-
instance (Show k, Show (f v)) => ShowTag (Const2 k v) f where
90-
showTaggedPrec (Const2 _) = showsPrec
91-
9289
instance Eq k => GEq (Const2 k v) where
9390
geq (Const2 a) (Const2 b) =
9491
if a == b
@@ -221,11 +218,6 @@ instance GShow (EitherTag l r) where
221218
LeftTag -> showString "LeftTag"
222219
RightTag -> showString "RightTag"
223220

224-
instance (Show l, Show r) => ShowTag (EitherTag l r) Identity where
225-
showTaggedPrec t n (Identity a) = case t of
226-
LeftTag -> showsPrec n a
227-
RightTag -> showsPrec n a
228-
229221
-- | Convert 'Either' to a 'DSum'. Inverse of 'dsumToEither'.
230222
eitherToDSum :: Either a b -> DSum (EitherTag a b) Identity
231223
eitherToDSum = \case

src/Reflex/Patch/DMapWithMove.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ import Reflex.Patch.Class
1919
import Reflex.Patch.MapWithMove (PatchMapWithMove (..))
2020
import qualified Reflex.Patch.MapWithMove as MapWithMove
2121

22+
import Data.Constraint.Extras
2223
import Data.Dependent.Map (DMap, DSum (..), GCompare (..))
2324
import qualified Data.Dependent.Map as DMap
24-
import Data.Dependent.Sum (EqTag (..))
2525
import Data.Functor.Constant
2626
import Data.Functor.Misc
2727
import Data.Functor.Product
@@ -105,8 +105,8 @@ validationErrorsForPatchDMapWithMove m =
105105
unbalancedMove _ = Nothing
106106

107107
-- |Test whether two @'PatchDMapWithMove' k v@ contain the same patch operations.
108-
instance EqTag k (NodeInfo k v) => Eq (PatchDMapWithMove k v) where
109-
PatchDMapWithMove a == PatchDMapWithMove b = a == b
108+
instance (GEq k, Has' Eq k (NodeInfo k v)) => Eq (PatchDMapWithMove k v) where
109+
PatchDMapWithMove a == PatchDMapWithMove b = a == b
110110

111111
-- |Higher kinded 2-tuple, identical to @Data.Functor.Product@ from base ≥ 4.9
112112
data Pair1 f g a = Pair1 (f a) (g a)

0 commit comments

Comments
 (0)