From 6be7ff71f850e90f61c8f3b80b2b513b34891c57 Mon Sep 17 00:00:00 2001 From: Joe Crayne Date: Sat, 11 Jan 2020 21:24:17 -0500 Subject: Removed tput hack. --- dput-hslogger/src/DPut.hs | 8 -------- 1 file changed, 8 deletions(-) (limited to 'dput-hslogger') diff --git a/dput-hslogger/src/DPut.hs b/dput-hslogger/src/DPut.hs index 38e532d0..7a0015b6 100644 --- a/dput-hslogger/src/DPut.hs +++ b/dput-hslogger/src/DPut.hs @@ -33,14 +33,6 @@ dputB tag msg = liftIO $ debugM (appName <.> show tag) (T.unpack . T.decodeUtf8 verbosityMap :: IORef (Map.Map TypeRep Dynamic) verbosityMap = unsafePerformIO $ newIORef (Map.empty) --- | Trace version of 'dput' works in arbitrary monad, using unsafePerformIO. -tput :: (Applicative m, IsDebugTag tag) => tag -> String -> m () -tput tag msg = - let mp = unsafePerformIO $ readIORef verbosityMap - in if maybe True (fromMaybe True . Map.lookup tag . flip fromDyn Map.empty) (Map.lookup (typeOf tag) mp) - then trace msg (pure ()) - else pure () - -- | like 'trace' but parameterized with 'DebugTag' dtrace :: forall a tag. IsDebugTag tag => tag -> String -> a -> a dtrace tag msg result = let mp = unsafePerformIO $ readIORef verbosityMap -- cgit v1.2.3