Egison Pattern Source
The egison-pattern-src provides a standalone syntax definition for patterns in the Egison programming language. This package enables you to embed Egison's patterns in your parser (pretty-printer) by supplying expression and name parsers (printers) externally. For the uses in Haskell source code, such adaptors for haskell-src-exts and template-haskell are also available as egison-pattern-src-haskell-mode and egison-pattern-src-th-mode, respectively.
The following is a simplified syntax of pattern expressions where
e are meta-variables for variable names, constructor names, user-defined infix operators, and expressions in host language, respectively.
p ::= _ (wildcard pattern) | $v (pattern variable) | #e (value pattern) | ?e (predicate pattern) | (p_1, p_2, ..., p_n) (tuple pattern) | [p_1, p_2, ..., p_n] (collection pattern) | p & p (and-pattern) | p | p (or-pattern) | !p (not-pattern) | p op p (user-defined infix pattern) | c p_1 p_2 ... p_n (constructor pattern)
To build and test
egison-pattern-src locally, run:
$ make test # or just `cabal new-test all`
You can use
make watch to watch for file changes and re-run tests.
*Note that all licence references and agreements mentioned in the egison-pattern-src README section above are relevant to that project's source code only.