Some useful operations to support selection of FlatCurry expressions via deep pattern matching.
withExp
:: Expr -> Expr
Returns (non-deterministically) some expression that contains the given expression as a subexpression. |
funWithExp
:: (String,String) -> Expr -> FuncDecl
Returns (non-deterministically) a function declaration containing the given expression in the right-hand side. |
inExp
:: Expr -> Expr -> Expr -> Expr
|
withElem
:: a -> a -> [a] -> [a]
Returns a list containing the first argument as an element. |
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. |
Returns (non-deterministically) some expression that contains the given expression as a subexpression.
|
Returns (non-deterministically) a function declaration containing the given expression in the right-hand side.
|
Returns a list containing the first argument as an element.
Furthermore, the third argument is the result list except for
the element which is replaced by the second argument. Hence,
if
|
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.
|