zabt-0.4.0.0: Simple-minded abstract binding trees

Safe HaskellSafe
LanguageHaskell2010

Zabt.View

Synopsis

Documentation

data View v f x Source #

Constructors

VVar !v 
VPat (f x) 
VAbs !v x 

Instances

(Eq v, Eq x, Eq (f x)) => Eq (View v f x) Source # 

Methods

(==) :: View v f x -> View v f x -> Bool #

(/=) :: View v f x -> View v f x -> Bool #

(Ord v, Ord x, Ord (f x)) => Ord (View v f x) Source # 

Methods

compare :: View v f x -> View v f x -> Ordering #

(<) :: View v f x -> View v f x -> Bool #

(<=) :: View v f x -> View v f x -> Bool #

(>) :: View v f x -> View v f x -> Bool #

(>=) :: View v f x -> View v f x -> Bool #

max :: View v f x -> View v f x -> View v f x #

min :: View v f x -> View v f x -> View v f x #

(Show v, Show x, Show (f x)) => Show (View v f x) Source # 

Methods

showsPrec :: Int -> View v f x -> ShowS #

show :: View v f x -> String #

showList :: [View v f x] -> ShowS #

pattern Var :: forall f v. (Freshen v, Foldable f, Ord v, Functor f) => v -> Term v f Source #

Var v creates and matches a Term value corresponding to a free variable.

pattern Abs :: forall f v. (Freshen v, Foldable f, Ord v, Functor f) => v -> Term v f -> Term v f Source #

Abs v t creates and matches a Term value where the free variable v has been abstracted over, becoming bound.

pattern Pat :: forall f v. (Freshen v, Foldable f, Ord v, Functor f) => f (Term v f) -> Term v f Source #

Pat f creates and matches a Term value built from a layer of the pattern functor f.

fold :: (Foldable f, Functor f, Ord v) => View v f (Term v f) -> Term v f Source #

unfold :: (Foldable f, Functor f, Ord v, Freshen v) => Term v f -> View v f (Term v f) Source #