fclabels-1.0.4: First class accessor labels.

Data.Label.MaybeM

Contents

Synopsis

MonadState lens operations.

gets :: (MonadState f m, MonadPlus m) => (f :~> a) -> m aSource

Get a value out of state, pointed to by the specified lens that might fail. When the lens getter fails this computation will fall back to mzero.

MonadReader lens operations.

asks :: (MonadReader f m, MonadPlus m) => (f :~> a) -> m aSource

Fetch a value, pointed to by a lens that might fail, out of a reader environment. When the lens getter fails this computation will fall back to mzero.