diff --git a/plugins/default/src/Ide/Plugin/Eval.hs b/plugins/default/src/Ide/Plugin/Eval.hs index e91396c03d..791a018db8 100644 --- a/plugins/default/src/Ide/Plugin/Eval.hs +++ b/plugins/default/src/Ide/Plugin/Eval.hs @@ -85,8 +85,7 @@ import Type.Reflection (Typeable) descriptor :: PluginId -> PluginDescriptor descriptor plId = (defaultPluginDescriptor plId) - { pluginId = plId, - pluginCodeLensProvider = Just provider, + { pluginCodeLensProvider = Just provider, pluginCommands = [evalCommand] } diff --git a/plugins/default/src/Ide/Plugin/ModuleName.hs b/plugins/default/src/Ide/Plugin/ModuleName.hs index 0fabfe72cf..a1bfb34432 100644 --- a/plugins/default/src/Ide/Plugin/ModuleName.hs +++ b/plugins/default/src/Ide/Plugin/ModuleName.hs @@ -95,8 +95,7 @@ import System.FilePath ( descriptor :: PluginId -> PluginDescriptor descriptor plId = (defaultPluginDescriptor plId) - { pluginId = plId - , pluginCodeLensProvider = Just codeLens + { pluginCodeLensProvider = Just codeLens , pluginCommands = [PluginCommand editCommandName editCommandName command] } diff --git a/plugins/tactics/src/Ide/Plugin/Tactic/CodeGen.hs b/plugins/tactics/src/Ide/Plugin/Tactic/CodeGen.hs index 2afc9acb10..7ee099c20d 100644 --- a/plugins/tactics/src/Ide/Plugin/Tactic/CodeGen.hs +++ b/plugins/tactics/src/Ide/Plugin/Tactic/CodeGen.hs @@ -154,9 +154,9 @@ destruct' :: (DataCon -> Judgement -> Rule) -> OccName -> Judgement -> Rule destruct' f term jdg = do when (isDestructBlacklisted jdg) $ throwError NoApplicableTactic let hy = jHypothesis jdg - case find ((== term) . fst) $ toList hy of + case M.lookup term hy of Nothing -> throwError $ UndefinedHypothesis term - Just (_, hi_type -> t) -> do + Just (hi_type -> t) -> do useOccName jdg term (tr, ms) <- destructMatches diff --git a/plugins/tactics/src/Ide/Plugin/Tactic/Judgements.hs b/plugins/tactics/src/Ide/Plugin/Tactic/Judgements.hs index d4fdc6fa00..7a024f85fb 100644 --- a/plugins/tactics/src/Ide/Plugin/Tactic/Judgements.hs +++ b/plugins/tactics/src/Ide/Plugin/Tactic/Judgements.hs @@ -211,7 +211,7 @@ filterSameTypeFromOtherPositions dcon pos jdg = (findDconPositionVals jdg dcon pos) (WrongBranch pos) jdg - tys = S.fromList $ fmap (hi_type . snd) $ M.toList hy + tys = S.fromList $ hi_type <$> M.elems hy to_remove = M.filter (flip S.member tys . hi_type) (jHypothesis jdg) M.\\ hy diff --git a/plugins/tactics/src/Ide/Plugin/Tactic/Tactics.hs b/plugins/tactics/src/Ide/Plugin/Tactic/Tactics.hs index 8f6de3ebce..804fb4d7ff 100644 --- a/plugins/tactics/src/Ide/Plugin/Tactic/Tactics.hs +++ b/plugins/tactics/src/Ide/Plugin/Tactic/Tactics.hs @@ -110,7 +110,7 @@ destructAuto name = requireConcreteHole $ tracing "destruct(auto)" $ do in case isPatternMatch $ hi_provenance hi of True -> pruning subtactic $ \jdgs -> - let getHyTypes = S.fromList . fmap (hi_type . snd) . M.toList . jHypothesis + let getHyTypes = S.fromList . fmap hi_type . M.elems . jHypothesis new_hy = foldMap getHyTypes jdgs old_hy = getHyTypes jdg in case S.null $ new_hy S.\\ old_hy of