Skip to content

Commit e131e25

Browse files
committed
fix 8.6 build
1 parent 7cd9e53 commit e131e25

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

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

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,16 @@ import OpenTelemetry.Eventlog (SpanInFlight (..), addEvent,
5959
mkValueObserver, observe,
6060
setTag, withSpan, withSpan_)
6161

62+
#if MIN_VERSION_ghc(8,8,0)
63+
otTracedProvider :: MonadUnliftIO m => PluginId -> ByteString -> m a -> m a
64+
otTracedGarbageCollection :: (MonadMask f, MonadIO f, Show a) => ByteString -> f [a] -> f [a]
65+
withEventTrace :: (MonadMask m, MonadIO m) => String -> ((ByteString -> ByteString -> m ()) -> m a) -> m a
66+
#else
67+
otTracedProvider :: MonadUnliftIO m => PluginId -> String -> m a -> m a
68+
otTracedGarbageCollection :: (MonadMask f, MonadIO f, Show a) => String -> f [a] -> f [a]
69+
withEventTrace :: (MonadMask m, MonadIO m) => String -> ((String -> ByteString -> m ()) -> m a) -> m a
70+
#endif
71+
6272
withTrace :: (MonadMask m, MonadIO m) =>
6373
String -> ((String -> String -> m ()) -> m a) -> m a
6474
withTrace name act
@@ -68,11 +78,6 @@ withTrace name act
6878
act setSpan'
6979
| otherwise = act (\_ _ -> pure ())
7080

71-
#if MIN_VERSION_ghc(8,8,0)
72-
withEventTrace :: (MonadMask m, MonadIO m) => String -> ((ByteString -> ByteString -> m ()) -> m a) -> m a
73-
#else
74-
withEventTrace :: (MonadMask m, MonadIO m) => String -> ((String -> ByteString -> m ()) -> m a) -> m a
75-
#endif
7681
withEventTrace name act
7782
| userTracingEnabled
7883
= withSpan (fromString name) $ \sp -> do
@@ -130,7 +135,6 @@ otTracedAction key file mode result act
130135
(const act)
131136
| otherwise = act
132137

133-
otTracedGarbageCollection :: (MonadMask f, MonadIO f, Show a) => ByteString -> f [a] -> f [a]
134138
otTracedGarbageCollection label act
135139
| userTracingEnabled = fst <$>
136140
generalBracket
@@ -144,11 +148,6 @@ otTracedGarbageCollection label act
144148
(const act)
145149
| otherwise = act
146150

147-
#if MIN_VERSION_ghc(8,8,0)
148-
otTracedProvider :: MonadUnliftIO m => PluginId -> ByteString -> m a -> m a
149-
#else
150-
otTracedProvider :: MonadUnliftIO m => PluginId -> String -> m a -> m a
151-
#endif
152151
otTracedProvider (PluginId pluginName) provider act
153152
| userTracingEnabled = do
154153
runInIO <- askRunInIO

0 commit comments

Comments
 (0)