This repository was archived by the owner on Oct 7, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
hie-plugin-api/Haskell/Ide/Engine Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -276,17 +276,17 @@ toDynJSON = CD.toDyn
276
276
-- arguments in the form of a JSON object.
277
277
runPluginCommand :: PluginId -> CommandId -> Value
278
278
-> IdeGhcM (IdeResult DynamicJSON )
279
- runPluginCommand p com arg = do
279
+ runPluginCommand p@ ( PluginId pText) com@ ( CommandId comText) arg = do
280
280
m <- getPlugins
281
281
case Map. lookup p m of
282
282
Nothing -> return $
283
- IdeResultFail $ IdeError UnknownPlugin (T. pack $ " Plugin " <> show p <> " doesn't exist" ) Null
283
+ IdeResultFail $ IdeError UnknownPlugin (" Plugin " <> pText <> " doesn't exist" ) Null
284
284
Just PluginDescriptor { pluginCommands = xs } -> case List. find ((com == ) . commandId) xs of
285
285
Nothing -> return $ IdeResultFail $
286
- IdeError UnknownCommand (T. pack $ " Command " <> show com <> " isn't defined for plugin " <> show p <> " . Legal commands are: " <> (show $ map commandId xs)) Null
286
+ IdeError UnknownCommand (" Command " <> comText <> " isn't defined for plugin " <> pText <> " . Legal commands are: " <> (T. pack $ show $ map ( \ ( CommandId x) -> x) $ map commandId xs)) Null
287
287
Just (PluginCommand _ f) -> case fromJSON arg of
288
288
Error err -> return $ IdeResultFail $
289
- IdeError ParameterError (T. pack $ " error while parsing args for " <> show com <> " in plugin " <> show p <> " : " <> err) Null
289
+ IdeError ParameterError (" error while parsing args for " <> comText <> " in plugin " <> pText <> " : " <> T. pack err) Null
290
290
Success a -> do
291
291
res <- f a
292
292
return $ fmap toDynJSON res
You can’t perform that action at this time.
0 commit comments