{-# LANGUAGE CPP, NoImplicitPrelude #-}
module Debug.Trace.Compat (
module Base
, traceId
, traceShowId
, traceM
, traceShowM
, traceWith
, traceShowWith
, traceEventWith
) where
import Debug.Trace as Base
#if !(MIN_VERSION_base(4,18,0))
import Prelude.Compat
#endif
#if !(MIN_VERSION_base(4,18,0))
traceWith :: (a -> String) -> a -> a
traceWith f a = trace (f a) a
traceShowWith :: Show b => (a -> b) -> a -> a
traceShowWith f = traceWith (show . f)
traceEventWith :: (a -> String) -> a -> a
traceEventWith f a = traceEvent (f a) a
#endif