@@ -13,7 +13,7 @@ import Control.Monad (unless)
13
13
import Control.Monad.Except (throwError )
14
14
import Control.Monad.Extra (anyM )
15
15
import Control.Monad.Reader.Class (MonadReader (ask ))
16
- import Control.Monad.State.Strict (StateT (.. ), runStateT , gets )
16
+ import Control.Monad.State.Strict (StateT (.. ), runStateT )
17
17
import Data.Bool (bool )
18
18
import Data.Foldable
19
19
import Data.Functor ((<&>) )
@@ -72,6 +72,10 @@ assume name = rule $ \jdg -> do
72
72
recursion :: TacticsM ()
73
73
-- TODO(sandy): This tactic doesn't fire for the @AutoThetaFix@ golden test,
74
74
-- presumably due to running afoul of 'requireConcreteHole'. Look into this!
75
+
76
+ -- TODO(sandy): There's a bug here! This should use the polymorphic defining
77
+ -- types, not the ones available via 'getCurrentDefinitions'. As it is, this
78
+ -- tactic doesn't support polymorphic recursion.
75
79
recursion = requireConcreteHole $ tracing " recursion" $ do
76
80
defs <- getCurrentDefinitions
77
81
attemptOn (const defs) $ \ (name, ty) -> markRecursion $ do
@@ -349,7 +353,7 @@ destructAll = do
349
353
$ unHypothesis
350
354
$ jHypothesis jdg
351
355
for_ args $ \ arg -> do
352
- subst <- gets ts_unifier
356
+ subst <- getSubstForJudgement =<< goal
353
357
destruct $ fmap (coerce substTy subst) arg
354
358
355
359
--------------------------------------------------------------------------------
0 commit comments