term-rewriting-0.2.1.1: Term Rewriting Library

Safe HaskellSafe
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 v, Eq f) => Eq (Ctxt f v) Source # 

Methods

(==) :: Ctxt f v -> Ctxt f v -> Bool #

(/=) :: Ctxt f v -> Ctxt f v -> Bool #

(Ord v, Ord f) => Ord (Ctxt f v) Source # 

Methods

compare :: Ctxt f v -> Ctxt f v -> Ordering #

(<) :: Ctxt f v -> Ctxt f v -> Bool #

(<=) :: Ctxt f v -> Ctxt f v -> Bool #

(>) :: Ctxt f v -> Ctxt f v -> Bool #

(>=) :: Ctxt f v -> Ctxt f v -> Bool #

max :: Ctxt f v -> Ctxt f v -> Ctxt f v #

min :: Ctxt f v -> Ctxt f v -> Ctxt f v #

(Show v, Show f) => Show (Ctxt f v) Source # 

Methods

showsPrec :: Int -> Ctxt f v -> ShowS #

show :: Ctxt f v -> String #

showList :: [Ctxt f v] -> ShowS #

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