fclabels-1.1.7.1: First class accessor labels.

Safe HaskellSafe-Inferred

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.