Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/fast-logger/System/Log/FastLogger.hs b/fast-logger/System/Log/FastLogger.hs
- index 6ecdbcf..8506fbc 100644
- --- a/fast-logger/System/Log/FastLogger.hs
- +++ b/fast-logger/System/Log/FastLogger.hs
- @@ -43,6 +43,8 @@ module System.Log.FastLogger (
- , module System.Log.FastLogger.Date
- -- * File rotation
- , module System.Log.FastLogger.File
- + -- * Types
- + , module System.Log.FastLogger.Types
- ) where
- #if __GLASGOW_HASKELL__ < 709
- @@ -63,6 +65,7 @@ import System.Log.FastLogger.IORef
- import System.Log.FastLogger.LogStr
- import System.Log.FastLogger.Logger
- import System.Log.FastLogger.Date
- +import System.Log.FastLogger.Types
- ----------------------------------------------------------------
- diff --git a/fast-logger/System/Log/FastLogger/Date.hs b/fast-logger/System/Log/FastLogger/Date.hs
- index ceb6f5d..d9666d7 100644
- --- a/fast-logger/System/Log/FastLogger/Date.hs
- +++ b/fast-logger/System/Log/FastLogger/Date.hs
- @@ -4,18 +4,15 @@
- -- |
- -- Formatting time is slow.
- -- This package provides mechanisms to cache formatted date.
- -module System.Log.FastLogger.Date (
- - -- * Types
- - TimeFormat
- - , FormattedTime
- - -- * Date cacher
- - , newTimeCache
- +module System.Log.FastLogger.Date
- + ( -- * Date cacher
- + newTimeCache
- , simpleTimeFormat
- , simpleTimeFormat'
- ) where
- import Control.AutoUpdate (mkAutoUpdate, defaultUpdateSettings, updateAction)
- -import Data.ByteString (ByteString)
- +import System.Log.FastLogger.Types (TimeFormat, FormattedTime)
- #if WINDOWS
- import qualified Data.ByteString.Char8 as BS
- import Data.Time (UTCTime, formatTime, getCurrentTime, utcToLocalZonedTime)
- @@ -31,12 +28,6 @@ import System.Posix (EpochTime, epochTime)
- ----------------------------------------------------------------
- --- | Type aliaes for date format and formatted date.
- -type FormattedTime = ByteString
- -type TimeFormat = ByteString
- -
- -----------------------------------------------------------------
- -
- #if WINDOWS
- -- | Get date using UTC.
- getTime :: IO UTCTime
- diff --git a/fast-logger/System/Log/FastLogger/File.hs b/fast-logger/System/Log/FastLogger/File.hs
- index 4952e3e..84b9587 100644
- --- a/fast-logger/System/Log/FastLogger/File.hs
- +++ b/fast-logger/System/Log/FastLogger/File.hs
- @@ -13,9 +13,7 @@ import Data.ByteString (ByteString)
- import Data.ByteString.Char8 (unpack)
- import System.Directory (doesFileExist, doesDirectoryExist, getPermissions, writable, renameFile)
- import System.FilePath (takeDirectory, dropFileName, takeFileName, (</>))
- -
- -type TimeFormat = ByteString -- redeclaration to allow for LANGUAGE Safe
- -type FormattedTime = ByteString -- redeclaration to allow for LANGUAGE Safe
- +import System.Log.FastLogger.Types (TimeFormat, FormattedTime)
- -- | The spec for logging files
- data FileLogSpec = FileLogSpec {
- diff --git a/fast-logger/System/Log/FastLogger/Types.hs b/fast-logger/System/Log/FastLogger/Types.hs
- new file mode 100644
- index 0000000..682b7d0
- --- /dev/null
- +++ b/fast-logger/System/Log/FastLogger/Types.hs
- @@ -0,0 +1,13 @@
- +module System.Log.FastLogger.Types (
- + -- * Types
- + TimeFormat
- + , FormattedTime
- + ) where
- +
- +import Data.ByteString (ByteString)
- +
- +----------------------------------------------------------------
- +
- +-- | Type aliaes for date format and formatted date.
- +type FormattedTime = ByteString
- +type TimeFormat = ByteString
- diff --git a/fast-logger/fast-logger.cabal b/fast-logger/fast-logger.cabal
- index 40aa884..8646fd4 100644
- --- a/fast-logger/fast-logger.cabal
- +++ b/fast-logger/fast-logger.cabal
- @@ -17,6 +17,7 @@ Library
- Exposed-Modules: System.Log.FastLogger
- System.Log.FastLogger.File
- System.Log.FastLogger.Date
- + System.Log.FastLogger.Types
- Other-Modules: System.Log.FastLogger.IO
- System.Log.FastLogger.FileIO
- System.Log.FastLogger.IORef
Add Comment
Please, Sign In to add comment