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 el (Const a) rs)
- constCommute :: Functor f => Const (f a) b -> Compose f (Const a) b
- rconstdist :: Applicative f => Rec el (Const (f a)) rs -> f (Rec el (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 el (Const a) rs) Source
constCommute :: Functor f => Const (f a) b -> Compose f (Const a) b Source
Commute a constant functor with another functor.
rconstdist :: Applicative f => Rec el (Const (f a)) rs -> f (Rec el (Const a) rs) Source
Distribute a functor over a constant type record.