chore: helper predicates
This commit is contained in:
parent
cee478dc94
commit
01acecf9be
1 changed files with 12 additions and 0 deletions
|
|
@ -428,6 +428,18 @@ def isMData : Expr → Bool
|
|||
| mdata _ _ _ => true
|
||||
| _ => false
|
||||
|
||||
def isLit : Expr → Bool
|
||||
| lit _ _ => true
|
||||
| _ => false
|
||||
|
||||
def isNatLit : Expr → Bool
|
||||
| lit (Literal.natVal _) _ => true
|
||||
| _ => false
|
||||
|
||||
def isStringLit : Expr → Bool
|
||||
| lit (Literal.strVal _) _ => true
|
||||
| _ => false
|
||||
|
||||
def getAppFn : Expr → Expr
|
||||
| app f a _ => getAppFn f
|
||||
| e => e
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue