| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Instances for the reader monad |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 8 |
|
| 9 |
module Effect.Monad.Reader.Instances where |
| 10 |
|
| 11 |
open import Effect.Monad.Reader.Transformer |
| 12 |
|
| 13 |
instance |
| 14 |
readerTFunctor = λ {s} {S} {f} {M} {{fun}} → functor {s} {S} {f} {M} fun |
| 15 |
readerTApplicative = λ {s} {S} {f} {M} {{mon}} → applicative {s} {S} {f} {M} mon |
| 16 |
readerTEmpty = λ {s} {S} {f} {M} {{e}} → empty {s} {S} {f} {M} e |
| 17 |
readerTChoice = λ {s} {S} {f} {M} {{ch}} → choice {s} {S} {f} {M} ch |
| 18 |
readerTApplicativeZero = λ {s} {S} {f} {M} {{mon}} → applicativeZero {s} {S} {f} {M} mon |
| 19 |
readerTAlternative = λ {s} {S} {f} {M} {{mpl}} → alternative {s} {S} {f} {M} mpl |
| 20 |
readerTMonad = λ {s} {S} {f} {M} {{mon}} → monad {s} {S} {f} {M} mon |
| 21 |
readerTMonadZero = λ {s} {S} {f} {M} {{mz}} → monadZero {s} {S} {f} {M} mz |
| 22 |
readerTMonadPlus = λ {s} {S} {f} {M} {{mpl}} → monadPlus {s} {S} {f} {M} mpl |
| 23 |
readerTMonadT = λ {s} {S} {f} {M} {{mon}} → monadT {s} {S} {f} {M} mon |
| 24 |
readerTMonadReader = λ {s} {S} {f} {M} {{mon}} → monadReader {s} {S} {f} {M} mon |
| 25 |
readerTLiftWriterT = λ {s} {S₁} {S₂} {f} {M} {{mo}} {{fun}} {{mr}} → liftWriterT {s} {S₁} {S₂} {f} {M} mo fun mr |
| 26 |
readerTLiftStateT = λ {s} {S₁} {S₂} {f} {M} {{fun}} {{mr}} → liftStateT {s} {S₁} {S₂} {f} {M} fun mr |
| 27 |
-- the following instance conflicts with readerTMonadReader so we don't include it |
| 28 |
-- readerTLiftReaderT = λ {R} {s} {S} {f} {M} {{ms}} → liftReaderT {R} {s} {S} {f} {M} ms |