-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Debug.Trace equivalent for timing computations -- -- Debug.Trace equivalent for timing computations @package debug-time @version 0.1.0.1 -- | Here's how you can use this package -- --
--   module Main where
--   
--   import Debug.Time
--   
--   -- | Naive implementation
--   fibs :: [Int]
--   fibs = map (fibAt . maybeTimer) [1..]
--       where maybeTimer 10 = startTimer "10-30" 10
--             maybeTimer 30 = traceTimer "10-30" 30
--             maybeTimer 20 = startTimer "20-40" 20
--             maybeTimer 40 = traceTimer "20-40" 40
--             maybeTimer n  = n
--   
--   fibAt :: Int -> Int
--   fibAt 1 = 1
--   fibAt 2 = 1
--   fibAt n = fibAt (n - 1) + fibAt (n - 2)
--   
--   main :: IO ()
--   main = do
--       initializeTimers
--       putStrLn "Calculating the first 40 fibonacci numbers while tracing the time elapsed between"
--       putStrLn "the computations 10-30 and 20-40"
--       mapM_ print (take 40 fibs)
--   
module Debug.Time -- | Ties the evaluation of the value with the start of a timer with the -- given name. startTimer :: String -> a -> a -- | Ties the evaluation of the value with an action tracing the elapsed -- time since the start of the timer. traceTimer :: String -> a -> a -- | Synonym for startTimer. restartTimer :: String -> a -> a -- | Initializes the timer store. This makes the first measurement more -- reliable. initializeTimers :: IO ()