A monad transformer for tracing error provenience