Skip to content

Commit 43215e2

Browse files
committed
remove redundant plugin names from error messages
1 parent 3087066 commit 43215e2

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

plugins/hls-alternate-number-format-plugin/src/Ide/Plugin/AlternateNumberFormat.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,15 +143,15 @@ isInsideRealSrcSpan :: Position -> RealSrcSpan -> Bool
143143
p `isInsideRealSrcSpan` r = let (Range sp ep) = realSrcSpanToRange r in sp <= p && p <= ep
144144

145145
getFirstPragma :: MonadIO m => PluginId -> IdeState -> NormalizedFilePath -> ExceptT String m NextPragmaInfo
146-
getFirstPragma pId state nfp = handleMaybeM "Error: Could not get NextPragmaInfo" $ do
146+
getFirstPragma pId state nfp = handleMaybeM "Could not get NextPragmaInfo" $ do
147147
ghcSession <- liftIO $ runAction (show pId <> ".GhcSession") state $ useWithStale GhcSession nfp
148148
(_, fileContents) <- liftIO $ runAction (show pId <> ".GetFileContents") state $ getFileContents nfp
149149
case ghcSession of
150150
Just (hscEnv -> hsc_dflags -> sessionDynFlags, _) -> pure $ Just $ getNextPragmaInfo sessionDynFlags fileContents
151151
Nothing -> pure Nothing
152152

153153
requestLiterals :: MonadIO m => PluginId -> IdeState -> NormalizedFilePath -> ExceptT String m CollectLiteralsResult
154-
requestLiterals pId state = handleMaybeM "Error: Could not Collect Literals"
154+
requestLiterals pId state = handleMaybeM "Could not Collect Literals"
155155
. liftIO
156156
. runAction (show pId <> ".CollectLiterals") state
157157
. use CollectLiterals

plugins/hls-change-type-signature-plugin/src/Ide/Plugin/ChangeTypeSignature.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ codeActionHandler ideState _ CodeActionParams {_textDocument = TextDocumentIdent
4545
pure $ List actions
4646

4747
getDecls :: MonadIO m => IdeState -> NormalizedFilePath -> ExceptT String m [LHsDecl GhcPs]
48-
getDecls state = handleMaybeM "Error: Could not get Parsed Module"
48+
getDecls state = handleMaybeM "Could not get Parsed Module"
4949
. liftIO
5050
. fmap (fmap (hsmodDecls . unLoc . pm_parsed_source))
5151
. runAction (changeTypeSignatureId <> ".GetParsedModule") state

plugins/hls-class-plugin/src/Ide/Plugin/Class/CodeAction.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ codeAction recorder state plId (CodeActionParams _ _ docId _ context) = pluginRe
190190
. liftIO
191191
. runAction "classplugin.findClassFromIdentifier.TypeCheck" state
192192
$ useWithStale TypeCheck docPath
193-
handleMaybeM "Error in TcEnv"
193+
handleMaybeM "TcEnv"
194194
. liftIO
195195
. fmap snd
196196
. initTcWithGbl hscenv thisMod ghostSpan $ do

plugins/hls-explicit-fixity-plugin/src/Ide/Plugin/ExplicitFixity.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ descriptor recorder pluginId = (defaultPluginDescriptor pluginId)
4848
hover :: PluginMethodHandler IdeState TextDocumentHover
4949
hover state _ (HoverParams (TextDocumentIdentifier uri) pos _) = pluginResponse $ do
5050
nfp <- getNormalizedFilePath uri
51-
fixityTrees <- handleMaybeM "ExplicitFixity: Unable to get fixity"
51+
fixityTrees <- handleMaybeM "Unable to get fixity"
5252
$ liftIO
5353
$ runAction "ExplicitFixity.GetFixity" state
5454
$ use GetFixity nfp

0 commit comments

Comments
 (0)