chore: add helper functions
This commit is contained in:
parent
32fdea86d9
commit
431a5de2b0
1 changed files with 8 additions and 0 deletions
|
|
@ -246,6 +246,14 @@ def isAppOfArity : Expr → Name → Nat → Bool
|
|||
| app f _, n, a+1 => isAppOfArity f n a
|
||||
| _, _, _ => false
|
||||
|
||||
def appFn! : Expr → Expr
|
||||
| app f _ => f
|
||||
| _ => panic! "application expected"
|
||||
|
||||
def appArg! : Expr → Expr
|
||||
| app _ a => a
|
||||
| _ => panic! "application expected"
|
||||
|
||||
def constName! : Expr → Name
|
||||
| const n _ => n
|
||||
| _ => panic! "constant expected"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue