ermine-0.6: Ermine

Copyright(c) Edward Kmett and Dan Doel 2013
LicenseBSD3
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Ermine.Parser.Pattern

Description

This module provides the parser for terms

Synopsis

Documentation

validate :: (Functor m, Monad m, Ord v) => Binder v a -> (v -> m Void) -> m () Source

Check a Binder for linearity.

Each variable name must be used at most once in the pattern.

pattern :: (Monad m, TokenParsing m) => m PP Source

Parse a single pattern (e.g. a case statement alt pattern)

pattern0 :: (Monad m, TokenParsing m) => m PP Source

Parse a single pattern part (e.g. an argument to a lambda)

pattern1 :: (Monad m, TokenParsing m) => m PP Source

type PP = P Ann Text Source

The simple pattern type generated by pattern parsing.