Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safe Haskell #68

Merged
merged 3 commits into from Jul 31, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions fast-logger/System/Log/FastLogger.hs
@@ -1,6 +1,7 @@
-- | This module provides a fast logging system which
-- scales on multicore environments (i.e. +RTS -N\<x\>).
{-# LANGUAGE BangPatterns, CPP #-}
{-# LANGUAGE Safe #-}

module System.Log.FastLogger (
-- * Creating a logger set
Expand Down
2 changes: 2 additions & 0 deletions fast-logger/System/Log/FastLogger/File.hs
@@ -1,3 +1,5 @@
{-# LANGUAGE Safe #-}

module System.Log.FastLogger.File where

import Control.Monad (unless, when)
Expand Down
1 change: 1 addition & 0 deletions fast-logger/System/Log/FastLogger/IO.hs
@@ -1,4 +1,5 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE Trustworthy #-}

module System.Log.FastLogger.IO where

Expand Down
1 change: 1 addition & 0 deletions fast-logger/System/Log/FastLogger/IORef.hs
@@ -1,4 +1,5 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE Safe #-}

module System.Log.FastLogger.IORef (
IORef
Expand Down
3 changes: 2 additions & 1 deletion fast-logger/System/Log/FastLogger/LogStr.hs
@@ -1,5 +1,6 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE Safe #-}

module System.Log.FastLogger.LogStr (
Builder
Expand All @@ -13,9 +14,9 @@ module System.Log.FastLogger.LogStr (

import Data.ByteString.Builder (Builder)
import qualified Data.ByteString.Builder as B
import Data.ByteString (ByteString)
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as S8
import Data.ByteString.Internal (ByteString(..))
import qualified Data.ByteString.Lazy as BL
#if __GLASGOW_HASKELL__ < 709
import Data.Monoid (Monoid, mempty, mappend)
Expand Down
1 change: 1 addition & 0 deletions fast-logger/System/Log/FastLogger/Logger.hs
@@ -1,4 +1,5 @@
{-# LANGUAGE BangPatterns, CPP #-}
{-# LANGUAGE Safe #-}

module System.Log.FastLogger.Logger (
Logger(..)
Expand Down
9 changes: 6 additions & 3 deletions monad-logger/Control/Monad/Logger.hs
Expand Up @@ -9,6 +9,7 @@
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE Trustworthy #-}
-- | This module provides the facilities needed for a decoupled logging system.
--
-- The 'MonadLogger' class is implemented by monads that give access to a
Expand Down Expand Up @@ -132,13 +133,15 @@ import Control.Monad.Reader.Class ( MonadReader (..) )
import Control.Monad.State.Class ( MonadState (..) )
import Control.Monad.Writer.Class ( MonadWriter (..) )

import Blaze.ByteString.Builder (toByteString)

import Prelude hiding (catch)

#if !MIN_VERSION_fast_logger(2, 1, 0) && MIN_VERSION_bytestring(0, 10, 2)
#if MIN_VERSION_fast_logger(2, 1, 0)
-- Using System.Log.FastLogger
#elif MIN_VERSION_bytestring(0, 10, 2)
import qualified Data.ByteString.Lazy as L
import Data.ByteString.Builder (toLazyByteString)
#else
import Blaze.ByteString.Builder (toByteString)
#endif

#if MIN_VERSION_conduit_extra(1,1,0)
Expand Down