playground-common-0.1.0.0

Synopsis

# Documentation

type TraceMaybe a = MaybeT (Writer (Last a)) Source #

Trace is a neat way to run a Maybe monad, but leave a trail behind so that if it fails, we know what step it failed at.

withTrace :: Monad m => Maybe a -> MaybeT m a Source #

attempt :: a -> TraceMaybe a () Source #

runTrace :: e -> TraceMaybe e a -> Either e a Source #