Skip to content

Commit 3272a1e

Browse files
committed
Fix improperly pruning split of split
1 parent 929bcc9 commit 3272a1e

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

plugins/tactics/src/Ide/Plugin/Tactic/Tactics.hs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,12 +203,18 @@ splitAuto = do
203203
Nothing -> throwError $ GoalMismatch "split" g
204204
Just (tc, _) -> do
205205
let dcs = tyConDataCons tc
206-
case isSplitWhitelisted jdg of
207-
True -> choice $ fmap splitDataCon dcs
208-
False -> choice $ flip fmap dcs $ \dc -> pruning (splitDataCon dc) $ \jdgs ->
209-
case any ((/= jGoal jdg) . jGoal) jdgs of
210-
True -> Nothing
211-
False -> Just $ UnhelpfulSplit $ nameOccName $ dataConName dc
206+
-- TODO(sandy): Figure out the right strategy for pruning splits of
207+
-- splits
208+
choice $ fmap splitDataCon dcs
209+
-- case isSplitWhitelisted jdg of
210+
-- True -> choice $ fmap splitDataCon dcs
211+
-- False -> do
212+
-- choice $ flip fmap dcs $ \dc -> pruning (splitDataCon dc) $ \jdgs ->
213+
-- case all ((== jGoal jdg) . jGoal) jdgs of
214+
-- False -> Nothing
215+
-- True -> do
216+
-- traceMX "unhelpful split" $ nameOccName $ dataConName dc
217+
-- Just $ UnhelpfulSplit $ nameOccName $ dataConName dc
212218

213219

214220
------------------------------------------------------------------------------

0 commit comments

Comments
 (0)