syntax-tree-0.1.0.1: Typed ASTs

Safe HaskellNone
LanguageHaskell2010

AST.Term.App

Synopsis

Documentation

data App expr k Source #

A term for function applications.

App exprs express function applications of exprs.

Apart from the data type, an Infer instance is also provided.

Constructors

App 

Fields

Instances
(Infer m expr, HasInferredType expr, HasFuncType (TypeOf expr), Unify m (TypeOf expr)) => Infer m (App expr) Source # 
Instance details

Defined in AST.Term.App

Methods

inferBody :: Tree (App expr) (InferChild m k) -> m (Tree (App expr) k, Tree (InferOf (App expr)) (UVarOf m)) Source #

inferContext :: Proxy m -> Proxy (App expr) -> Dict (KNodesConstraint (App expr) (Infer m), KNodesConstraint (InferOf (App expr)) (Unify m)) Source #

KNodes (App expr) Source # 
Instance details

Defined in AST.Term.App

Associated Types

type KNodesConstraint (App expr) c :: Constraint Source #

data KWitness (App expr) a :: Type Source #

Methods

kLiftConstraint :: KNodesConstraint (App expr) c => KWitness (App expr) n -> Proxy c -> (c n -> r) -> r Source #

KPointed (App expr) Source # 
Instance details

Defined in AST.Term.App

Methods

pureK :: (forall (n :: Knot -> Type). KWitness (App expr) n -> Tree p n) -> Tree (App expr) p Source #

KFunctor (App expr) Source # 
Instance details

Defined in AST.Term.App

Methods

mapK :: (forall (n :: Knot -> Type). KWitness (App expr) n -> Tree p n -> Tree q n) -> Tree (App expr) p -> Tree (App expr) 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 #

KFoldable (App expr) Source # 
Instance details

Defined in AST.Term.App

Methods

foldMapK :: Monoid a => (forall (n :: Knot -> Type). KWitness (App expr) n -> Tree p n -> a) -> Tree (App expr) p -> a Source #

KTraversable (App expr) Source # 
Instance details

Defined in AST.Term.App

Methods

sequenceK :: Applicative f => Tree (App expr) (ContainedK f p) -> f (Tree (App expr) p) Source #

ZipMatch (App expr) Source # 
Instance details

Defined in AST.Term.App

Methods

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

Constraints (App expr k) Eq => Eq (App expr k) Source # 
Instance details

Defined in AST.Term.App

Methods

(==) :: App expr k -> App expr k -> Bool #

(/=) :: App expr k -> App expr k -> Bool #

Constraints (App expr k) Ord => Ord (App expr k) Source # 
Instance details

Defined in AST.Term.App

Methods

compare :: App expr k -> App expr k -> Ordering #

(<) :: App expr k -> App expr k -> Bool #

(<=) :: App expr k -> App expr k -> Bool #

(>) :: App expr k -> App expr k -> Bool #

(>=) :: App expr k -> App expr k -> Bool #

max :: App expr k -> App expr k -> App expr k #

min :: App expr k -> App expr k -> App expr k #

Constraints (App expr k) Show => Show (App expr k) Source # 
Instance details

Defined in AST.Term.App

Methods

showsPrec :: Int -> App expr k -> ShowS #

show :: App expr k -> String #

showList :: [App expr k] -> ShowS #

Generic (App expr k) Source # 
Instance details

Defined in AST.Term.App

Associated Types

type Rep (App expr k) :: Type -> Type #

Methods

from :: App expr k -> Rep (App expr k) x #

to :: Rep (App expr k) x -> App expr k #

Constraints (App expr k) Binary => Binary (App expr k) Source # 
Instance details

Defined in AST.Term.App

Methods

put :: App expr k -> Put #

get :: Get (App expr k) #

putList :: [App expr k] -> Put #

Constraints (App expr k) NFData => NFData (App expr k) Source # 
Instance details

Defined in AST.Term.App

Methods

rnf :: App expr k -> () #

Pretty (k # expr) => Pretty (App expr k) Source # 
Instance details

Defined in AST.Term.App

Methods

pPrintPrec :: PrettyLevel -> Rational -> App expr k -> Doc #

pPrint :: App expr k -> Doc #

pPrintList :: PrettyLevel -> [App expr k] -> Doc #

data KWitness (App expr) node Source # 
Instance details

Defined in AST.Term.App

data KWitness (App expr) node where
type InferOf (App e) Source # 
Instance details

Defined in AST.Term.App

type InferOf (App e) = ANode (TypeOf e)
type KNodesConstraint (App expr) constraint Source # 
Instance details

Defined in AST.Term.App

type KNodesConstraint (App expr) constraint = constraint expr
type Rep (App expr k) Source # 
Instance details

Defined in AST.Term.App

type Rep (App expr k) = D1 (MetaData "App" "AST.Term.App" "syntax-tree-0.1.0.1-5Y9WhklreXaDnL6Q9tTtln" False) (C1 (MetaCons "App" PrefixI True) (S1 (MetaSel (Just "_appFunc") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (k # expr)) :*: S1 (MetaSel (Just "_appArg") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (k # expr))))

appFunc :: forall expr k. Lens' (App expr k) ((#) k expr) Source #

appArg :: forall expr k. Lens' (App expr k) ((#) k expr) Source #

data family KWitness k :: (Knot -> Type) -> Type Source #

KWitness k n is a witness that n is a node of k

Instances
data KWitness Pure node Source # 
Instance details

Defined in AST.Knot.Pure

data KWitness Pure node where
data KWitness Prune node Source # 
Instance details

Defined in AST.Knot.Prune

data KWitness Prune node where
data KWitness (ANode c) node Source # 
Instance details

Defined in AST.Combinator.ANode

data KWitness (ANode c) node where
data KWitness (F f) node Source # 
Instance details

Defined in AST.Knot.Functor

data KWitness (F f) node where
data KWitness (Ann a) node Source # 
Instance details

Defined in AST.Knot.Ann

data KWitness (Ann a) node where
data KWitness (UnifyError t) n Source # 
Instance details

Defined in AST.Unify.Error

data KWitness (UnifyError t) n where
data KWitness (FuncType typ) node Source # 
Instance details

Defined in AST.Term.FuncType

data KWitness (FuncType typ) node where
data KWitness (LoadedNominalDecl t) n Source # 
Instance details

Defined in AST.Term.Nominal

data KWitness (NominalDecl typ) node Source # 
Instance details

Defined in AST.Term.Nominal

data KWitness (App expr) node Source # 
Instance details

Defined in AST.Term.App

data KWitness (App expr) node where
data KWitness (ScopeTypes t) node Source # 
Instance details

Defined in AST.Term.NamelessScope

data KWitness (ScopeTypes t) node where
data KWitness (Const a :: Knot -> Type) i Source # 
Instance details

Defined in AST.Class.Nodes

data KWitness (Const a :: Knot -> Type) i
data KWitness (Flip GTerm a) n Source # 
Instance details

Defined in AST.Unify.Generalize

data KWitness (Flip (ITerm a) e) n Source # 
Instance details

Defined in AST.Infer.Term

data KWitness (Flip (ITerm a) e) n where
data KWitness (Flip (BTerm a) e) n Source # 
Instance details

Defined in AST.Infer.Blame

data KWitness (Flip (BTerm a) e) n where
data KWitness (Compose a b) n Source # 
Instance details

Defined in AST.Combinator.Compose

data KWitness (Compose a b) n where
data KWitness (TermMap k expr) node Source # 
Instance details

Defined in AST.Term.Map

data KWitness (TermMap k expr) node where
data KWitness (Var v expr) node Source # 
Instance details

Defined in AST.Term.Var

data KWitness (Var v expr) node
data KWitness (Scheme varTypes typ) node Source # 
Instance details

Defined in AST.Term.Scheme

data KWitness (Scheme varTypes typ) node where
data KWitness (TypeSig vars term) node Source # 
Instance details

Defined in AST.Term.TypeSig

data KWitness (TypeSig vars term) node where
data KWitness (FromNom nomId term) node Source # 
Instance details

Defined in AST.Term.Nominal

data KWitness (FromNom nomId term) node
data KWitness (ToNom nomId term) node Source # 
Instance details

Defined in AST.Term.Nominal

data KWitness (ToNom nomId term) node where
data KWitness (NominalInst n v) c Source # 
Instance details

Defined in AST.Term.Nominal

data KWitness (Let v expr) node Source # 
Instance details

Defined in AST.Term.Let

data KWitness (Let v expr) node where
data KWitness (Lam v expr) node Source # 
Instance details

Defined in AST.Term.Lam

data KWitness (Lam v expr) node where
data KWitness (Scope expr a) node Source # 
Instance details

Defined in AST.Term.NamelessScope

data KWitness (Scope expr a) node where
data KWitness (ScopeVar expr a) node Source # 
Instance details

Defined in AST.Term.NamelessScope

data KWitness (ScopeVar expr a) node
data KWitness (Product a b) n Source # 
Instance details

Defined in AST.Class.Nodes

data KWitness (Sum a b) n Source # 
Instance details

Defined in AST.Class.Nodes

data KWitness (Sum a b) n
data KWitness (FlatRowExtends key val rest) node Source # 
Instance details

Defined in AST.Term.Row

data KWitness (FlatRowExtends key val rest) node where
data KWitness (RowExtend key val rest) node Source # 
Instance details

Defined in AST.Term.Row

data KWitness (RowExtend key val rest) node where
data KWitness (TypedLam var typ expr) node Source # 
Instance details

Defined in AST.Term.TypedLam

data KWitness (TypedLam var typ expr) node where

appChildren :: Traversal (App t0 f0) (App t1 f1) (f0 # t0) (f1 # t1) Source #

Type changing traversal from App to its child nodes