diff --git a/libs/prelude/Prelude/Interfaces.idr b/libs/prelude/Prelude/Interfaces.idr index 6246945a8..eddb1e42a 100644 --- a/libs/prelude/Prelude/Interfaces.idr +++ b/libs/prelude/Prelude/Interfaces.idr @@ -44,6 +44,14 @@ public export Monoid () where neutral = () +public export +Semigroup a => Semigroup b => Semigroup (a, b) where + (x, y) <+> (v, w) = (x <+> v, y <+> w) + +public export +Monoid a => Monoid b => Monoid (a, b) where + neutral = (neutral, neutral) + public export Semigroup Ordering where LT <+> _ = LT