Skip to content

Instantly share code, notes, and snippets.

@sevanspowell
Last active February 14, 2019 00:32
Show Gist options
  • Save sevanspowell/6c7ef1adbd850d299a4d53a502d9dd34 to your computer and use it in GitHub Desktop.
Save sevanspowell/6c7ef1adbd850d299a4d53a502d9dd34 to your computer and use it in GitHub Desktop.
Type inference limitation?
class HasLoggingRep a where
toLogEntry :: a -> Text
-- ...
where
logInfo :: forall a . HasLoggingRep a => a -> IO ()
logInfo = loggerF logger Info . toLogEntry
-- ...
someFn response = do
logInfo response
someFn2 request = do
logInfo request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment