You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
• Couldn't match expected type ‘LogAction
IO
bytestring-0.10.8.2:Data.ByteString.Lazy.Internal.ByteString’
with actual type ‘(LogAction
m1 bytestring-0.10.8.2:Data.ByteString.Internal.ByteString
-> IO r0)
-> IO r0’
• Probable cause: ‘logger’ is applied to too few arguments
In the second argument of ‘cmap’, namely ‘logger’
In the second argument of ‘withBackgroundLogger’, namely
‘(Aeson.encode `cmap` logger)’
In the expression:
withBackgroundLogger defCapacity (Aeson.encode `cmap` logger)
• Relevant bindings include
logger :: forall r.
(LogAction
m1 bytestring-0.10.8.2:Data.ByteString.Internal.ByteString
-> IO r)
-> IO r
(bound at app/Main.hs:13:5)
|
9 | (Aeson.encode `cmap` logger)
| ^^^^^^
and
• Couldn't match type ‘LogAction m0 msg0’ with ‘LoggerT () IO ()’
Expected type: LogAction m0 msg0 -> IO ()
Actual type: LoggerT () IO () -> IO ()
• In the second argument of ‘($)’, namely
‘usingLoggerT $ do logMsg "Starting application..."’
In the expression:
withBackgroundLogger defCapacity (Aeson.encode `cmap` logger)
$ usingLoggerT $ do logMsg "Starting application..."
In an equation for ‘main’:
main
= withBackgroundLogger defCapacity (Aeson.encode `cmap` logger)
$ usingLoggerT $ do logMsg "Starting application..."
where
logger = withLogByteStringFile "/var/log/myapp/log"
|
10 | $ usingLoggerT $ do
| ^^^^^^^^^^^^^^^^^...
Reproducible with aeson and co-log from lts-14.10.
The text was updated successfully, but these errors were encountered:
@ShrykeWindgrace Thanks for opening the issue and providing a detailed error message. We will look into this example and fix it. And we will also try to make this particular example checked, so this never happens again.
Compiling the provided usage example fails with
and
Reproducible with
aeson
andco-log
from lts-14.10.The text was updated successfully, but these errors were encountered: