patch applied (packages/monadLib): Replace WriterT with what used to be StrictWriterT

diatchki at cse.ogi.edu diatchki at cse.ogi.edu
Sun Dec 9 20:51:20 EST 2007


Sun Dec  9 17:47:24 PST 2007  diatchki at galois.com
  * Replace WriterT with what used to be StrictWriterT
  
  The strict version seems to be most geenral, and is what should be used
  in most case.  We can recover the behavior of the lazy transformer
  by using a monoid instance like this:
  
  data Lazy a = Lazy a
  instance Monoid a => Monoid (Lazy a) where
    mempty = Lazy mempty
    mappend ~(Lazy a) ~(Lazy b) = Lazy (mappend a b)
  
  

     ./proofs/StrictWriter.txt -> ./proofs/Writer.txt
    M ./monadLib.cabal -1 +1
    M ./src/MonadLib.hs -71 +21
    M ./src/Monads.hs -29 +13
    M ./tests/WritersEvaluation.hs -20 +18


More information about the Cvs-libraries mailing list