monadLib 3.6 → 3.6.1
raw patch · 2 files changed
+5/−1 lines, 2 files
Files
- monadLib.cabal +1/−1
- src/MonadLib.hs +4/−0
monadLib.cabal view
@@ -1,5 +1,5 @@ Name: monadLib-Version: 3.6+Version: 3.6.1 License: BSD3 License-file: LICENSE Author: Iavor S. Diatchki
src/MonadLib.hs view
@@ -644,6 +644,10 @@ collect (X m) = X (liftM swap (collect m)) where swap (Right a,w) = Right (a,w) swap (Left x,_) = Left x+instance (RunWriterM m j, MonadFix m) => RunWriterM (ContT i m) j where+ collect (C m) = C $ \k -> fst `liftM`+ mfix (\ ~(_,w) -> collect (m (\a -> k (a,w))))+ -- $WriterM_ExceptionT --