DebugTraceHelpers 0.10 → 0.11
raw patch · 2 files changed
+14/−2 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Debug.Trace.Helpers: dbgFile :: (MonadIO m) => FilePath -> String -> m ()
+ Debug.Trace.Helpers: traceIt :: (Show a) => a -> a
+ Debug.Trace.Helpers: traceMsg :: (Show a) => [Char] -> a -> a
+ Debug.Trace.Helpers: traceReadableMsg :: (Show a) => [Char] -> a -> a
+ Debug.Trace.Helpers: traceTrue :: (Show a) => a -> Bool
+ Debug.Trace.Helpers: traceWith :: (a -> String) -> a -> a
Files
- Debug/Trace/Helpers.hs +12/−0
- DebugTraceHelpers.cabal +2/−2
Debug/Trace/Helpers.hs view
@@ -3,9 +3,21 @@ import Debug.Trace import Control.Monad.Trans +traceTrue :: (Show a) => a -> Bool traceTrue x = trace (show x ++ "\n\n") True+++traceIt :: (Show a) => a -> a traceIt x = trace (show x ++ "\n\n") x++traceMsg :: (Show a) => [Char] -> a -> a traceMsg msg x = trace ( "\n\n" ++ msg ++ (show x) ++ "\n\n") x++traceReadableMsg :: (Show a) => [Char] -> a -> a traceReadableMsg msg x = trace ( "\n\n" ++ msg ++ (show . show $ x) ++ "\n\n") x++dbgFile :: (MonadIO m) => FilePath -> String -> m () dbgFile f x = liftIO $ writeFile f x++traceWith :: (a -> String) -> a -> a traceWith f v = trace (f v) v
DebugTraceHelpers.cabal view
@@ -1,5 +1,5 @@ Name: DebugTraceHelpers-Version: 0.10+Version: 0.11 License: GPL License-file: gpl.txt Description: Convenience functions and instances for tracing, based on Debug.Trace. @@ -10,6 +10,6 @@ Copyright: Copyright (c) 2008 Thomas Hartman Exposed-Modules: Debug.Trace.Helpers Build-Depends: base, mtl -Category: System+Category: Debug Build-type: Simple