term-rewriting-0.1.2.2: Term Rewriting Library

Safe HaskellSafe-Inferred
LanguageHaskell98

Data.Rewriting.Context

Contents

Synopsis

Documentation

data Ctxt f v Source

Constructors

Hole

Hole

Ctxt f [Term f v] (Ctxt f v) [Term f v]

Non-empty context

Instances

(Eq f, Eq v) => Eq (Ctxt f v) 
(Ord f, Ord v) => Ord (Ctxt f v) 
(Show f, Show v) => Show (Ctxt f v) 

Important operations

ofTerm :: Term f v -> Pos -> Maybe (Ctxt f v) Source

Create a context from a term by placing the hole at a specific position.

apply :: Ctxt f v -> Term f v -> Term f v Source

Apply a context to a term (i.e., replace the hole in the context by the term).

Reexported modules