Idris2/libs/contrib/Control/Monad/Algebra.idr

19 lines
482 B
Idris
Raw Normal View History

2020-07-14 01:52:22 +03:00
module Control.Monad.Algebra
import Control.Algebra
import Control.Monad.Identity
%default total
public export
SemigroupV ty => SemigroupV (Identity ty) where
semigroupOpIsAssociative (Id l) (Id c) (Id r) =
rewrite semigroupOpIsAssociative l c r in Refl
public export
MonoidV ty => MonoidV (Identity ty) where
monoidNeutralIsNeutralL (Id l) =
rewrite monoidNeutralIsNeutralL l in Refl
monoidNeutralIsNeutralR (Id r) =
rewrite monoidNeutralIsNeutralR r in Refl