Skip to content

Commit

Permalink
Respect DontCare in termination checker (#6639)
Browse files Browse the repository at this point in the history
  • Loading branch information
plt-amy committed May 15, 2023
1 parent dbf25c7 commit 3058179
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/full/Agda/Termination/TermCheck.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1313,7 +1313,7 @@ instance StripAllProjections Term where
-- c <- fromRightM (\ err -> return c) $ getConForm (conName c)
Con c ci <$> stripAllProjections ts
Def d es -> Def d <$> stripAllProjections es
DontCare t -> stripAllProjections t
DontCare t -> DontCare <$> stripAllProjections t
_ -> return t

-- | Normalize outermost constructor name in a pattern.
Expand All @@ -1340,8 +1340,7 @@ compareTerm' v mp@(Masked m p) = do
(Var i es, _) | Just{} <- allApplyElims es ->
compareVar i mp

(DontCare t, _) ->
compareTerm' t mp
(DontCare t, _) -> pure Order.unknown

-- Andreas, 2014-09-22, issue 1281:
-- For metas, termination checking should be optimistic.
Expand Down

0 comments on commit 3058179

Please sign in to comment.