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

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

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.


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.1.0, 0.2.0.0, 0.2.1.0, 0.2.1.1, 0.2.1.2, 0.2.2.0, 0.2.2.0
Change log CHANGELOG.md
Dependencies base (>=4.8 && <5), containers (>=0.5.4 && <0.7), free (>=5.0.1 && <5.3), megaparsec (>=7.0.0 && <10.0), mtl (>=2.2.1 && <2.4), parser-combinators (>=1.0.0 && <1.3), prettyprinter (>=1.0.0 && <2.0), recursion-schemes (>=5.0.2 && <5.3), text (>=0.1.0 && <2.2) [details]
License BSD-3-Clause
Copyright Copyright 2020 coord_e
Author coord_e
Maintainer coord_e <me@coord-e.com>, Satoshi Egi <egi@egison.org>
Category Language, Parser, Pretty Printer
Home page https://github.com/egison/egison-pattern-src#readme
Bug tracker https://github.com/egison/egison-pattern-src/issues
Source repo head: git clone https://github.com/egison/egison-pattern-src
Uploaded by SatoshiEgi at 2025-12-19T12:01:22Z

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for egison-pattern-src-0.2.2.0

[back to package description]

Egison Pattern Source

Actions Status Actions Status Hackage Hackage Deps

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.

Syntax

The following is a simplified syntax of pattern expressions where v, c, op and 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)

License

egison-pattern-src is distributed as open source software under the terms of the 3 clause BSD License. See LICENSE for details.