Maybe -package:transformers

The Maybe type encapsulates an optional value. A value of type Maybe a either contains a value of type a (represented as Just a), or it is empty (represented as Nothing). Using Maybe is a good way to deal with errors or exceptional cases without resorting to drastic measures such as error. The Maybe type is also a monad. It is a simple kind of error monad, where all errors are represented by Nothing. A richer error monad can be built using the Either type.
The Maybe type, and associated operations.
The Maybe type.
The Maybe type encapsulates an optional value. A value of type Maybe a either contains a value of type a (represented as Just a), or it is empty (represented as Nothing). Using Maybe is a good way to deal with errors or exceptional cases without resorting to drastic measures such as error. The Maybe type is also a monad. It is a simple kind of error monad, where all errors are represented by Nothing. A richer error monad can be built using the Either type.
The strict variant of the standard Haskell Maybe type and the corresponding variants of the functions from Data.Maybe. Note that in contrast to the standard lazy Maybe type, the strict Maybe type is not an applicative functor, and therefore also not a monad. The problem is the homomorphism law, which states that
pure f <*> pure x = pure (f x)  -- must hold for all f
This law does not hold for the expected applicative functor instance of Maybe, as this instance does not satisfy pure f <*> pure _|_ = pure (f _|_) for f = const.
The type of strict optional values.
Utility functions to work with Maybe data type as monad.
TextShow instance for Maybe. Since: 2
A carrier for an Empty effect, indicating failure with a Nothing value. Users that need access to an error message should use the Fail effect. Note that Empty effects can, when they are the last effect in a stack, be interpreted directly to a Maybe without a call to runEmpty.
Utility functions to work with Maybe data type as monad.
Symbolic option type, symbolic version of Haskell's Maybe type.
Extend Maybe by common operations for the Maybe type. Note: since this module is usually imported unqualified, we do not use short names, but all names contain Maybe, Just, or 'Nothing.
The Maybe type encapsulates an optional value. A value of type Maybe a either contains a value of type a (represented as Just a), or it is empty (represented as Nothing). Using Maybe is a good way to deal with errors or exceptional cases without resorting to drastic measures such as error. The Maybe type is also a monad. It is a simple kind of error monad, where all errors are represented by Nothing. A richer error monad can be built using the Either type.
The Maybe type, and associated operations.
Maybe type