diff --git a/Setup.hs b/Setup.hs
deleted file mode 100644
--- a/Setup.hs
+++ /dev/null
@@ -1,2 +0,0 @@
-import Distribution.Simple
-main = defaultMain
diff --git a/perf.cabal b/perf.cabal
--- a/perf.cabal
+++ b/perf.cabal
@@ -1,6 +1,6 @@
-cabal-version: 3.0
+cabal-version:  2.4
 name:           perf
-version:        0.6.0
+version:        0.7.0
 synopsis:       Low-level run time measurement.
 description:     A set of tools to accurately measure time performance of Haskell programs.
                 perf aims to be lightweight by having minimal dependencies on standard libraries.
@@ -30,23 +30,47 @@
       src
   ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints
   build-depends:
-      base >=4.7 && <5
-    , containers
-    , deepseq
-    , foldl
-    , rdtsc
-    , text
-    , time
-    , transformers
+    base >=4.7 && <5,
+    containers >= 0.6,
+    deepseq >= 1.4,
+    foldl >= 1.4,
+    rdtsc >= 1.3,
+    text >= 1.2,
+    time >= 1.9,
+    transformers >= 0.5
   default-language: Haskell2010
+  default-extensions:
+    NegativeLiterals
+    NoImplicitPrelude
+    OverloadedStrings
+    UnicodeSyntax
+  ghc-options:
+    -Wall
+    -Wcompat
+    -Wincomplete-record-updates
+    -Wincomplete-uni-patterns
+    -Wredundant-constraints
 
 test-suite test
   type: exitcode-stdio-1.0
   main-is: test.hs
   hs-source-dirs:
-      test
-  ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints
+    test
   build-depends:
-      base >=4.7 && <5
-    , doctest
+    base >=4.7 && <5,
+    deepseq >= 1.4,
+    doctest >= 0.16,
+    perf,
+    rdtsc >= 1.3
   default-language: Haskell2010
+  default-extensions:
+    NegativeLiterals
+    NoImplicitPrelude
+    OverloadedStrings
+    UnicodeSyntax
+  ghc-options:
+    -Wall
+    -Wcompat
+    -Wincomplete-record-updates
+    -Wincomplete-uni-patterns
+    -Wredundant-constraints
diff --git a/src/Perf.hs b/src/Perf.hs
--- a/src/Perf.hs
+++ b/src/Perf.hs
@@ -3,18 +3,18 @@
 {-# OPTIONS_GHC -Wall #-}
 
 -- | == Introduction
--- 
+--
 -- 'perf' provides high-resolution measurements of the runtime of Haskell functions. It does so by reading the RDTSC register (TSC stands for "time stamp counter"), which is present on all x86 CPUs since the Pentium architecture.
 --
 -- With 'perf' the user may measure both pure and effectful functions, as shown in the Example below. Every piece of code the user may want to profile is passed as an argument to the 'perf' function, along with a text label (that will be displayed in the final summary) and the measurement function (e.g. 'cycles', 'cputime' or 'realtime').
 --
---'PerfT' is a monad transformer designed to collect performance information.
+-- 'PerfT' is a monad transformer designed to collect performance information.
 -- The transformer can be used to add performance measurent to existing code using 'Measure's.
 --
 -- == Example :
 --
 -- Code block to be profiled :
--- 
+--
 -- >   result <- do
 -- >       txt <- readFile "examples/examples.hs"
 -- >       let n = Text.length txt
@@ -45,26 +45,27 @@
 --
 -- Measuring program runtime with RDTSC comes with a set of caveats, such as portability issues, internal timer consistency in the case of multiprocessor architectures, and flucturations due to power throttling. For more details, see : https://en.wikipedia.org/wiki/Time_Stamp_Counter
 module Perf
-  ( PerfT
-  , Perf
-  , perf
-  , perfN
-  , runPerfT
-  , evalPerfT
-  , execPerfT
-  , module Perf.Cycle
-  , module Perf.Measure
+  ( PerfT,
+    Perf,
+    perf,
+    perfN,
+    runPerfT,
+    evalPerfT,
+    execPerfT,
+    module Perf.Cycle,
+    module Perf.Measure,
   )
-  where
+where
 
 import Control.Monad.IO.Class
 import Control.Monad.Trans.Class (lift)
-import Control.Monad.Trans.State (StateT(..), evalStateT, runStateT, execStateT, get, put )
+import Control.Monad.Trans.State (StateT (..), evalStateT, execStateT, get, put, runStateT)
 import Data.Functor.Identity
-import Perf.Cycle
-import Perf.Measure
 import qualified Data.Map as Map
 import qualified Data.Text as T
+import Perf.Cycle
+import Perf.Measure
+import Prelude
 
 -- $setup
 -- >>> import Perf.Cycle
@@ -72,9 +73,11 @@
 
 -- | PerfT is polymorphic in the type of measurement being performed.
 -- The monad stores and produces a Map of labelled measurement values
-newtype PerfT m b a = PerfT
-  { runPerf_ :: StateT (Map.Map T.Text b) m a
-  } deriving (Functor, Applicative, Monad)
+newtype PerfT m b a
+  = PerfT
+      { runPerf_ :: StateT (Map.Map T.Text b) m a
+      }
+  deriving (Functor, Applicative, Monad)
 
 -- | The obligatory transformer over Identity
 type Perf b a = PerfT Identity b a
@@ -93,12 +96,12 @@
 
 -- | Lift a monadic computation to a PerfT m, and carry out the computation multiple times.
 perfN ::
-     (MonadIO m, Monoid b)
-  => Int
-  -> T.Text
-  -> Measure m b
-  -> m a
-  -> PerfT m b a
+  (MonadIO m, Monoid b) =>
+  Int ->
+  T.Text ->
+  Measure m b ->
+  m a ->
+  PerfT m b a
 perfN n label m a =
   PerfT $ do
     st <- get
diff --git a/src/Perf/Cycle.hs b/src/Perf/Cycle.hs
--- a/src/Perf/Cycle.hs
+++ b/src/Perf/Cycle.hs
@@ -7,33 +7,32 @@
 -- The measurement unit - a 'Cycle' - is one oscillation of the chip crystal as measured by the <https://en.wikipedia.org/wiki/Time_Stamp_Counter rdtsc> instruction which inspects the TSC register.
 --
 -- For reference, a computer with a frequency of 2 GHz means that one cycle is equivalent to 0.5 nanoseconds.
---  
 module Perf.Cycle
   ( -- $setup
-    Cycle
-  , tick_
-  , warmup
-  , tick
-  , tick'
-  , tickIO
-  , tickNoinline
-  , ticks
-  , ticksIO
-  , ns
-  , tickWHNF
-  , tickWHNF'
-  , tickWHNFIO
-  , ticksWHNF
-  , ticksWHNFIO
-  , average
+    Cycle,
+    tick_,
+    warmup,
+    tick,
+    tick',
+    tickIO,
+    tickNoinline,
+    ticks,
+    ticksIO,
+    ns,
+    tickWHNF,
+    tickWHNF',
+    tickWHNFIO,
+    ticksWHNF,
+    ticksWHNFIO,
   )
-  where
+where
 
-import Control.DeepSeq (NFData(..), force)
-import qualified Control.Foldl as L (fold, sum, premap, genericLength)
+import Control.DeepSeq (NFData (..), force)
+import qualified Control.Foldl as L (fold, genericLength, premap, sum)
 import Control.Monad (replicateM)
 import GHC.Word (Word64)
 import System.CPUTime.Rdtsc
+import Prelude
 
 -- $setup
 -- >>> import Perf.Cycle
@@ -41,7 +40,6 @@
 -- >>> let n = 1000
 -- >>> let a = 1000
 -- >>> let f x = foldl' (+) 0 [1 .. x]
---
 
 -- | an unwrapped Word64
 type Cycle = Word64
@@ -78,7 +76,6 @@
 -- >>> t <- tick_ -- first measure can be very high
 -- >>> _ <- warmup 100
 -- >>> t <- tick_ -- should be around 20 (3k for ghci)
---
 warmup :: Int -> IO Double
 warmup n = do
   ts <- replicateM n tick_
@@ -110,7 +107,6 @@
 -- | measures and deeply evaluates an `IO a`
 --
 -- >>> (cs, _) <- tickIO (pure (f a))
---
 tickIO :: (NFData a) => IO a -> IO (Cycle, a)
 tickIO a = do
   t <- rdtsc
@@ -129,7 +125,7 @@
 -- GHC is very good at finding ways to share computation, and anything measuring a computation multiple times is a prime candidate for aggresive ghc treatment. Internally, ticks uses a noinline pragma and a noinline version of to help reduce the chances of memoization, but this is an inexact science in the hands of he author, at least, so interpret with caution.
 -- The use of noinline interposes an extra function call, which can highly skew very fast computations.
 --
--- 
+--
 -- >>> let n = 1000
 -- >>> (cs, fa) <- ticks n f a
 --
@@ -141,15 +137,14 @@
 -- > fPoly x = foldl' (+) 0 [1 .. x]
 -- > fLambda :: Int -> Int
 -- > fLambda = \x -> foldl' (+) 0 [1 .. x]
---
 ticks :: NFData b => Int -> (a -> b) -> a -> IO ([Cycle], b)
 ticks n0 f a = go f a n0 []
   where
     go f' a' n ts
       | n <= 0 = pure (reverse ts, f a)
       | otherwise = do
-          (t,_) <- tickNoinline f a
-          go f' a' (n - 1) (t:ts)
+        (t, _) <- tickNoinline f a
+        go f' a' (n - 1) (t : ts)
 {-# NOINLINE ticks #-}
 
 -- | n measuremenst of a tickIO
@@ -157,17 +152,16 @@
 -- returns an IO tuple; list of Cycles and the last evaluated f a
 --
 -- >>> (cs, fa) <- ticksIO n (pure $ f a)
---
 ticksIO :: (NFData a) => Int -> IO a -> IO ([Cycle], a)
 ticksIO n0 a = go a n0 []
   where
     go a' n ts
       | n <= 0 = do
-            a'' <- a'
-            pure (reverse ts, a'')
+        a'' <- a'
+        pure (reverse ts, a'')
       | otherwise = do
-          (t,_) <- tickIONoinline a'
-          go a' (n - 1) (t:ts)
+        (t, _) <- tickIONoinline a'
+        go a' (n - 1) (t : ts)
 {-# NOINLINE ticksIO #-}
 
 -- | make a series of measurements on a list of a's to be applied to f, for a tick function.
@@ -175,8 +169,7 @@
 -- Tends to be fragile to sharing issues, but very useful to determine computation Order
 --
 -- > ns ticks n f [1,10,100,1000]
---
-ns :: (a -> IO ([Cycle],b)) -> [a] -> IO ([[Cycle]], [b])
+ns :: (a -> IO ([Cycle], b)) -> [a] -> IO ([[Cycle]], [b])
 ns t as = do
   cs <- sequence $ t <$> as
   pure (fst <$> cs, snd <$> cs)
@@ -184,7 +177,6 @@
 -- | average of an Integral foldable
 --
 -- > cAv <- average <$> ticks n f a
---
 average :: (Integral a, Foldable f) => f a -> Double
 average = L.fold (L.premap fromIntegral ((/) <$> L.sum <*> L.genericLength))
 
@@ -223,8 +215,8 @@
     go f' a' n ts
       | n <= 0 = pure (reverse ts, f a)
       | otherwise = do
-          (t,_) <- tickWHNFNoinline f a
-          go f' a' (n - 1) (t:ts)
+        (t, _) <- tickWHNFNoinline f a
+        go f' a' (n - 1) (t : ts)
 {-# NOINLINE ticksWHNF #-}
 
 -- | WHNF version
@@ -233,9 +225,9 @@
   where
     go a' n ts
       | n <= 0 = do
-            a'' <- a'
-            pure (reverse ts, a'')
+        a'' <- a'
+        pure (reverse ts, a'')
       | otherwise = do
-          (t,_) <- tickWHNFIONoinline a'
-          go a' (n - 1) (t:ts)
+        (t, _) <- tickWHNFIONoinline a'
+        go a' (n - 1) (t : ts)
 {-# NOINLINE ticksWHNFIO #-}
diff --git a/src/Perf/Measure.hs b/src/Perf/Measure.hs
--- a/src/Perf/Measure.hs
+++ b/src/Perf/Measure.hs
@@ -1,31 +1,31 @@
-{-# LANGUAGE ExistentialQuantification #-}
 {-# LANGUAGE BangPatterns #-}
+{-# LANGUAGE ExistentialQuantification #-}
 {-# OPTIONS_GHC -Wall #-}
 {-# OPTIONS_GHC -fno-warn-orphans #-}
 
 -- | Specification of a performance measurement type suitable for the 'PerfT' monad transformer.
 module Perf.Measure
-  ( Measure(..)
-  , runMeasure
-  , runMeasureN
-  , cost
-  , cputime
-  , realtime
-  , count
-  , cycles
-  , Additive(..)
+  ( Measure (..),
+    runMeasure,
+    runMeasureN,
+    cost,
+    cputime,
+    realtime,
+    count,
+    cycles,
+    Additive (..),
   )
-  where
+where
 
+import Control.Monad (replicateM_)
 import Data.Time.Clock
 import GHC.Word (Word64)
-import Control.Monad (replicateM_)
-import Perf.Cycle 
+import Perf.Cycle
 import System.CPUTime
 import System.CPUTime.Rdtsc
-
+import Prelude
 
--- | Lightweight 'Additive' class. 
+-- | Lightweight 'Additive' class.
 class Num a => Additive a where
   add :: a -> a -> a
   zero :: a
@@ -45,30 +45,29 @@
 instance Additive NominalDiffTime where
   add = (+)
   zero = 0
-  
 
 -- $setup
 -- >>> import Data.Foldable (foldl')
---
 
 -- | A Measure consists of a monadic effect prior to measuring, a monadic effect to finalise the measurement, and the value measured
 --
 -- For example, the measure specified below will return 1 every time measurement is requested, thus forming the base of a simple counter for loopy code.
 --
 -- >>> let count = Measure 0 (pure ()) (pure 1)
-data Measure m b = forall a. (Additive b) => Measure
-  { measure :: b
-  , prestep :: m a
-  , poststep :: a -> m b
-  }
-
+data Measure m b
+  = forall a.
+    (Additive b) =>
+    Measure
+      { measure :: b,
+        prestep :: m a,
+        poststep :: a -> m b
+      }
 
 -- | Measure a single effect.
 --
 -- >>> r <- runMeasure count (pure "joy")
 -- >>> r
 -- (1,"joy")
---
 runMeasure :: Monad m => Measure m b -> m a -> m (b, a)
 runMeasure (Measure _ pre post) a = do
   p <- pre
@@ -81,7 +80,6 @@
 -- >>> r <- runMeasureN 1000 count (pure "joys")
 -- >>> r
 -- (1,"joys")
---
 runMeasureN :: Monad m => Int -> Measure m b -> m a -> m (b, a)
 runMeasureN n (Measure _ pre post) a = do
   p <- pre
@@ -96,14 +94,13 @@
 -- >>> r
 -- 1
 cost :: Monad m => Measure m b -> m b
-cost (Measure _ pre post) = pre >>= post 
+cost (Measure _ pre post) = pre >>= post
 
 -- | a measure using 'getCPUTime' from System.CPUTime (unit is picoseconds)
 --
 -- >>> r <- runMeasure cputime (pure $ foldl' (+) 0 [0..1000])
 --
 -- > (34000000,500500)
---
 cputime :: Measure IO Integer
 cputime = Measure 0 start stop
   where
@@ -117,7 +114,6 @@
 -- >>> r <- runMeasure realtime (pure $ foldl' (+) 0 [0..1000])
 --
 -- > (0.000046s,500500)
---
 realtime :: Measure IO NominalDiffTime
 realtime = Measure m0 start stop
   where
@@ -132,7 +128,6 @@
 -- >>> r <- runMeasure count (pure ())
 -- >>> r
 -- (1,())
---
 count :: Measure IO Int
 count = Measure m0 start stop
   where
@@ -143,10 +138,9 @@
 -- | a 'Measure' using the 'rdtsc' CPU register (units are in cycles)
 --
 -- >>> r <- runMeasureN 1000 cycles (pure ())
--- 
+--
 -- > (120540,()) -- ghci-level
 -- > (18673,())  -- compiled with -O2
---
 cycles :: Measure IO Cycle
 cycles = Measure m0 start stop
   where
@@ -155,4 +149,3 @@
     stop a = do
       t <- rdtsc
       return $ t - a
-
diff --git a/test/test.hs b/test/test.hs
--- a/test/test.hs
+++ b/test/test.hs
@@ -3,6 +3,7 @@
 module Main where
 
 import Test.DocTest
+import Prelude
 
 main :: IO ()
 main = do
