packages feed

simple-logging 0.2.0.3 → 0.2.0.4

raw patch · 3 files changed

+9/−8 lines, 3 filesdep ~simple-effects

Dependency ranges changed: simple-effects

Files

CHANGELOG.md view
@@ -1,3 +1,6 @@+# 0.2.0.4
+Updated to simple-effects-0.12.0.0
+
 # 0.2.0.3
 Updated to simple-effects-0.10.0.0
 
simple-logging.cabal view
@@ -1,5 +1,5 @@ name:                simple-logging-version:             0.2.0.3+version:             0.2.0.4 synopsis:            Logging effect to plug into the simple-effects framework homepage:            https://gitlab.com/haskell-hr/logging license:             MIT@@ -23,7 +23,7 @@                      , bytestring                      , iso8601-time                      , text-                     , simple-effects >= 0.10.0.0+                     , simple-effects >= 0.12.0.0                      , exceptions                      , mtl                      , string-conv
src/Control/Effects/Logging.hs view
@@ -2,7 +2,7 @@            , RecordWildCards #-}
 {-# LANGUAGE GADTs, DataKinds #-}
 {-# LANGUAGE DeriveGeneric #-}
-{-# LANGUAGE NoMonomorphismRestriction #-}
+{-# LANGUAGE NoMonomorphismRestriction, DeriveAnyClass #-}
 -- | Use this module to add logging to your monad.
 --   A log is a structured value that can hold information like severity, log message, timestamp,
 --   callstack, etc.
@@ -38,11 +38,9 @@ import Data.Void
 
 -- | The logging effect.
-data Logging
-instance Effect Logging where
-    data EffMethods Logging m = LoggingMethods
-        { _logEffect :: Log -> m () }
-        deriving (Generic)
+newtype Logging m = LoggingMethods
+    { _logEffect :: Log -> m () }
+    deriving (Generic, Effect)
 
 -- | Send a single log into the stream.
 logEffect :: MonadEffect Logging m => Log -> m ()