fix: typo at ParamInfo.isExplicit
This commit is contained in:
parent
7dec568ef6
commit
3388c63e11
4 changed files with 18 additions and 2 deletions
|
|
@ -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 := #[]
|
||||
|
|
|
|||
|
|
@ -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 }
|
||||
|
|
|
|||
13
tests/lean/funInfoBug.lean
Normal file
13
tests/lean/funInfoBug.lean
Normal 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)
|
||||
2
tests/lean/funInfoBug.lean.expected.out
Normal file
2
tests/lean/funInfoBug.lean.expected.out
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
[(1, 1), (2, 2)]
|
||||
Std.AssocList.cons 1 1 (Std.AssocList.cons 2 2 Std.AssocList.nil)
|
||||
Loading…
Add table
Reference in a new issue