Skip to content

Commit 4dfb928

Browse files
committed
switch back to text
1 parent 9c5a728 commit 4dfb928

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

ghcide/src/Development/IDE/LSP/HoverDefinition.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ references ide (ReferenceParams (TextDocumentIdentifier uri) pos _ _ _) = liftIO
4848
Nothing -> pure $ Left $ ResponseError InvalidParams ("Invalid URI " <> T.pack (show uri)) Nothing
4949

5050
wsSymbols :: IdeState -> WorkspaceSymbolParams -> LSP.LspM c (Either ResponseError (List SymbolInformation))
51-
wsSymbols ide (WorkspaceSymbolParams _ _ (T.pack -> query)) = liftIO $ do
51+
wsSymbols ide (WorkspaceSymbolParams _ _ query) = liftIO $ do
5252
logDebug (ideLogger ide) $ "Workspace symbols request: " <> query
5353
runIdeAction "WorkspaceSymbols" (shakeExtras ide) $ Right . maybe (List []) List <$> workspaceSymbols query
5454

ghcide/src/Development/IDE/LSP/Notifications.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ setHandlersNotifications = mconcat
137137
watcher glob = FileSystemWatcher { _globPattern = glob, _kind = Just watchKind }
138138
-- We use multiple watchers instead of one using '{}' because lsp-test doesn't
139139
-- support that: https://github.com/bubba/lsp-test/issues/77
140-
watchers = [ watcher glob | glob <- watchedGlobs opts ]
140+
watchers = [ watcher (Text.pack glob) | glob <- watchedGlobs opts ]
141141

142142
void $ LSP.sendRequest SClientRegisterCapability regParams (const $ pure ()) -- TODO handle response
143143
else liftIO $ logDebug (ideLogger ide) "Warning: Client does not support watched files. Falling back to OS polling"

ghcide/src/Development/IDE/LSP/Server.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import Data.Aeson (Value)
2323
import Development.IDE.Core.Tracing (otSetUri)
2424
import OpenTelemetry.Eventlog (SpanInFlight, setTag)
2525
import Data.Text.Encoding (encodeUtf8)
26-
import qualified Data.Text as T
2726

2827
data ReactorMessage
2928
= ReactorNotification (IO ())
@@ -68,7 +67,7 @@ instance HasTracing DidChangeConfigurationParams
6867
instance HasTracing InitializeParams
6968
instance HasTracing (Maybe InitializedParams)
7069
instance HasTracing WorkspaceSymbolParams where
71-
traceWithSpan sp (WorkspaceSymbolParams _ _ query) = setTag sp "query" (encodeUtf8 $ T.pack query)
70+
traceWithSpan sp (WorkspaceSymbolParams _ _ query) = setTag sp "query" (encodeUtf8 query)
7271

7372
setUriAnd ::
7473
(HasTextDocument params a, HasUri a Uri) =>

ghcide/src/Development/IDE/Plugin/HLS.hs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ extensiblePlugins :: [(PluginId, PluginHandlers IdeState)] -> Plugin Config
140140
extensiblePlugins xs = Plugin mempty handlers
141141
where
142142
IdeHandlers handlers' = foldMap bakePluginId xs
143-
bakePluginId :: (PluginId, PluginHandlers IdeState) -> IdeHandlers IdeState
143+
bakePluginId :: (PluginId, PluginHandlers IdeState) -> IdeHandlers
144144
bakePluginId (pid,PluginHandlers hs) = IdeHandlers $ DMap.map
145145
(\(PluginHandler f) -> IdeHandler [(pid,f pid)])
146146
hs
@@ -185,15 +185,15 @@ combineErrors [x] = x
185185
combineErrors xs = ResponseError InternalError (T.pack (show xs)) Nothing
186186

187187
-- | Combine the 'PluginHandler' for all plugins
188-
newtype IdeHandler a (m :: J.Method FromClient Request)
189-
= IdeHandler [(PluginId,(a -> ExtraParams m -> MessageParams m -> LSP.LspM Config (NonEmpty (Either ResponseError (ResponseResult m)))))]
188+
newtype IdeHandler (m :: J.Method FromClient Request)
189+
= IdeHandler [(PluginId,(IdeState -> ExtraParams m -> MessageParams m -> LSP.LspM Config (NonEmpty (Either ResponseError (ResponseResult m)))))]
190190

191191
-- | Combine the 'PluginHandlers' for all plugins
192-
newtype IdeHandlers a = IdeHandlers (DMap IdeMethod (IdeHandler a))
192+
newtype IdeHandlers = IdeHandlers (DMap IdeMethod IdeHandler)
193193

194-
instance Semigroup (IdeHandlers a) where
194+
instance Semigroup IdeHandlers where
195195
(IdeHandlers a) <> (IdeHandlers b) = IdeHandlers $ DMap.unionWithKey go a b
196196
where
197197
go _ (IdeHandler a) (IdeHandler b) = IdeHandler (a ++ b)
198-
instance Monoid (IdeHandlers a) where
198+
instance Monoid IdeHandlers where
199199
mempty = IdeHandlers mempty

0 commit comments

Comments
 (0)