Provides functions and instances for the Maybe type.
Compatible with the Haskell 2010 Data.Maybe module.
true if and only if the argument is a Maybe.Just value
true if and only if the argument is Maybe.Nothing
This function is preferable over v == Nothing because no Eq constraint is needed.
fromMaybe d (Just a) returns a and fromMaybe d Nothing returns d
unJust Nothing is undefined whereas unJust (Just a) is a
The catMaybes function takes a list of Maybes and returns a list of all the Maybe.Just values.
The mapMaybe function is a version of map which can throw out elements. In particular, the functional argument returns something of type Maybe b. If this is Maybe.Nothing, no element is added on to the result list. If it just Maybe.Just b, then b is included in the result list.
give the first element of a list or Maybe.Nothing
convert a Maybe to a single element list or an empty list
inherited from Applicative.*>
inherited from Applicative.<*
inherited from Eq.!=
Function generated for derived instance.
Function generated for derived instance.
Nothing >>= _ = Nothing
Just a >>= k = k a
inherited from Monad.join
inherited from Ord.<
inherited from Ord.<=
Function generated for derived instance.
inherited from Ord.>
inherited from Ord.>=
inherited from Ord.compare
inherited from Ord.max
inherited from Ord.min