Skip to content

Commit

Permalink
Merge pull request #8784 from ffaf1/add-trace
Browse files Browse the repository at this point in the history
Add traceM and traceShowM
  • Loading branch information
mergify[bot] authored Feb 25, 2023
2 parents fdcf77b + d9522b8 commit c53acf5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Cabal-syntax/src/Distribution/Compat/Prelude.hs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ module Distribution.Compat.Prelude (
readMaybe,

-- * Debug.Trace (as deprecated functions)
trace, traceShow, traceShowId,
trace, traceShow, traceShowId, traceM, traceShowM
) where

-- We also could hide few partial function
Expand Down Expand Up @@ -286,3 +286,11 @@ traceShowId x = Debug.Trace.traceShow x x
traceShow :: Show a => a -> b -> b
traceShow = Debug.Trace.traceShow
{-# DEPRECATED traceShow "Don't leave me in the code" #-}

traceM :: Applicative f => String -> f ()
traceM = Debug.Trace.traceM
{-# DEPRECATED traceM "Don't leave me in the code" #-}

traceShowM :: (Show a, Applicative f) => a -> f ()
traceShowM = Debug.Trace.traceShowM
{-# DEPRECATED traceShowM "Don't leave me in the code" #-}

0 comments on commit c53acf5

Please sign in to comment.