syntax-tree-0.1.0.1: Typed ASTs

Safe HaskellSafe
LanguageHaskell2010

AST.Class.Apply

Description

A variant of Apply for Knots

Synopsis

Documentation

class KFunctor k => KApply k where Source #

A variant of Apply for Knots.

A type which has KApply and KPointed instances also has KApplicative, which is the equivalent to the Applicative class.

Methods

zipK :: Tree k p -> Tree k q -> Tree k (Product p q) Source #

Combine child values

>>> zipK (Person name0 age0) (Person name1 age1)
Person (Pair name0 name1) (Pair age0 age1)
Instances
KApply Pure Source # 
Instance details

Defined in AST.Knot.Pure

Methods

zipK :: Tree Pure p -> Tree Pure q -> Tree Pure (Product p q) Source #

KApply Prune Source # 
Instance details

Defined in AST.Knot.Prune

Methods

zipK :: Tree Prune p -> Tree Prune q -> Tree Prune (Product p q) Source #

KApply (ANode c) Source # 
Instance details

Defined in AST.Combinator.ANode

Methods

zipK :: Tree (ANode c) p -> Tree (ANode c) q -> Tree (ANode c) (Product p q) Source #

Applicative f => KApply (F f) Source # 
Instance details

Defined in AST.Knot.Functor

Methods

zipK :: Tree (F f) p -> Tree (F f) q -> Tree (F f) (Product p q) Source #

Semigroup a => KApply (Ann a) Source # 
Instance details

Defined in AST.Knot.Ann

Methods

zipK :: Tree (Ann a) p -> Tree (Ann a) q -> Tree (Ann a) (Product p q) Source #

KApply (FuncType typ) Source # 
Instance details

Defined in AST.Term.FuncType

Methods

zipK :: Tree (FuncType typ) p -> Tree (FuncType typ) q -> Tree (FuncType typ) (Product p q) Source #

KApply (App expr) Source # 
Instance details

Defined in AST.Term.App

Methods

zipK :: Tree (App expr) p -> Tree (App expr) q -> Tree (App expr) (Product p q) Source #

KApply (ScopeTypes t) Source # 
Instance details

Defined in AST.Term.NamelessScope

Methods

zipK :: Tree (ScopeTypes t) p -> Tree (ScopeTypes t) q -> Tree (ScopeTypes t) (Product p q) Source #

Semigroup a => KApply (Const a :: Knot -> Type) Source # 
Instance details

Defined in AST.Class.Apply

Methods

zipK :: Tree (Const a) p -> Tree (Const a) q -> Tree (Const a) (Product p q) Source #

(KApply a, KApply b) => KApply (Compose a b) Source # 
Instance details

Defined in AST.Combinator.Compose

Methods

zipK :: Tree (Compose a b) p -> Tree (Compose a b) q -> Tree (Compose a b) (Product p q) Source #

Applicative (Map k) => KApply (TermMap k expr) Source # 
Instance details

Defined in AST.Term.Map

Methods

zipK :: Tree (TermMap k expr) p -> Tree (TermMap k expr) q -> Tree (TermMap k expr) (Product p q) Source #

Semigroup v => KApply (Var v expr) Source # 
Instance details

Defined in AST.Term.Var

Methods

zipK :: Tree (Var v expr) p -> Tree (Var v expr) q -> Tree (Var v expr) (Product p q) Source #

Semigroup (Tree varTypes QVars) => KApply (Scheme varTypes typ) Source # 
Instance details

Defined in AST.Term.Scheme

Methods

zipK :: Tree (Scheme varTypes typ) p -> Tree (Scheme varTypes typ) q -> Tree (Scheme varTypes typ) (Product p q) Source #

KApply (TypeSig vars term) Source # 
Instance details

Defined in AST.Term.TypeSig

Methods

zipK :: Tree (TypeSig vars term) p -> Tree (TypeSig vars term) q -> Tree (TypeSig vars term) (Product p q) Source #

Semigroup nomId => KApply (FromNom nomId term) Source # 
Instance details

Defined in AST.Term.Nominal

Methods

zipK :: Tree (FromNom nomId term) p -> Tree (FromNom nomId term) q -> Tree (FromNom nomId term) (Product p q) Source #

Semigroup nomId => KApply (ToNom nomId term) Source # 
Instance details

Defined in AST.Term.Nominal

Methods

zipK :: Tree (ToNom nomId term) p -> Tree (ToNom nomId term) q -> Tree (ToNom nomId term) (Product p q) Source #

Semigroup v => KApply (Let v expr) Source # 
Instance details

Defined in AST.Term.Let

Methods

zipK :: Tree (Let v expr) p -> Tree (Let v expr) q -> Tree (Let v expr) (Product p q) Source #

Semigroup v => KApply (Lam v expr) Source # 
Instance details

Defined in AST.Term.Lam

Methods

zipK :: Tree (Lam v expr) p -> Tree (Lam v expr) q -> Tree (Lam v expr) (Product p q) Source #

KApply (Scope expr a) Source # 
Instance details

Defined in AST.Term.NamelessScope

Methods

zipK :: Tree (Scope expr a) p -> Tree (Scope expr a) q -> Tree (Scope expr a) (Product p q) Source #

Semigroup a => KApply (ScopeVar expr a) Source # 
Instance details

Defined in AST.Term.NamelessScope

Methods

zipK :: Tree (ScopeVar expr a) p -> Tree (ScopeVar expr a) q -> Tree (ScopeVar expr a) (Product p q) Source #

(KApply a, KApply b) => KApply (Product a b) Source # 
Instance details

Defined in AST.Class.Apply

Methods

zipK :: Tree (Product a b) p -> Tree (Product a b) q -> Tree (Product a b) (Product p q) Source #

Applicative (Map key) => KApply (FlatRowExtends key val rest) Source # 
Instance details

Defined in AST.Term.Row

Methods

zipK :: Tree (FlatRowExtends key val rest) p -> Tree (FlatRowExtends key val rest) q -> Tree (FlatRowExtends key val rest) (Product p q) Source #

Semigroup key => KApply (RowExtend key val rest) Source # 
Instance details

Defined in AST.Term.Row

Methods

zipK :: Tree (RowExtend key val rest) p -> Tree (RowExtend key val rest) q -> Tree (RowExtend key val rest) (Product p q) Source #

Semigroup var => KApply (TypedLam var typ expr) Source # 
Instance details

Defined in AST.Term.TypedLam

Methods

zipK :: Tree (TypedLam var typ expr) p -> Tree (TypedLam var typ expr) q -> Tree (TypedLam var typ expr) (Product p q) Source #

class (KPointed k, KApply k) => KApplicative k Source #

A variant of Applicative for Knots.

Instances
(KPointed k, KApply k) => KApplicative k Source # 
Instance details

Defined in AST.Class.Apply

liftK2 :: KApply k => (forall n. KWitness k n -> Tree p n -> Tree q n -> Tree r n) -> Tree k p -> Tree k q -> Tree k r Source #

KApply variant of liftA2