syntax-tree-0.1.0.0: Typed ASTs
AST.Class.Functor
Description
A variant of Functor for Knots
Functor
Knot
class KNodes k => KFunctor k where Source #
Methods
mapK :: (forall n. KWitness k n -> Tree p n -> Tree q n) -> Tree k p -> Tree k q Source #
KFunctor variant of fmap
KFunctor
fmap
Applied a given mapping for k's nodes (trees along witnesses that they are nodes of k) to result with a new tree, potentially with a different fix-point.
k
Defined in AST.Knot.Pure
mapK :: (forall (n :: Knot -> Type). KWitness Pure n -> Tree p n -> Tree q n) -> Tree Pure p -> Tree Pure q Source #
Defined in AST.Knot.Prune
mapK :: (forall (n :: Knot -> Type). KWitness Prune n -> Tree p n -> Tree q n) -> Tree Prune p -> Tree Prune q Source #
Defined in AST.Combinator.ANode
mapK :: (forall (n :: Knot -> Type). KWitness (ANode c) n -> Tree p n -> Tree q n) -> Tree (ANode c) p -> Tree (ANode c) q Source #
Defined in AST.Knot.Functor
mapK :: (forall (n :: Knot -> Type). KWitness (F f) n -> Tree p n -> Tree q n) -> Tree (F f) p -> Tree (F f) q Source #
Defined in AST.Knot.Ann
mapK :: (forall (n :: Knot -> Type). KWitness (Ann a) n -> Tree p n -> Tree q n) -> Tree (Ann a) p -> Tree (Ann a) q Source #
Defined in AST.Unify.Error
mapK :: (forall (n :: Knot -> Type). KWitness (UnifyError t) n -> Tree p n -> Tree q n) -> Tree (UnifyError t) p -> Tree (UnifyError t) q Source #
Defined in AST.Term.FuncType
mapK :: (forall (n :: Knot -> Type). KWitness (FuncType typ) n -> Tree p n -> Tree q n) -> Tree (FuncType typ) p -> Tree (FuncType typ) q Source #
Defined in AST.Term.Nominal
mapK :: (forall (n :: Knot -> Type). KWitness (LoadedNominalDecl typ) n -> Tree p n -> Tree q n) -> Tree (LoadedNominalDecl typ) p -> Tree (LoadedNominalDecl typ) q Source #
mapK :: (forall (n :: Knot -> Type). KWitness (NominalDecl typ) n -> Tree p n -> Tree q n) -> Tree (NominalDecl typ) p -> Tree (NominalDecl typ) q Source #
Defined in AST.Term.App
mapK :: (forall (n :: Knot -> Type). KWitness (App expr) n -> Tree p n -> Tree q n) -> Tree (App expr) p -> Tree (App expr) q Source #
Defined in AST.Term.NamelessScope
mapK :: (forall (n :: Knot -> Type). KWitness (ScopeTypes t) n -> Tree p n -> Tree q n) -> Tree (ScopeTypes t) p -> Tree (ScopeTypes t) q Source #
Defined in AST.Class.Functor
mapK :: (forall (n :: Knot -> Type). KWitness (Const a) n -> Tree p n -> Tree q n) -> Tree (Const a) p -> Tree (Const a) q Source #
Defined in AST.Unify.Generalize
mapK :: (forall (n :: Knot -> Type). KWitness (Flip GTerm ast) n -> Tree p n -> Tree q n) -> Tree (Flip GTerm ast) p -> Tree (Flip GTerm ast) q Source #
Defined in AST.Infer.Term
mapK :: (forall (n :: Knot -> Type). KWitness (Flip (ITerm a) e) n -> Tree p n -> Tree q n) -> Tree (Flip (ITerm a) e) p -> Tree (Flip (ITerm a) e) q Source #
Defined in AST.Infer.Blame
mapK :: (forall (n :: Knot -> Type). KWitness (Flip (BTerm a) e) n -> Tree p n -> Tree q n) -> Tree (Flip (BTerm a) e) p -> Tree (Flip (BTerm a) e) q Source #
Defined in AST.Combinator.Compose
mapK :: (forall (n :: Knot -> Type). KWitness (Compose a b) n -> Tree p n -> Tree q n) -> Tree (Compose a b) p -> Tree (Compose a b) q Source #
Defined in AST.Term.Map
mapK :: (forall (n :: Knot -> Type). KWitness (TermMap k expr) n -> Tree p n -> Tree q n) -> Tree (TermMap k expr) p -> Tree (TermMap k expr) q Source #
Defined in AST.Term.Var
mapK :: (forall (n :: Knot -> Type). KWitness (Var v expr) n -> Tree p n -> Tree q n) -> Tree (Var v expr) p -> Tree (Var v expr) q Source #
Defined in AST.Term.Scheme
mapK :: (forall (n :: Knot -> Type). KWitness (Scheme varTypes typ) n -> Tree p n -> Tree q n) -> Tree (Scheme varTypes typ) p -> Tree (Scheme varTypes typ) q Source #
Defined in AST.Term.TypeSig
mapK :: (forall (n :: Knot -> Type). KWitness (TypeSig vars term) n -> Tree p n -> Tree q n) -> Tree (TypeSig vars term) p -> Tree (TypeSig vars term) q Source #
mapK :: (forall (n :: Knot -> Type). KWitness (FromNom nomId term) n -> Tree p n -> Tree q n) -> Tree (FromNom nomId term) p -> Tree (FromNom nomId term) q Source #
mapK :: (forall (n :: Knot -> Type). KWitness (ToNom nomId term) n -> Tree p n -> Tree q n) -> Tree (ToNom nomId term) p -> Tree (ToNom nomId term) q Source #
mapK :: (forall (n0 :: Knot -> Type). KWitness (NominalInst n v) n0 -> Tree p n0 -> Tree q n0) -> Tree (NominalInst n v) p -> Tree (NominalInst n v) q Source #
Defined in AST.Term.Let
mapK :: (forall (n :: Knot -> Type). KWitness (Let v expr) n -> Tree p n -> Tree q n) -> Tree (Let v expr) p -> Tree (Let v expr) q Source #
Defined in AST.Term.Lam
mapK :: (forall (n :: Knot -> Type). KWitness (Lam v expr) n -> Tree p n -> Tree q n) -> Tree (Lam v expr) p -> Tree (Lam v expr) q Source #
mapK :: (forall (n :: Knot -> Type). KWitness (Scope expr a) n -> Tree p n -> Tree q n) -> Tree (Scope expr a) p -> Tree (Scope expr a) q Source #
mapK :: (forall (n :: Knot -> Type). KWitness (ScopeVar expr a) n -> Tree p n -> Tree q n) -> Tree (ScopeVar expr a) p -> Tree (ScopeVar expr a) q Source #
mapK :: (forall (n :: Knot -> Type). KWitness (Product a b) n -> Tree p n -> Tree q n) -> Tree (Product a b) p -> Tree (Product a b) q Source #
mapK :: (forall (n :: Knot -> Type). KWitness (Sum a b) n -> Tree p n -> Tree q n) -> Tree (Sum a b) p -> Tree (Sum a b) q Source #
Defined in AST.Term.Row
mapK :: (forall (n :: Knot -> Type). KWitness (FlatRowExtends key val rest) n -> Tree p n -> Tree q n) -> Tree (FlatRowExtends key val rest) p -> Tree (FlatRowExtends key val rest) q Source #
mapK :: (forall (n :: Knot -> Type). KWitness (RowExtend key val rest) n -> Tree p n -> Tree q n) -> Tree (RowExtend key val rest) p -> Tree (RowExtend key val rest) q Source #
Defined in AST.Term.TypedLam
mapK :: (forall (n :: Knot -> Type). KWitness (TypedLam var typ expr) n -> Tree p n -> Tree q n) -> Tree (TypedLam var typ expr) p -> Tree (TypedLam var typ expr) q Source #
mappedK1 :: forall k n p q. (KFunctor k, KNodesConstraint k ((~) n)) => Setter (Tree k p) (Tree k q) (Tree p n) (Tree q n) Source #
KFunctor variant of mapped for Knots with a single node type.
mapped
Avoids using RankNTypes and thus can be composed with other optics.
RankNTypes