chore: cleanup

This commit is contained in:
Leonardo de Moura 2020-02-13 16:39:36 -08:00
parent da3bf54ec7
commit 2fa19b5881
2 changed files with 7 additions and 4 deletions

View file

@ -98,9 +98,6 @@ structure ElabAppArgsCtx :=
(typeMVars : Array MVarId := #[]) -- metavariables for implicit arguments of the form `{α : Sort u}` that have already been processed
(foundExplicit : Bool := false) -- true if an explicit argument has already been processed
private def isAutoOrOptParam (type : Expr) : Bool :=
type.getOptParamDefault?.isSome || type.getAutoParamTactic?.isSome
/- Auxiliary function for retrieving the resulting type of a function application.
See `propagateExpectedType`. -/
private partial def getForallBody : Nat → Array NamedArg → Expr → Option Expr
@ -112,7 +109,7 @@ private partial def getForallBody : Nat → Array NamedArg → Expr → Option E
getForallBody i namedArgs b
else if i > 0 then
getForallBody (i-1) namedArgs b
else if isAutoOrOptParam d then
else if d.isAutoParam || d.isOptParam then
getForallBody i namedArgs b
else
some type

View file

@ -739,6 +739,12 @@ if e.isAppOfArity `autoParam 2 then
else
none
def isOptParam (e : Expr) : Bool :=
e.isAppOfArity `optParam 2
def isAutoParam (e : Expr) : Bool :=
e.isAppOfArity `autoParam 2
@[specialize] private partial def hasAnyFVarAux (p : FVarId → Bool) : Expr → Bool
| e => if !e.hasFVar then false else
match e with