feat: add mkRecFor
This commit is contained in:
parent
38cb8907a0
commit
472276f63f
2 changed files with 5 additions and 1 deletions
|
|
@ -213,4 +213,8 @@ constant instantiateTypeLevelParams (c : @& ConstantInfo) (ls : @& List Level) :
|
|||
constant instantiateValueLevelParams (c : @& ConstantInfo) (ls : @& List Level) : Expr := arbitrary _
|
||||
|
||||
end ConstantInfo
|
||||
|
||||
def mkRecFor (declName : Name) : Name :=
|
||||
mkNameStr declName "rec"
|
||||
|
||||
end Lean
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ else do
|
|||
if s != "recOn" && s != "casesOn" && s != "brecOn" then
|
||||
pure none
|
||||
else do
|
||||
recInfo ← getConstInfo (mkNameStr p "rec");
|
||||
recInfo ← getConstInfo (mkRecFor p);
|
||||
match recInfo with
|
||||
| ConstantInfo.recInfo val => pure (some (val.nparams + val.nindices + (if s == "casesOn" then 1 else val.nmotives)))
|
||||
| _ => throw $ Exception.other "unexpected recursor information"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue