diff --git a/Data/Hourglass/Format.hs b/Data/Hourglass/Format.hs
--- a/Data/Hourglass/Format.hs
+++ b/Data/Hourglass/Format.hs
@@ -10,6 +10,7 @@
 -- Built-in format strings
 --
 {-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE TypeSynonymInstances #-}
 module Data.Hourglass.Format
     (
     -- * Parsing and Printing
@@ -76,7 +77,7 @@
     }
 
 instance Show TimeFormatFct where
-    show f = timeFormatFctName f
+    show = timeFormatFctName
 instance Eq TimeFormatFct where
     t1 == t2 = timeFormatFctName t1 == timeFormatFctName t2
 
@@ -312,7 +313,7 @@
             | allDigits [h1,h2,m1,m2] = let tz = toTZ isNeg h1 h2 m1 m2
                                          in Right (modTZ (const tz) acc, xs)
             | otherwise               = Left ("not digits chars: " ++ show [h1,h2,m1,m2])
-        parseHM _ _    _ _ = Left ("invalid timezone format")
+        parseHM _ _    _ _ = Left "invalid timezone format"
 
         toTZ isNeg h1 h2 m1 m2 = TimezoneOffset ((if isNeg then negate else id) minutes)
           where minutes = (toInt [h1,h2] * 60) + toInt [m1,m2]
diff --git a/Data/Hourglass/Internal.hs b/Data/Hourglass/Internal.hs
--- a/Data/Hourglass/Internal.hs
+++ b/Data/Hourglass/Internal.hs
@@ -7,10 +7,7 @@
 --
 -- System lowlevel functions
 --
-{-# LANGUAGE ForeignFunctionInterface #-}
 {-# LANGUAGE CPP #-}
-{-# LANGUAGE EmptyDataDecls #-}
-
 module Data.Hourglass.Internal
     ( dateTimeFromUnixEpochP
     , dateTimeFromUnixEpoch
diff --git a/Data/Hourglass/Internal/Unix.hs b/Data/Hourglass/Internal/Unix.hs
--- a/Data/Hourglass/Internal/Unix.hs
+++ b/Data/Hourglass/Internal/Unix.hs
@@ -50,8 +50,13 @@
   where sofTimespec = sofCTime + sofCLong
         sofCTime = sizeOf (0 :: CTime)
         sofCLong = sizeOf (0 :: CLong)
+#if (MIN_VERSION_base(4,5,0))
         toElapsedP :: CTime -> CLong -> ElapsedP
         toElapsedP (CTime sec) nsec = ElapsedP (Elapsed $ Seconds (fromIntegral sec)) (fromIntegral nsec)
+#else
+        toElapsedP :: CLong -> CLong -> ElapsedP
+        toElapsedP sec         nsec = ElapsedP (Elapsed $ Seconds (fromIntegral sec)) (fromIntegral nsec)
+#endif
 
 -- | return the current elapsed
 systemGetElapsed :: IO Elapsed
@@ -59,17 +64,30 @@
     c_clock_get ptr
     toElapsed <$> peek (castPtr ptr)
   where sofTimespec = sizeOf (0 :: CTime) + sizeOf (0 :: CLong)
+#if (MIN_VERSION_base(4,5,0))
         toElapsed :: CTime -> Elapsed
         toElapsed (CTime sec) = Elapsed $ Seconds (fromIntegral sec)
+#else
+        toElapsed :: CLong -> Elapsed
+        toElapsed sec         = Elapsed $ Seconds (fromIntegral sec)
+#endif
 
 foreign import ccall unsafe "hourglass_clock_calendar"
     c_clock_get :: Ptr CLong -> IO ()
 
+#if (MIN_VERSION_base(4,5,0))
 foreign import ccall unsafe "gmtime_r"
     c_gmtime_r :: Ptr CTime -> Ptr CTm -> IO (Ptr CTm)
 
 foreign import ccall unsafe "localtime_r"
     c_localtime_r :: Ptr CTime -> Ptr CTm -> IO (Ptr CTm)
+#else
+foreign import ccall unsafe "gmtime_r"
+    c_gmtime_r :: Ptr CLong -> Ptr CTm -> IO (Ptr CTm)
+
+foreign import ccall unsafe "localtime_r"
+    c_localtime_r :: Ptr CLong -> Ptr CTm -> IO (Ptr CTm)
+#endif
 
 -- | Return a global time's struct tm based on the number of elapsed second since unix epoch.
 rawGmTime :: Elapsed -> CTm
diff --git a/Data/Hourglass/Internal/Win.hs b/Data/Hourglass/Internal/Win.hs
--- a/Data/Hourglass/Internal/Win.hs
+++ b/Data/Hourglass/Internal/Win.hs
@@ -49,7 +49,7 @@
             DateTime (Date (fi wY) (toEnum $ fi $ wM - 1) (fi wD))
                      (TimeOfDay (fi wH) (fi wMin) (fi wS) ns)
         fi :: (Integral a, Num b) => a -> b
-        fi x = fromIntegral x
+        fi = fromIntegral
 
 dateTimeFromUnixEpoch :: Elapsed -> DateTime
 dateTimeFromUnixEpoch e = toDateTime $ callSystemTime e
@@ -57,7 +57,7 @@
             DateTime (Date (fi wY) (toEnum $ fi $ wM - 1) (fi wD))
                      (TimeOfDay (fi wH) (fi wMin) (fi wS) 0)
         fi :: (Integral a, Num b) => a -> b
-        fi x = fromIntegral x
+        fi = fromIntegral
 
 systemGetTimezone :: IO TimezoneOffset
 systemGetTimezone = do
diff --git a/Data/Hourglass/Local.hs b/Data/Hourglass/Local.hs
--- a/Data/Hourglass/Local.hs
+++ b/Data/Hourglass/Local.hs
@@ -1,6 +1,3 @@
-{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-{-# LANGUAGE DeriveDataTypeable #-}
-{-# LANGUAGE FlexibleInstances #-}
 -- |
 -- Module      : Data.Hourglass.Local
 -- License     : BSD-style
@@ -10,6 +7,7 @@
 --
 -- Local time = global time + timezone
 --
+{-# LANGUAGE FlexibleInstances #-}
 module Data.Hourglass.Local
     (
     -- * Local time
@@ -73,7 +71,7 @@
 
 -- | create a local time value from a global one
 localTimeFromGlobal :: Time t => t -> LocalTime t
-localTimeFromGlobal t = localTime (TimezoneOffset 0) t
+localTimeFromGlobal = localTime (TimezoneOffset 0)
 
 -- | Change the timezone, and adjust the local value to represent the new local value.
 localTimeSetTimezone :: Time t => TimezoneOffset -> LocalTime t -> LocalTime t
diff --git a/Data/Hourglass/Time.hs b/Data/Hourglass/Time.hs
--- a/Data/Hourglass/Time.hs
+++ b/Data/Hourglass/Time.hs
@@ -8,9 +8,10 @@
 -- generic time representation interface to allow
 -- arbitrary conversion between different time representation
 --
-{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE DeriveDataTypeable #-}
 {-# LANGUAGE ExistentialQuantification #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
 module Data.Hourglass.Time
     (
     -- * Generic time classes
@@ -36,6 +37,7 @@
     , timeAdd
     , timeDiff
     , timeDiffP
+    , dateAddPeriod
     ) where
 
 import Data.Data ()
@@ -86,6 +88,7 @@
     timeFromElapsed :: Elapsed -> t
     timeFromElapsed e = timeFromElapsedP (ElapsedP e 0)
 
+#if (MIN_VERSION_base(4,5,0))
 instance Timeable CTime where
     timeGetElapsedP c         = ElapsedP (timeGetElapsed c) 0
     timeGetElapsed  (CTime c) = Elapsed (Seconds $ fromIntegral c)
@@ -93,6 +96,7 @@
 instance Time CTime where
     timeFromElapsedP (ElapsedP e _)       = timeFromElapsed e
     timeFromElapsed (Elapsed (Seconds c)) = CTime (fromIntegral c)
+#endif
 
 instance Timeable Elapsed where
     timeGetElapsedP  e = ElapsedP e 0
diff --git a/Data/Hourglass/Types.hs b/Data/Hourglass/Types.hs
--- a/Data/Hourglass/Types.hs
+++ b/Data/Hourglass/Types.hs
@@ -201,7 +201,7 @@
 
 instance Show TimezoneOffset where
     show (TimezoneOffset tz) =
-        concat [(if tz < 0 then "-" else "+"), pad2 tzH, pad2 tzM]
+        concat [if tz < 0 then "-" else "+", pad2 tzH, pad2 tzM]
       where (tzH, tzM) = abs tz `divMod` 60
 
 -- | The UTC timezone. offset of 0
diff --git a/Data/Hourglass/Zone.hs b/Data/Hourglass/Zone.hs
--- a/Data/Hourglass/Zone.hs
+++ b/Data/Hourglass/Zone.hs
@@ -48,5 +48,5 @@
     : (pad0 h ++ ":" ++ pad0 m)
   where (h,m)  = abs offset `divMod` 60
         pad0 v
-            | v < 10    = ('0':show v)
-            | otherwise = (show v)
+            | v < 10    = '0':show v
+            | otherwise = show v
diff --git a/hourglass.cabal b/hourglass.cabal
--- a/hourglass.cabal
+++ b/hourglass.cabal
@@ -1,5 +1,5 @@
 Name:                hourglass
-Version:             0.2.8
+Version:             0.2.9
 Synopsis:            simple performant time related library
 Description:
     Simple time library focusing on simple but powerful and performant API
diff --git a/tests/Tests.hs b/tests/Tests.hs
--- a/tests/Tests.hs
+++ b/tests/Tests.hs
@@ -5,8 +5,6 @@
 module Main where
 
 import Control.Applicative
-import Data.Monoid (mempty)
---import Control.DeepSeq
 
 import Test.Tasty
 import Test.Tasty.QuickCheck
@@ -16,7 +14,6 @@
 import Data.Int
 import Data.Hourglass
 import Data.Hourglass.Epoch
---import System.Hourglass
 
 import Foreign.Storable
 import Foreign.C.Types (CTime)
