1234567891011121314151617181920212223242526272829303132333435363738394041424344454647-------------------------------------------------------------------------- The Agda standard library---- An effectful view of the identity function------------------------------------------------------------------------ {-# OPTIONS --cubical-compatible --safe #-} module Function.Identity.Effectful where open import Effect.Functoropen import Effect.Applicativeopen import Effect.Monadopen import Effect.Comonadopen import Function.Base using (id; _∘′_; _|>′_; _$′_; flip)open import Level private variable ℓ : Level Identity : (A : Set ℓ) → Set ℓIdentity A = A functor : RawFunctor {ℓ} Identityfunctor = record { _<$>_ = id } applicative : RawApplicative {ℓ} Identityapplicative = record { rawFunctor = functor ; pure = id ; _<*>_ = _$′_ } monad : RawMonad {ℓ} Identitymonad = record { rawApplicative = applicative ; _>>=_ = _|>′_ } comonad : RawComonad {ℓ} Identitycomonad = record { extract = id ; extend = _$′_ }