Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ cleanup ] remove dead code MkSeqConstraint #3147

Merged
merged 1 commit into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions src/Core/Unify.idr
Original file line number Diff line number Diff line change
Expand Up @@ -1419,27 +1419,6 @@ retry mode c
(\err => do defs <- get Ctxt
empty <- clearDefs defs
throw (WhenUnifying loc (gamma defs) env !(quote empty env x) !(quote empty env y) err))
Just (MkSeqConstraint loc env xsold ysold)
=> do defs <- get Ctxt
xs <- traverse (continueNF defs env) xsold
ys <- traverse (continueNF defs env) ysold
cs <- unifyArgs mode loc env xs ys
case constraints cs of
[] => do deleteConstraint c
pure cs
_ => pure cs
where
definedN : Name -> Core Bool
definedN n@(NS _ (MN _ _)) -- a metavar will only ever be a MN
= do defs <- get Ctxt
Just gdef <- lookupCtxtExact n (gamma defs)
| _ => pure False
case definition gdef of
Hole _ _ => pure (invertible gdef)
BySearch _ _ _ => pure False
Guess _ _ _ => pure False
_ => pure True
definedN _ = pure True

delayMeta : {vars : _} ->
LazyReason -> Nat -> Term vars -> Term vars -> Term vars
Expand Down
17 changes: 0 additions & 17 deletions src/Core/UnifyState.idr
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,6 @@ data Constraint : Type where
(env : Env Term vars) ->
(x : NF vars) -> (y : NF vars) ->
Constraint
-- An unsolved sequence of constraints, arising from arguments in an
-- application where solving later constraints relies on solving earlier
-- ones
MkSeqConstraint : {vars : _} ->
FC ->
(env : Env Term vars) ->
(xs : List (NF vars)) ->
(ys : List (NF vars)) ->
Constraint
-- A resolved constraint
Resolved : Constraint

Expand Down Expand Up @@ -608,12 +599,6 @@ checkValidHole base (idx, (fc, n))
xnf <- quote empty env x
ynf <- quote empty env y
throw (CantSolveEq fc (gamma defs) env xnf ynf)
MkSeqConstraint fc env (x :: _) (y :: _) =>
do put UST ({ guesses := empty } ust)
empty <- clearDefs defs
xnf <- quote empty env x
ynf <- quote empty env y
throw (CantSolveEq fc (gamma defs) env xnf ynf)
_ => pure ()
_ => traverse_ checkRef !(traverse getFullName
((keys (getRefs (Resolved (-1)) (type gdef)))))
Expand Down Expand Up @@ -724,8 +709,6 @@ dumpHole str n hole
"\t from " ++ show !(toFullNames !(quote empty env x))
++ " =?= " ++ show !(toFullNames !(quote empty env y))
++ if lazy then "\n\t(lazy allowed)" else ""
Just (MkSeqConstraint _ _ xs ys) =>
logString str n $ "\t\t" ++ show xs ++ " =?= " ++ show ys

export
dumpConstraints : {auto u : Ref UST UState} ->
Expand Down
Loading