syntax-tree-0.1.0.0: Typed ASTs

Safe HaskellNone
LanguageHaskell2010

AST.Knot.Pure

Description

A Knot to express the simplest plain form of a nested higher-kinded data structure.

The value level hyperfunctions equivalent of Pure is called self in Hyperfunctions papers.

Synopsis

Documentation

newtype Pure k Source #

A Knot to express the simplest plain form of a nested higher-kinded data structure

Constructors

Pure (k # Pure) 
Instances
KNodes Pure Source # 
Instance details

Defined in AST.Knot.Pure

Associated Types

type KNodesConstraint Pure c :: Constraint Source #

data KWitness Pure a :: Type Source #

Methods

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

KPointed Pure Source # 
Instance details

Defined in AST.Knot.Pure

Methods

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

KFunctor Pure Source # 
Instance details

Defined in AST.Knot.Pure

Methods

mapK :: (forall (n :: Knot -> Type). KWitness Pure n -> Tree p n -> Tree q n) -> Tree Pure p -> Tree Pure q Source #

KApply Pure Source # 
Instance details

Defined in AST.Knot.Pure

Methods

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

KFoldable Pure Source # 
Instance details

Defined in AST.Knot.Pure

Methods

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

KTraversable Pure Source # 
Instance details

Defined in AST.Knot.Pure

Methods

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

ZipMatch Pure Source # 
Instance details

Defined in AST.Class.ZipMatch

Methods

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

RTraversable Pure Source # 
Instance details

Defined in AST.Class.Recursive

RNodes Pure Source # 
Instance details

Defined in AST.Class.Recursive

KMonad Pure Source # 
Instance details

Defined in AST.Class.Monad

c Pure => Recursively c Pure Source # 
Instance details

Defined in AST.Class.Recursive

Constraints (Pure k) Eq => Eq (Pure k) Source # 
Instance details

Defined in AST.Knot.Pure

Methods

(==) :: Pure k -> Pure k -> Bool #

(/=) :: Pure k -> Pure k -> Bool #

Constraints (Pure k) Ord => Ord (Pure k) Source # 
Instance details

Defined in AST.Knot.Pure

Methods

compare :: Pure k -> Pure k -> Ordering #

(<) :: Pure k -> Pure k -> Bool #

(<=) :: Pure k -> Pure k -> Bool #

(>) :: Pure k -> Pure k -> Bool #

(>=) :: Pure k -> Pure k -> Bool #

max :: Pure k -> Pure k -> Pure k #

min :: Pure k -> Pure k -> Pure k #

Constraints (Pure k) Show => Show (Pure k) Source # 
Instance details

Defined in AST.Knot.Pure

Methods

showsPrec :: Int -> Pure k -> ShowS #

show :: Pure k -> String #

showList :: [Pure k] -> ShowS #

Generic (Pure k) Source # 
Instance details

Defined in AST.Knot.Pure

Associated Types

type Rep (Pure k) :: Type -> Type #

Methods

from :: Pure k -> Rep (Pure k) x #

to :: Rep (Pure k) x -> Pure k #

Constraints (Pure k) Binary => Binary (Pure k) Source # 
Instance details

Defined in AST.Knot.Pure

Methods

put :: Pure k -> Put #

get :: Get (Pure k) #

putList :: [Pure k] -> Put #

Constraints (Pure k) NFData => NFData (Pure k) Source # 
Instance details

Defined in AST.Knot.Pure

Methods

rnf :: Pure k -> () #

Pretty (k # Pure) => Pretty (Pure k) Source # 
Instance details

Defined in AST.Knot.Pure

Methods

pPrintPrec :: PrettyLevel -> Rational -> Pure k -> Doc #

pPrint :: Pure k -> Doc #

pPrintList :: PrettyLevel -> [Pure k] -> Doc #

data KWitness Pure node Source # 
Instance details

Defined in AST.Knot.Pure

data KWitness Pure node where
type KNodesConstraint Pure constraint Source # 
Instance details

Defined in AST.Knot.Pure

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

Defined in AST.Knot.Pure

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

_Pure :: Iso (Tree Pure k) (Tree Pure j) (Tree k Pure) (Tree j Pure) Source #

An Iso from Pure to its content.

Using _Pure rather than the Pure data constructor is recommended, because it helps the type inference know that Pure is parameterized with a Knot.

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

(&#) :: a -> (a -> Tree k Pure) -> Tree Pure k infixl 1 Source #

An operator to apply a function to a value and wrap it with Pure.

Helps value construction be more succinct.

The etymology and fixity of &# operator mimics &.

>>> x &# f
Pure (f x)