Maintainer bastiaan.heeren@ou.nl provisional portable (depends on ghc) None Haskell98

Recognize.SubExpr.Functions

Description

This module defines commonly used functions within the subexpression recognizer.

Synopsis

# Functions on Symbols

Does this expression have a matched subexpression?

If this expression has been matched, then extracted the matched expression

Substitue any matching with its matched expression

# Auxillary functions

Remove all custom symbols from the expression Useful/necessary for comandisons. Note that it is not possible to remove all symbols (and,or,magicNat,magicVar)

underSubst :: (Expr -> (Expr, [Attribute])) -> Expr -> Maybe (Expr, [Attribute]) Source #

Substitutes all special vars with a unique regular Var then applies some function after which the substitution is reversed

subExprsCombs :: [Expr] -> [([Expr], [Attribute])] Source #

Compute all possible combinations for a list of expressions