File tree Expand file tree Collapse file tree 1 file changed +16
-13
lines changed
plugins/hls-tactics-plugin/src/Wingman Expand file tree Collapse file tree 1 file changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -283,17 +283,20 @@ letForEach
283
283
-> Hypothesis CType
284
284
-> Judgement
285
285
-> RuleM (Synthesized (LHsExpr GhcPs ))
286
- letForEach rename solve hy jdg = do
287
- let g = jGoal jdg
288
- terms <- fmap sequenceA $ for (unHypothesis hy) $ \ hi -> do
289
- let name = rename $ hi_name hi
290
- res <- tacticToRule jdg $ solve hi
291
- pure $ fmap (name,) res
292
- let hy' = fmap (g <$ ) $ syn_val terms
293
- g <- newSubgoal $ introduce (userHypothesis hy') jdg
294
- pure $ g
295
- & # syn_val %~ noLoc
296
- . let' (fmap (\ (occ, expr) -> valBind (occNameToStr occ) $ unLoc expr)
297
- $ syn_val terms)
298
- . unLoc
286
+ letForEach rename solve (unHypothesis -> hy) jdg = do
287
+ case hy of
288
+ [] -> newSubgoal jdg
289
+ _ -> do
290
+ let g = jGoal jdg
291
+ terms <- fmap sequenceA $ for hy $ \ hi -> do
292
+ let name = rename $ hi_name hi
293
+ res <- tacticToRule jdg $ solve hi
294
+ pure $ fmap (name,) res
295
+ let hy' = fmap (g <$ ) $ syn_val terms
296
+ g <- newSubgoal $ introduce (userHypothesis hy') jdg
297
+ pure $ g
298
+ & # syn_val %~ noLoc
299
+ . let' (fmap (\ (occ, expr) -> valBind (occNameToStr occ) $ unLoc expr)
300
+ $ syn_val terms)
301
+ . unLoc
299
302
You can’t perform that action at this time.
0 commit comments