Skip to content

Commit

Permalink
Remove useless mappend defs, fixing warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Ericson2314 committed Oct 2, 2024
1 parent 1ddf4ad commit d03a416
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/Data/Vessel/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ instance Semigroup (v g) => Semigroup (FlipAp g v) where

instance Monoid (v g) => Monoid (FlipAp g v) where
mempty = FlipAp mempty
mappend (FlipAp x) (FlipAp y) = FlipAp (mappend x y)

instance Group (v g) => Group (FlipAp g v) where
negateG (FlipAp x) = FlipAp (negateG x)
Expand Down
2 changes: 0 additions & 2 deletions src/Data/Vessel/Map.hs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ instance (Ord k, Eq g, Monoid g) => Semigroup (MapV k v (Const g)) where
xy = x <> y

instance (Ord k, Eq g, Monoid g) => Monoid (MapV k v (Const g)) where
mappend = (<>)
mempty = MapV Map.empty

instance (Ord k, Eq g, Group g) => Group (MapV k v (Const g)) where
Expand All @@ -78,7 +77,6 @@ instance (Ord k1, Ord k2, Monoid g, Eq g) => Semigroup (MapV k1 v (Compose (Mono
xy = x <> y

instance (Ord k1, Ord k2, Monoid g, Eq g) => Monoid (MapV k1 v (Compose (MonoidalMap k2) (Const g))) where
mappend = (<>)
mempty = MapV Map.empty

instance (Ord k1, Ord k2, Group g, Eq g) => Group (MapV k1 v (Compose (MonoidalMap k2) (Const g))) where
Expand Down
1 change: 0 additions & 1 deletion src/Data/Vessel/Single.hs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ instance (Semigroup (g (First (Maybe a)))) => Semigroup (SingleV a g) where

instance (Monoid (g (First (Maybe a)))) => Monoid (SingleV a g) where
mempty = SingleV mempty
mappend (SingleV x) (SingleV y) = SingleV (mappend x y)

instance (Group (g (First (Maybe a)))) => Group (SingleV a g) where
negateG (SingleV x) = SingleV (negateG x)
Expand Down
1 change: 0 additions & 1 deletion src/Data/Vessel/Vessel.hs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ instance (Has' Semigroup k (FlipAp g), GCompare k, Has View k) => Semigroup (Ves

instance (Has' Semigroup k (FlipAp g), GCompare k, Has View k) => Monoid (Vessel k g) where
mempty = Vessel DMap.empty
mappend = (<>)

instance (Has' Semigroup k (FlipAp g), Has' Group k (FlipAp g), GCompare k, Has View k) => Group (Vessel k g) where
negateG (Vessel m) = Vessel (negateG m) --TODO: Do we know that nullV can't be the result of negateG?
Expand Down
2 changes: 0 additions & 2 deletions src/Data/Vessel/ViewMorphism.hs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ instance (Semigroup (m b) , Semigroup (n (ViewQueryResult a))) => Semigroup (Vie
ViewHalfMorphism f f' <> ViewHalfMorphism g g' = ViewHalfMorphism (f <> g) (f' <> g')

instance (Monoid (m b) , Monoid (n (ViewQueryResult a))) => Monoid (ViewHalfMorphism m n a b) where
mappend = (<>)
mempty = ViewHalfMorphism mempty mempty

instance
Expand All @@ -81,7 +80,6 @@ instance
( Monoid (m b), Monoid (m (ViewQueryResult b))
, Monoid (n a), Monoid (n (ViewQueryResult a))
) => Monoid (ViewMorphism m n a b) where
mappend = (<>)
mempty = ViewMorphism mempty mempty

-- | query for two things simultaneously, return as much result as is available.
Expand Down
1 change: 0 additions & 1 deletion tutorial/Tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ instance (Monoid g, Eq g, Ord k) => Semigroup (GrpMap k g) where

instance (Monoid g, Eq g, Ord k) => Monoid (GrpMap k g) where
mempty = GrpMap Map.empty
mappend = (<>)

instance (Group g, Eq g, Ord k) => Group (GrpMap k g) where
negateG (GrpMap xs) = GrpMap $ fmap negateG xs
Expand Down

0 comments on commit d03a416

Please sign in to comment.