add runWriter helper

This commit is contained in:
Alex Gryzlov 2019-01-20 13:55:50 +02:00 committed by GitHub
parent 106f6b2d67
commit 29704102f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,3 +64,6 @@ censor f m = pass $ do a <- m
||| The Writer monad itself. See the MonadWriter interface
Writer : Type -> Type -> Type
Writer w a = WriterT w Identity a
runWriter : Writer w a -> (a, w)
runWriter = runIdentity . runWriterT