Skip to content

Commit def4c30

Browse files
committed
Merge remote-tracking branch 'origin/aa-dependent-sum-0.5' into develop
* origin/aa-dependent-sum-0.5: Bump dependent-sum; Remove reliance on EqTag
2 parents 9bc1c19 + d69cfc7 commit def4c30

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
@@ -44,6 +44,7 @@ library
4444
base >= 4.9 && < 4.13,
4545
bifunctors >= 5.2 && < 5.6,
4646
comonad,
47+
constraints-extras >= 0.2,
4748
containers >= 0.5 && < 0.7,
4849
data-default >= 0.5 && < 0.8,
4950
dependent-map >= 0.2.4 && < 0.3,
@@ -133,7 +134,7 @@ library
133134
if flag(use-template-haskell)
134135
cpp-options: -DUSE_TEMPLATE_HASKELL
135136
build-depends:
136-
dependent-sum >= 0.5 && < 0.6,
137+
dependent-sum >= 0.6 && < 0.7,
137138
haskell-src-exts >= 1.16 && < 1.22,
138139
haskell-src-meta >= 0.6 && < 0.9,
139140
template-haskell >= 2.9 && < 2.15
@@ -142,7 +143,7 @@ library
142143
other-extensions: TemplateHaskell
143144
else
144145
build-depends:
145-
dependent-sum == 0.5.*
146+
dependent-sum == 0.6.*
146147

147148
if flag(fast-weak) && impl(ghcjs)
148149
cpp-options: -DGHCJS_FAST_WEAK

src/Data/Functor/Misc.hs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ deriving instance Read k => Read (Const2 k v v)
7979
instance 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-
8582
instance 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'.
223215
eitherToDSum :: Either a b -> DSum (EitherTag a b) Identity
224216
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)