Copyright | (c) Carl Howells 2021-2022 |
---|---|
License | MIT |
Maintainer | chowells79@gmail.com |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- newtype Withering f a = Withering {
- runWithering :: f (Maybe a)
- empty :: Applicative f => Withering f a
Documentation
newtype Withering f a Source #
A replacement for MaybeT
with no short-circuiting
behavior. This allows its Applicative
instance to not require f
to be an instance of Monad
.
Withering | |
|
Instances
Applicative f => Applicative (Withering f) Source # | |
Defined in Witherable.Lens.Withering | |
Functor f => Functor (Withering f) Source # | |
Show (f (Maybe a)) => Show (Withering f a) Source # | |
Eq (f (Maybe a)) => Eq (Withering f a) Source # | |
Ord (f (Maybe a)) => Ord (Withering f a) Source # | |
Defined in Witherable.Lens.Withering compare :: Withering f a -> Withering f a -> Ordering # (<) :: Withering f a -> Withering f a -> Bool # (<=) :: Withering f a -> Withering f a -> Bool # (>) :: Withering f a -> Withering f a -> Bool # (>=) :: Withering f a -> Withering f a -> Bool # |
empty :: Applicative f => Withering f a Source #
A Withering
value wrapping Nothing
. This cannot be part of an
Alternative
instance for Withering
because
it needs to be available with only an Applicative
constraint on
f
, and any lawful Alternative
instance
would require more structure than that.