package yuujinchou

  1. Overview
  2. Docs

Module Yuujinchou.PatternSource

Sourcetype path = string list

The type of names.

Sourcetype 'a pattern

The type of patterns, parametrized by the attribute type.

Sourceval inv : 'a pattern -> 'a pattern

Inverting the pattern.

Sourceval wildcard : 'a pattern

Wildcard pattern.

Sourceval root : 'a pattern

The pattern that only matches the root.

Sourceval scope : path -> 'a pattern -> 'a pattern

Scoping a pattern.

Sourceval renaming_scope : path -> path -> 'a pattern -> 'a pattern

Scoping a pattern and rename the prefix.

Sourceval seq : 'a pattern list -> 'a pattern

Sequencing.

Sourceval none : 'a pattern

The pattern that matches nothing.

Sourceval any : 'a pattern

The pattern that matches any name.

Sourceval id : path -> 'a pattern

The pattern that matches only the specified name.

Sourceval renaming : path -> path -> 'a pattern

The pattern that matches only the specified name and replaces it.

Sourceval prefix : path -> 'a pattern

The pattern that matches any name with the given prefix.

Sourceval renaming_prefix : path -> path -> 'a pattern

The pattern that matches any name with the given prefix and replaces the prefix.

Sourceval attr : 'a -> 'a pattern -> 'a pattern

The pattern that assigns the default attribute.

Sourceval join : 'a pattern list -> 'a pattern

Join of a list of patterns.

Sourceval meet : 'a pattern list -> 'a pattern

Meet of a list of patterns.

Sourceval skip : path -> 'a pattern

The pattern that skips the specified name.

Sourceval skip_prefix : path -> 'a pattern

The pattern that skips any name with the specified prefix.

Sourceval pp_path : Format.formatter -> path -> unit

Pretty-printer for path.

Sourceval pp_pattern : (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a pattern -> unit

Pretty-printer for pattern.