Skip to content

Commit

Permalink
Make gmappend/gmempty definitions more compact.
Browse files Browse the repository at this point in the history
  • Loading branch information
23Skidoo committed Mar 1, 2016
1 parent 70d4223 commit 3113eb8
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions Cabal/Distribution/Compat/Semigroup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,6 @@ gmappend x y = to (gmappend' (from x) (from y))
class GSemigroup f where
gmappend' :: f p -> f p -> f p

instance GSemigroup U1 where
gmappend' _ _ = U1

instance GSemigroup V1 where
gmappend' x y = x `seq` y `seq` error "GSemigroup.V1: gmappend'"

instance Semigroup a => GSemigroup (K1 i a) where
gmappend' (K1 x) (K1 y) = K1 (x <> y)

Expand All @@ -167,9 +161,6 @@ gmempty = to gmempty'
class GSemigroup f => GMonoid f where
gmempty' :: f p

instance GMonoid U1 where
gmempty' = U1

instance (Semigroup a, Monoid a) => GMonoid (K1 i a) where
gmempty' = K1 mempty

Expand Down

0 comments on commit 3113eb8

Please sign in to comment.