hypertypes-0.1.0.2: Typed ASTs
Safe HaskellNone
LanguageHaskell2010

Hyper.Type.AST.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
(c (App e), Recursively c e) => Recursively c (App e) Source # 
Instance details

Defined in Hyper.Type.AST.App

Methods

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

(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.Type.AST.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 #

HNodes (App expr) Source # 
Instance details

Defined in Hyper.Type.AST.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.Type.AST.App

Methods

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

HFunctor (App expr) Source # 
Instance details

Defined in Hyper.Type.AST.App

Methods

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

HFoldable (App expr) Source # 
Instance details

Defined in Hyper.Type.AST.App

Methods

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

HTraversable (App expr) Source # 
Instance details

Defined in Hyper.Type.AST.App

Methods

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

HApply (App expr) Source # 
Instance details

Defined in Hyper.Type.AST.App

Methods

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

ZipMatch (App expr) Source # 
Instance details

Defined in Hyper.Type.AST.App

Methods

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

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

Defined in Hyper.Type.AST.App

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

Defined in Hyper.Type.AST.App

Methods

recursiveHNodes :: proxy (App e) -> Dict (HNodesConstraint (App e) RNodes) Source #

HContext (App expr) Source # 
Instance details

Defined in Hyper.Type.AST.App

Methods

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

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

Defined in Hyper.Type.AST.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 #

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

Defined in Hyper.Type.AST.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.Type.AST.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 #

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

Defined in Hyper.Type.AST.App

Methods

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

show :: App expr h -> String #

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

Generic (App expr h) Source # 
Instance details

Defined in Hyper.Type.AST.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) Binary => Binary (App expr h) Source # 
Instance details

Defined in Hyper.Type.AST.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.Type.AST.App

Methods

rnf :: App expr h -> () #

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

Defined in Hyper.Type.AST.App

Methods

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

pPrint :: App expr h -> Doc #

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

type HWitnessType (App expr) Source # 
Instance details

Defined in Hyper.Type.AST.App

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

Defined in Hyper.Type.AST.App

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

Defined in Hyper.Type.AST.App

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

Defined in Hyper.Type.AST.App

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

Defined in Hyper.Type.AST.App

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

Defined in Hyper.Type.AST.App

type Rep (App expr h) = D1 ('MetaData "App" "Hyper.Type.AST.App" "hypertypes-0.1.0.2-GDiSRF0EwgQ6Mkx3yytlTL" '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) _ _ Source # 
Instance details

Defined in Hyper.Combinator.ANode

data MorphWitness (ANode a) (ANode b) _ _ where
data MorphWitness (FuncType typ0) (FuncType typ1) _ _ Source # 
Instance details

Defined in Hyper.Type.AST.FuncType

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

Defined in Hyper.Type.AST.App

data MorphWitness (App expr0) (App expr1) _ _ where
data MorphWitness (TermMap h expr0) (TermMap h expr1) _ _ Source # 
Instance details

Defined in Hyper.Type.AST.Map

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

Defined in Hyper.Type.AST.Var

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

Defined in Hyper.Type.AST.Nominal

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

Defined in Hyper.Type.AST.Let

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

Defined in Hyper.Type.AST.Lam

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

Defined in Hyper.Type.AST.Row

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

Defined in Hyper.Type.AST.TypedLam

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