File tree 5 files changed +6
-8
lines changed
tactics/src/Ide/Plugin/Tactic
5 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -85,8 +85,7 @@ import Type.Reflection (Typeable)
85
85
descriptor :: PluginId -> PluginDescriptor
86
86
descriptor plId =
87
87
(defaultPluginDescriptor plId)
88
- { pluginId = plId,
89
- pluginCodeLensProvider = Just provider,
88
+ { pluginCodeLensProvider = Just provider,
90
89
pluginCommands = [evalCommand]
91
90
}
92
91
Original file line number Diff line number Diff line change @@ -95,8 +95,7 @@ import System.FilePath (
95
95
descriptor :: PluginId -> PluginDescriptor
96
96
descriptor plId =
97
97
(defaultPluginDescriptor plId)
98
- { pluginId = plId
99
- , pluginCodeLensProvider = Just codeLens
98
+ { pluginCodeLensProvider = Just codeLens
100
99
, pluginCommands = [PluginCommand editCommandName editCommandName command]
101
100
}
102
101
Original file line number Diff line number Diff line change @@ -154,9 +154,9 @@ destruct' :: (DataCon -> Judgement -> Rule) -> OccName -> Judgement -> Rule
154
154
destruct' f term jdg = do
155
155
when (isDestructBlacklisted jdg) $ throwError NoApplicableTactic
156
156
let hy = jHypothesis jdg
157
- case find (( == term) . fst ) $ toList hy of
157
+ case M. lookup term hy of
158
158
Nothing -> throwError $ UndefinedHypothesis term
159
- Just (_, hi_type -> t) -> do
159
+ Just (hi_type -> t) -> do
160
160
useOccName jdg term
161
161
(tr, ms)
162
162
<- destructMatches
Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ filterSameTypeFromOtherPositions dcon pos jdg =
211
211
(findDconPositionVals jdg dcon pos)
212
212
(WrongBranch pos)
213
213
jdg
214
- tys = S. fromList $ fmap ( hi_type . snd ) $ M. toList hy
214
+ tys = S. fromList $ hi_type <$> M. elems hy
215
215
to_remove =
216
216
M. filter (flip S. member tys . hi_type) (jHypothesis jdg)
217
217
M. \\ hy
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ destructAuto name = requireConcreteHole $ tracing "destruct(auto)" $ do
110
110
in case isPatternMatch $ hi_provenance hi of
111
111
True ->
112
112
pruning subtactic $ \ jdgs ->
113
- let getHyTypes = S. fromList . fmap ( hi_type . snd ) . M. toList . jHypothesis
113
+ let getHyTypes = S. fromList . fmap hi_type . M. elems . jHypothesis
114
114
new_hy = foldMap getHyTypes jdgs
115
115
old_hy = getHyTypes jdg
116
116
in case S. null $ new_hy S. \\ old_hy of
You can’t perform that action at this time.
0 commit comments