Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- type ProfunctorOptic a t u v w = a v w -> a t u
- forceDef :: ArrowApply a => ProfunctorOptic a t u t u
- class Arrow a => Strict a where
- force :: ProfunctorOptic a t u t u
- evalInFst :: (t, u) -> (t, u)
Documentation
type ProfunctorOptic a t u v w = a v w -> a t u Source #
forceDef :: ArrowApply a => ProfunctorOptic a t u t u Source #
class Arrow a => Strict a where Source #
Arrows that have a strictness effect.
force :: ProfunctorOptic a t u t u Source #
Laws:
- Either
a
has arrow apply-constraint, or it is an application of an arrow transformer or both. - Provided
a
has arrow apply-constraint, force =forceDef
. - Provided
a
is an application of an arrow transformer,tmap
force is more defined (less strict) than force. force
has the unique most strict implementation which is compatible with the previous laws.
These laws place limitations on the effects that force
can introduce. Reynolds' parametricity also implies that force
does not change the argument and return values.
Instances
Monad f => Strict (Kleisli f) Source # | |
Defined in Control.CUtils.StrictArrow force :: ProfunctorOptic (Kleisli f) t u t u Source # | |
Strict ((->) :: Type -> Type -> Type) Source # | |
Defined in Control.CUtils.StrictArrow force :: ProfunctorOptic (->) t u t u Source # | |
(Strict a, ArrowChoice a) => Strict (AbortT r a) Source # | |
Defined in Control.CUtils.StrictArrow force :: ProfunctorOptic (AbortT r a) t u t u Source # | |
Strict a => Strict (ReaderT r a) Source # | |
Defined in Control.CUtils.StrictArrow force :: ProfunctorOptic (ReaderT r a) t u t u Source # | |
Strict a => Strict (StateT s a) Source # | |
Defined in Control.CUtils.StrictArrow force :: ProfunctorOptic (StateT s a) t u t u Source # | |
(Strict a, Monoid w) => Strict (WriterT w a) Source # | |
Defined in Control.CUtils.StrictArrow force :: ProfunctorOptic (WriterT w a) t u t u Source # |