fix: typo at ParamInfo.isExplicit

This commit is contained in:
Leonardo de Moura 2021-01-11 07:08:17 -08:00
parent 7dec568ef6
commit 3388c63e11
4 changed files with 18 additions and 2 deletions

View file

@ -63,7 +63,7 @@ structure ParamInfo where
deriving Inhabited
def ParamInfo.isExplicit (p : ParamInfo) : Bool :=
!p.implicit && p.instImplicit
!p.implicit && !p.instImplicit
structure FunInfo where
paramInfo : Array ParamInfo := #[]

View file

@ -64,7 +64,8 @@ private def getFunInfoAux (fn : Expr) (maxArgs? : Option Nat) : MetaM FunInfo :=
pinfo := pinfo.push {
backDeps := backDeps,
implicit := decl.binderInfo == BinderInfo.implicit,
instImplicit := decl.binderInfo == BinderInfo.instImplicit }
instImplicit := decl.binderInfo == BinderInfo.instImplicit
}
let resultDeps := collectDeps fvars type
let pinfo := updateHasFwdDeps pinfo resultDeps
pure { resultDeps := resultDeps, paramInfo := pinfo }

View file

@ -0,0 +1,13 @@
import Std.Data.AssocList
def l : List (Prod Nat Nat) := [(1, 1), (2, 2)]
#eval l -- works
def Std.AssocList.ToList : AssocList α β → List (α × β)
| AssocList.nil => []
| AssocList.cons k v t => (k, v) :: ToList t
instance [Repr α] [Repr β] : Repr (Std.AssocList α β) where
reprPrec f _ := repr f.ToList
#reduce (l.toAssocList)

View file

@ -0,0 +1,2 @@
[(1, 1), (2, 2)]
Std.AssocList.cons 1 1 (Std.AssocList.cons 2 2 Std.AssocList.nil)