Skip to content

Commit f342001

Browse files
committed
fix 8.6 build
1 parent 147e3b6 commit f342001

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

ghcide/src/Development/IDE/Core/Tracing.hs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ import Control.Monad.Catch (ExitCase (..), MonadMask)
2424
import Control.Monad.Extra (whenJust)
2525
import Control.Monad.IO.Unlift
2626
import Control.Seq (r0, seqList, seqTuple2, using)
27-
#if MIN_VERSION_ghc(8,8,0)
2827
import Data.ByteString (ByteString)
29-
#endif
3028
import Data.ByteString.Char8 (pack)
3129
import Data.Dynamic (Dynamic)
3230
import qualified Data.HashMap.Strict as HMap
@@ -67,8 +65,11 @@ withTrace name act
6765
act setSpan'
6866
| otherwise = act (\_ _ -> pure ())
6967

70-
withEventTrace :: (MonadMask m, MonadIO m) =>
71-
String -> ((ByteString -> ByteString -> m ()) -> m a) -> m a
68+
#if MIN_VERSION_ghc(8,8,0)
69+
withEventTrace :: (MonadMask m, MonadIO m) => String -> ((ByteString -> ByteString -> m ()) -> m a) -> m a
70+
#else
71+
withEventTrace :: (MonadMask m, MonadIO m) => String -> ((String -> ByteString -> m ()) -> m a) -> m a
72+
#endif
7273
withEventTrace name act
7374
| userTracingEnabled
7475
= withSpan (fromString name) $ \sp -> do

0 commit comments

Comments
 (0)