@@ -13,7 +13,7 @@ import Control.Monad (unless)
1313import Control.Monad.Except (throwError )
1414import Control.Monad.Extra (anyM )
1515import Control.Monad.Reader.Class (MonadReader (ask ))
16- import Control.Monad.State.Strict (StateT (.. ), runStateT , gets )
16+ import Control.Monad.State.Strict (StateT (.. ), runStateT )
1717import Data.Bool (bool )
1818import Data.Foldable
1919import Data.Functor ((<&>) )
@@ -72,6 +72,10 @@ assume name = rule $ \jdg -> do
7272recursion :: TacticsM ()
7373-- TODO(sandy): This tactic doesn't fire for the @AutoThetaFix@ golden test,
7474-- 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.
7579recursion = requireConcreteHole $ tracing " recursion" $ do
7680 defs <- getCurrentDefinitions
7781 attemptOn (const defs) $ \ (name, ty) -> markRecursion $ do
@@ -349,7 +353,7 @@ destructAll = do
349353 $ unHypothesis
350354 $ jHypothesis jdg
351355 for_ args $ \ arg -> do
352- subst <- gets ts_unifier
356+ subst <- getSubstForJudgement =<< goal
353357 destruct $ fmap (coerce substTy subst) arg
354358
355359--------------------------------------------------------------------------------
0 commit comments