hasktags 0.68.3 → 0.68.4
raw patch · 2 files changed
+23/−2 lines, 2 files
Files
- hasktags.cabal +2/−2
- src/DebugShow.hs +21/−0
hasktags.cabal view
@@ -1,5 +1,5 @@ Name: hasktags-Version: 0.68.3+Version: 0.68.4 Copyright: The University Court of the University of Glasgow License: BSD3 License-File: LICENSE@@ -63,7 +63,7 @@ json >= 0.5 && < 0.8, interlude, HUnit >= 1.2 && < 1.3- other-modules: Tags, Hasktags+ other-modules: Tags, Hasktags, DebugShow hs-source-dirs: src ghc-options: -Wall default-language: Haskell2010
+ src/DebugShow.hs view
@@ -0,0 +1,21 @@+{-# LANGUAGE CPP #-}+module DebugShow (+trace_+) where++#if debug++-- enable trace messages to understand why thing get/ get not found+import Debug.Trace+trace_ :: (Show a) => String -> a -> ret -> ret+trace_ msg thing ret = trace ("\nmsg: " ++ msg ++ " " ++ (show thing) ++ "\n") ret+{-# INLINE trace_ #-}++#else++-- id function - should have no effect+trace_ :: (Show a) => String -> a -> b -> b+trace_ _ _ ret = ret+{-# INLINE trace_ #-}++#endif