packages feed

script-monad 0.0.2 → 0.0.2.1

raw patch · 3 files changed

+15/−2 lines, 3 files

Files

ChangeLog.md view
@@ -1,6 +1,14 @@ Changelog for script-monad ========================== +0.0.2.1+-------++* Added+    * Semigroup instance for `W`+++ 0.0.2 ----- 
script-monad.cabal view
@@ -1,5 +1,5 @@ name:           script-monad-version:        0.0.2+version:        0.0.2.1 description:    Please see the README on GitHub at <https://github.com/nbloomf/script-monad#readme> homepage:       https://github.com/nbloomf/script-monad#readme bug-reports:    https://github.com/nbloomf/script-monad/issues
src/Control/Monad/Script/Http.hs view
@@ -148,6 +148,8 @@   ( Typeable ) import Data.Monoid   ( Monoid(..) )+import Data.Semigroup+  ( Semigroup(..) ) import Network.HTTP.Client   ( HttpException(..), CookieJar, HttpExceptionContent(StatusCodeException)   , Response, responseCookieJar, responseBody@@ -582,9 +584,12 @@   { unW :: [LogEntry e w]   } deriving Show +instance Semigroup (W e w) where+  (W a1) <> (W a2) = W (a1 ++ a2)+ instance Monoid (W e w) where   mempty = W []-  mappend (W a1) (W a2) = W (a1 ++ a2)+  mappend = (<>)  data LogEntry e w = LogEntry   { _logEntryTimestamp :: UTCTime