egison-pattern-src-0.1.0.0: Manipulating Egison patterns: abstract syntax, parser, and pretty-printer

Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Language.Egison.Syntax.Pattern.Combinator

Description

Useful combinators to manipulate Egison pattern ASTs.

Synopsis

Documentation

unAnnotate :: Cofree (ExprF n v e) a -> Expr n v e Source #

Unwrap annotations from AST.

foldExpr :: (ExprF n v e a -> a) -> Expr n v e -> a Source #

fold an v expr.

Note that this is just a type specialization of cata.

mapName :: (n -> n') -> Expr n v e -> Expr n' v e Source #

Map over n in Expr n v e.

mapVarName :: (v -> v') -> Expr n v e -> Expr n v' e Source #

Map over v in Expr n v e.

mapValueExpr :: (e -> e') -> Expr n v e -> Expr n v e' Source #

Map over e in Expr n v e.

variables :: Alternative f => Expr n v e -> f v Source #

List bound pattern variables in a pattern.