Debian Codegraph @

src/Data/List/NonEmpty/Instances.agda

raw
1 ------------------------------------------------------------------------
2 -- The Agda standard library
3 --
4 -- Typeclass instances for List⁺
5 ------------------------------------------------------------------------
6
7 {-# OPTIONS --cubical-compatible --safe #-}
8
9 module Data.List.NonEmpty.Instances where
10
11 open import Data.List.NonEmpty.Effectful
12 using (functor; applicative; monad; comonad)
13 import Data.List.NonEmpty.Effectful.Transformer as Trans
14 using (functor; applicative; monad; monadT)
15 instance
16 -- List⁺ instances
17 nonEmptyListFunctor = functor
18 nonEmptyListApplicative = applicative
19 nonEmptyListMonad = monad
20 nonEmptyListComonad = comonad
21 -- List⁺T instances
22 nonEmptyListTFunctor = λ {f} {g} {M} {{inst}} → Trans.functor {f} {g} {M} inst
23 nonEmptyListTApplicative = λ {f} {g} {M} {{inst}} → Trans.applicative {f} {g} {M} inst
24 nonEmptyListTMonad = λ {f} {g} {M} {{inst}} → Trans.monad {f} {g} {M} inst
25 nonEmptyListTMonadT = λ {f} {g} {M} {{inst}} → Trans.monadT {f} {g} {M} inst