Merge pull request #4645 from clayrat/patch-14
add runWriter helper
commit83d3acfad6d7b2e6baf4a592edc09844a2d88cf7
authorNiklas Larsson <metaniklas@gmail.com>
dateWed 27 Feb 2019, 01:03 (8 years ago)
parent120e37d2970410
libs/base/Control/Monad/Writer.idr+3
@@ -64,3 +64,6 @@ censor f m = pass $ do a <- m
6464||| The Writer monad itself. See the MonadWriter interface
6565Writer : Type -> Type -> Type
6666Writer w a = WriterT w Identity a
67+
68+runWriter : Writer w a -> (a, w)
69+runWriter = runIdentity . runWriterT