syntax-tree-0.1.0.0: Typed ASTs

Safe HaskellNone
LanguageHaskell2010

AST.Term.Map

Synopsis

Documentation

newtype TermMap k expr f Source #

A mapping of keys to terms.

Apart from the data type, a ZipMatch instance is also provided.

Constructors

TermMap (Map k (f # expr)) 
Instances
KNodes (TermMap k expr) Source # 
Instance details

Defined in AST.Term.Map

Associated Types

type KNodesConstraint (TermMap k expr) c :: Constraint Source #

data KWitness (TermMap k expr) a :: Type Source #

Methods

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

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

Defined in AST.Term.Map

Methods

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

KFunctor (TermMap k expr) Source # 
Instance details

Defined in AST.Term.Map

Methods

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 #

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 #

KFoldable (TermMap k expr) Source # 
Instance details

Defined in AST.Term.Map

Methods

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

KTraversable (TermMap k expr) Source # 
Instance details

Defined in AST.Term.Map

Methods

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

Eq k => ZipMatch (TermMap k expr) Source # 
Instance details

Defined in AST.Term.Map

Methods

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

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

Defined in AST.Term.Map

Methods

(==) :: TermMap k expr f -> TermMap k expr f -> Bool #

(/=) :: TermMap k expr f -> TermMap k expr f -> Bool #

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

Defined in AST.Term.Map

Methods

compare :: TermMap k expr f -> TermMap k expr f -> Ordering #

(<) :: TermMap k expr f -> TermMap k expr f -> Bool #

(<=) :: TermMap k expr f -> TermMap k expr f -> Bool #

(>) :: TermMap k expr f -> TermMap k expr f -> Bool #

(>=) :: TermMap k expr f -> TermMap k expr f -> Bool #

max :: TermMap k expr f -> TermMap k expr f -> TermMap k expr f #

min :: TermMap k expr f -> TermMap k expr f -> TermMap k expr f #

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

Defined in AST.Term.Map

Methods

showsPrec :: Int -> TermMap k expr f -> ShowS #

show :: TermMap k expr f -> String #

showList :: [TermMap k expr f] -> ShowS #

Generic (TermMap k expr f) Source # 
Instance details

Defined in AST.Term.Map

Associated Types

type Rep (TermMap k expr f) :: Type -> Type #

Methods

from :: TermMap k expr f -> Rep (TermMap k expr f) x #

to :: Rep (TermMap k expr f) x -> TermMap k expr f #

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

Defined in AST.Term.Map

Methods

put :: TermMap k expr f -> Put #

get :: Get (TermMap k expr f) #

putList :: [TermMap k expr f] -> Put #

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

Defined in AST.Term.Map

Methods

rnf :: TermMap k expr f -> () #

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

Defined in AST.Term.Map

data KWitness (TermMap k expr) node where
type KNodesConstraint (TermMap k expr) constraint Source # 
Instance details

Defined in AST.Term.Map

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

Defined in AST.Term.Map

type Rep (TermMap k expr f) = D1 (MetaData "TermMap" "AST.Term.Map" "syntax-tree-0.1.0.0-8tfou50n4eQ4Iq1dis9DWN" True) (C1 (MetaCons "TermMap" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Map k (f # expr)))))

_TermMap :: forall k expr f k expr f. Iso (TermMap k expr f) (TermMap k expr f) (Map k ((#) f expr)) (Map k ((#) f 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