feat: solve ?m t =?= c even when constApprox is disabled

This commit is contained in:
Leonardo de Moura 2020-02-12 13:21:56 -08:00
parent be730fa27f
commit fc404af645
2 changed files with 10 additions and 3 deletions

View file

@ -611,7 +611,7 @@ private partial def processAssignmentAux (mvar : Expr) (mvarDecl : MetavarDecl)
arg ← simpAssignmentArg arg;
let args := args.set ⟨i, h⟩ arg;
let useConstApprox : Unit → MetaM Bool := fun _ =>
if cfg.constApprox then
if cfg.constApprox || (not args.isEmpty && not v.isApp) then
processConstApprox mvar args.size v
else
pure false;

View file

@ -224,8 +224,6 @@ set_option pp.all true
def g1 {α} (a₁ a₂ : α) {β} (b : β) : α × α × β :=
(a₁, a₂, b)
#check @(g1 true)
def id1 : {α : Type} → αα :=
fun x => x
@ -244,6 +242,15 @@ fun x => id1 x
def id5 : {α : Type} → αα :=
@(fun α x => id1 x)
def id6 : {α : Type} → αα :=
fun {α} x => id1 x
def id7 : {α : Type} → αα :=
fun {α} x => @id α x
def id8 : {α : Type} → αα :=
fun {α} x => id (@id α x)
def altTst1 {m σ} [Alternative m] [Monad m] : Alternative (StateT σ m) :=
⟨StateT.failure, StateT.orelse⟩