Some useful operations to support selection of FlatCurry expressions via deep pattern matching.
Returns (non-deterministically) some expression that contains the given expression as a subexpression. If they are used as functional patterns, they implement deep pattern matching.
funWithExp
:: (String, String) -> Expr -> FuncDecl
Returns (non-deterministically) a function declaration containing the given expression in the right-hand side.
funWithinExp
:: (String, String) -> Expr -> Expr -> Expr -> FuncDecl
Returns (non-deterministically) some function declaration for the given function name where the right-hand side is the given expression with a variable hole and a subexression.
:: QName
|
The qualified function name |
-> Expr
|
The right-hand side with a hole containing x
|
-> Expr
|
The variable in the hole |
-> Expr
|
The subexpression at the hole in the right-hand side |
-> FuncDecl
|
The function declaration with e
as the right-hand side
|