Copyright | (c) Marcin Mrotek, 2014 |
---|---|
License | BSD3 |
Maintainer | marcin.jan.mrotek@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
Extensions |
|
- class ConstApplicative rs where
- rconst :: (Applicative f, RecApplicative rs) => f a -> f (Rec (Const a) rs)
- constCommute :: Functor f => Const (f a) b -> Compose f (Const a) b
- rtraverseconst :: Applicative f => Rec (Const (f a)) rs -> f (Rec (Const a) rs)
Documentation
class ConstApplicative rs where Source
Extension of pure
to constant type records.
ConstApplicative k ([] k) | |
ConstApplicative k rs => ConstApplicative k ((:) k r rs) |
rconst :: (Applicative f, RecApplicative rs) => f a -> f (Rec (Const a) rs) Source
constCommute :: Functor f => Const (f a) b -> Compose f (Const a) b Source
Commute a constant functor with another functor.
rtraverseconst :: Applicative f => Rec (Const (f a)) rs -> f (Rec (Const a) rs) Source
Distribute a functor over a constant type record.