hypertypes-0.2.2: Typed ASTs
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hyper.Syntax.App

Synopsis

Documentation

data App expr h 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

Instances details
(Infer m expr, HasInferredType expr, HSubset' (TypeOf expr) (FuncType (TypeOf expr)), UnifyGen m (TypeOf expr)) => Infer m (App expr) Source # 
Instance details

Defined in Hyper.Syntax.App

Methods

inferBody :: forall (h :: AHyperType -> Type). (App expr # InferChild m h) -> m (App expr # h, InferOf (App expr) # UVarOf m) Source #

inferContext :: proxy0 m -> proxy1 (App expr) -> Dict (HNodesConstraint (App expr) (Infer m), HNodesConstraint (InferOf (App expr)) (UnifyGen m)) Source #

(c (App e), Recursively c e) => Recursively c (App e) Source # 
Instance details

Defined in Hyper.Syntax.App

Methods

recursively :: proxy (c (App e)) -> Dict (c (App e), HNodesConstraint (App e) (Recursively c)) Source #

HApply (App expr) Source # 
Instance details

Defined in Hyper.Syntax.App

Methods

hzip :: forall (p :: HyperType) (q :: HyperType). (App expr # p) -> (App expr # q) -> App expr # (p :*: q) Source #

HContext (App expr) Source # 
Instance details

Defined in Hyper.Syntax.App

Methods

hcontext :: forall (p :: HyperType). (App expr # p) -> App expr # (HFunc p (Const (App expr # p)) :*: p) Source #

HFoldable (App expr) Source # 
Instance details

Defined in Hyper.Syntax.App

Methods

hfoldMap :: Monoid a => (forall (n :: HyperType). HWitness (App expr) n -> (p # n) -> a) -> (App expr # p) -> a Source #

HFunctor (App expr) Source # 
Instance details

Defined in Hyper.Syntax.App

Methods

hmap :: (forall (n :: HyperType). HWitness (App expr) n -> (p # n) -> q # n) -> (App expr # p) -> App expr # q Source #

HNodes (App expr) Source # 
Instance details

Defined in Hyper.Syntax.App

Associated Types

type HNodesConstraint (App expr) c Source #

type HWitnessType (App expr) :: HyperType -> Type Source #

Methods

hLiftConstraint :: forall c (n :: HyperType) r. HNodesConstraint (App expr) c => HWitness (App expr) n -> Proxy c -> (c n => r) -> r Source #

HPointed (App expr) Source # 
Instance details

Defined in Hyper.Syntax.App

Methods

hpure :: (forall (n :: HyperType). HWitness (App expr) n -> p # n) -> App expr # p Source #

RNodes e => RNodes (App e) Source # 
Instance details

Defined in Hyper.Syntax.App

RTraversable e => RTraversable (App e) Source # 
Instance details

Defined in Hyper.Syntax.App

HTraversable (App expr) Source # 
Instance details

Defined in Hyper.Syntax.App

Methods

hsequence :: forall f (p :: AHyperType -> Type). Applicative f => (App expr # ContainedH f p) -> f (App expr # p) Source #

ZipMatch (App expr) Source # 
Instance details

Defined in Hyper.Syntax.App

Methods

zipMatch :: forall (p :: HyperType) (q :: HyperType). (App expr # p) -> (App expr # q) -> Maybe (App expr # (p :*: q)) Source #

HMorph (App expr0) (App expr1) Source # 
Instance details

Defined in Hyper.Syntax.App

Associated Types

type MorphConstraint (App expr0) (App expr1) c Source #

data MorphWitness (App expr0) (App expr1) :: HyperType -> HyperType -> Type Source #

Methods

morphMap :: (forall (a :: HyperType) (b :: HyperType). MorphWitness (App expr0) (App expr1) a b -> (p # a) -> q # b) -> (App expr0 # p) -> App expr1 # q Source #

morphLiftConstraint :: forall c (a :: HyperType) (b :: HyperType) r. MorphConstraint (App expr0) (App expr1) c => MorphWitness (App expr0) (App expr1) a b -> Proxy c -> (c a b => r) -> r Source #

Generic (App expr h) Source # 
Instance details

Defined in Hyper.Syntax.App

Associated Types

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

Methods

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

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

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

Defined in Hyper.Syntax.App

Methods

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

show :: App expr h -> String #

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

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

Defined in Hyper.Syntax.App

Methods

put :: App expr h -> Put #

get :: Get (App expr h) #

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

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

Defined in Hyper.Syntax.App

Methods

rnf :: App expr h -> () #

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

Defined in Hyper.Syntax.App

Methods

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

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

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

Defined in Hyper.Syntax.App

Methods

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

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

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

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

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

max :: App expr h -> App expr h -> App expr h #

min :: App expr h -> App expr h -> App expr h #

Pretty (h :# expr) => Pretty (App expr h) Source # 
Instance details

Defined in Hyper.Syntax.App

Methods

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

pPrint :: App expr h -> Doc #

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

type InferOf (App e) Source # 
Instance details

Defined in Hyper.Syntax.App

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

Defined in Hyper.Syntax.App

type HWitnessType (App expr) = W_App expr
type HNodesConstraint (App expr) constraint Source # 
Instance details

Defined in Hyper.Syntax.App

type HNodesConstraint (App expr) constraint = constraint expr
data MorphWitness (App expr0) (App expr1) _ _1 Source # 
Instance details

Defined in Hyper.Syntax.App

data MorphWitness (App expr0) (App expr1) _ _1 where
type MorphConstraint (App expr0) (App expr1) constraint Source # 
Instance details

Defined in Hyper.Syntax.App

type MorphConstraint (App expr0) (App expr1) constraint = constraint expr0 expr1
type Rep (App expr h) Source # 
Instance details

Defined in Hyper.Syntax.App

type Rep (App expr h) = D1 ('MetaData "App" "Hyper.Syntax.App" "hypertypes-0.2.2-9g9pX7Hb2mGI4yyssTDpOd" 'False) (C1 ('MetaCons "App" 'PrefixI 'True) (S1 ('MetaSel ('Just "_appFunc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (h :# expr)) :*: S1 ('MetaSel ('Just "_appArg") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (h :# expr))))

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

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

data W_App (expr :: HyperType) node where Source #

Constructors

W_App_expr :: W_App expr expr 

data family MorphWitness s t :: HyperType -> HyperType -> Type Source #

Instances

Instances details
data MorphWitness (ANode a) (ANode b) _ _1 Source # 
Instance details

Defined in Hyper.Combinator.ANode

data MorphWitness (ANode a) (ANode b) _ _1 where
data MorphWitness (App expr0) (App expr1) _ _1 Source # 
Instance details

Defined in Hyper.Syntax.App

data MorphWitness (App expr0) (App expr1) _ _1 where
data MorphWitness (FuncType typ0) (FuncType typ1) _ _1 Source # 
Instance details

Defined in Hyper.Syntax.FuncType

data MorphWitness (FuncType typ0) (FuncType typ1) _ _1 where
data MorphWitness (Lam v expr0) (Lam v expr1) _ _1 Source # 
Instance details

Defined in Hyper.Syntax.Lam

data MorphWitness (Lam v expr0) (Lam v expr1) _ _1 where
data MorphWitness (Let v expr0) (Let v expr1) _ _1 Source # 
Instance details

Defined in Hyper.Syntax.Let

data MorphWitness (Let v expr0) (Let v expr1) _ _1 where
data MorphWitness (TermMap h expr0) (TermMap h expr1) _ _1 Source # 
Instance details

Defined in Hyper.Syntax.Map

data MorphWitness (TermMap h expr0) (TermMap h expr1) _ _1 where
data MorphWitness (ToNom nomId term0) (ToNom nomId term1) _ _1 Source # 
Instance details

Defined in Hyper.Syntax.Nominal

data MorphWitness (ToNom nomId term0) (ToNom nomId term1) _ _1 where
data MorphWitness (Var v expr0) (Var v expr1) _ _1 Source # 
Instance details

Defined in Hyper.Syntax.Var

data MorphWitness (Var v expr0) (Var v expr1) _ _1
data MorphWitness (RowExtend key val0 rest0) (RowExtend key val1 rest1) _ _1 Source # 
Instance details

Defined in Hyper.Syntax.Row

data MorphWitness (RowExtend key val0 rest0) (RowExtend key val1 rest1) _ _1 where
data MorphWitness (TypedLam var typ0 expr0) (TypedLam var typ1 expr1) _ _1 Source # 
Instance details

Defined in Hyper.Syntax.TypedLam

data MorphWitness (TypedLam var typ0 expr0) (TypedLam var typ1 expr1) _ _1 where