hypertypes-0.2.2: Typed ASTs
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hyper.Class.Traversable

Description

A variant of Traversable for HyperTypes

Synopsis

Documentation

class (HFunctor h, HFoldable h) => HTraversable h where Source #

A variant of Traversable for HyperTypes

Minimal complete definition

Nothing

Methods

hsequence :: Applicative f => (h # ContainedH f p) -> f (h # p) Source #

default hsequence :: (Generic1 h, HTraversable (Rep1 h), Applicative f) => (h # ContainedH f p) -> f (h # p) Source #

Instances

Instances details
HTraversable Prune Source # 
Instance details

Defined in Hyper.Type.Prune

Methods

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

HTraversable Pure Source # 
Instance details

Defined in Hyper.Type.Pure

Methods

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

HTraversable (ANode c) Source # 
Instance details

Defined in Hyper.Combinator.ANode

Methods

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

HTraversable a => HTraversable (Ann a) Source # 
Instance details

Defined in Hyper.Combinator.Ann

Methods

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

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 #

HTraversable (FuncType typ) Source # 
Instance details

Defined in Hyper.Syntax.FuncType

Methods

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

(RTraversable typ, HTraversable (NomVarTypes typ)) => HTraversable (LoadedNominalDecl typ) Source # 
Instance details

Defined in Hyper.Syntax.Nominal

Methods

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

HTraversable (NominalDecl typ) Source # 
Instance details

Defined in Hyper.Syntax.Nominal

Methods

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

Traversable f => HTraversable (F f) Source # 
Instance details

Defined in Hyper.Type.Functor

Methods

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

HTraversable t => HTraversable (UnifyError t) Source # 
Instance details

Defined in Hyper.Unify.Error

Methods

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

HTraversable v => HTraversable (GTerm v) Source # 
Instance details

Defined in Hyper.Unify.Generalize

Methods

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

HTraversable (Const a :: AHyperType -> Type) Source # 
Instance details

Defined in Hyper.Class.Traversable

Methods

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

HTraversable h => HTraversable (Rec1 h) Source # 
Instance details

Defined in Hyper.Class.Traversable

Methods

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

(HTraversable a, HTraversable b) => HTraversable (HCompose a b) Source # 
Instance details

Defined in Hyper.Combinator.Compose

Methods

hsequence :: forall f (p :: AHyperType -> Type). Applicative f => (HCompose a b # ContainedH f p) -> f (HCompose a b # p) Source #

RTraversable h => HTraversable (HFlip Ann h) Source # 
Instance details

Defined in Hyper.Combinator.Ann

Methods

hsequence :: forall f (p :: AHyperType -> Type). Applicative f => (HFlip Ann h # ContainedH f p) -> f (HFlip Ann h # p) Source #

HTraversable (InferOf e) => HTraversable (HFlip InferResult e) Source # 
Instance details

Defined in Hyper.Infer.Result

Methods

hsequence :: forall f (p :: AHyperType -> Type). Applicative f => (HFlip InferResult e # ContainedH f p) -> f (HFlip InferResult e # p) Source #

RTraversable ast => HTraversable (HFlip GTerm ast) Source # 
Instance details

Defined in Hyper.Unify.Generalize

Methods

hsequence :: forall f (p :: AHyperType -> Type). Applicative f => (HFlip GTerm ast # ContainedH f p) -> f (HFlip GTerm ast # p) Source #

HTraversable (Lam v expr) Source # 
Instance details

Defined in Hyper.Syntax.Lam

Methods

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

HTraversable (Let v expr) Source # 
Instance details

Defined in Hyper.Syntax.Let

Methods

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

HTraversable (TermMap h expr) Source # 
Instance details

Defined in Hyper.Syntax.Map

Methods

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

HTraversable (FromNom nomId term) Source # 
Instance details

Defined in Hyper.Syntax.Nominal

Methods

hsequence :: forall f (p :: AHyperType -> Type). Applicative f => (FromNom nomId term # ContainedH f p) -> f (FromNom nomId term # p) Source #

HTraversable v => HTraversable (NominalInst n v) Source # 
Instance details

Defined in Hyper.Syntax.Nominal

Methods

hsequence :: forall f (p :: AHyperType -> Type). Applicative f => (NominalInst n v # ContainedH f p) -> f (NominalInst n v # p) Source #

HTraversable (ToNom nomId term) Source # 
Instance details

Defined in Hyper.Syntax.Nominal

Methods

hsequence :: forall f (p :: AHyperType -> Type). Applicative f => (ToNom nomId term # ContainedH f p) -> f (ToNom nomId term # p) Source #

HTraversable (Scheme varTypes typ) Source # 
Instance details

Defined in Hyper.Syntax.Scheme

Methods

hsequence :: forall f (p :: AHyperType -> Type). Applicative f => (Scheme varTypes typ # ContainedH f p) -> f (Scheme varTypes typ # p) Source #

HTraversable (TypeSig vars term) Source # 
Instance details

Defined in Hyper.Syntax.TypeSig

Methods

hsequence :: forall f (p :: AHyperType -> Type). Applicative f => (TypeSig vars term # ContainedH f p) -> f (TypeSig vars term # p) Source #

HTraversable (Var v expr) Source # 
Instance details

Defined in Hyper.Syntax.Var

Methods

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

(HTraversable a, HTraversable b) => HTraversable (a :*: b) Source # 
Instance details

Defined in Hyper.Class.Traversable

Methods

hsequence :: forall f (p :: AHyperType -> Type). Applicative f => ((a :*: b) # ContainedH f p) -> f ((a :*: b) # p) Source #

(HTraversable a, HTraversable b) => HTraversable (a :+: b) Source # 
Instance details

Defined in Hyper.Class.Traversable

Methods

hsequence :: forall f (p :: AHyperType -> Type). Applicative f => ((a :+: b) # ContainedH f p) -> f ((a :+: b) # p) Source #

HTraversable (FlatRowExtends key val rest) Source # 
Instance details

Defined in Hyper.Syntax.Row

Methods

hsequence :: forall f (p :: AHyperType -> Type). Applicative f => (FlatRowExtends key val rest # ContainedH f p) -> f (FlatRowExtends key val rest # p) Source #

HTraversable (RowExtend key val rest) Source # 
Instance details

Defined in Hyper.Syntax.Row

Methods

hsequence :: forall f (p :: AHyperType -> Type). Applicative f => (RowExtend key val rest # ContainedH f p) -> f (RowExtend key val rest # p) Source #

HTraversable (TypedLam var typ expr) Source # 
Instance details

Defined in Hyper.Syntax.TypedLam

Methods

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

HTraversable h => HTraversable (M1 i m h) Source # 
Instance details

Defined in Hyper.Class.Traversable

Methods

hsequence :: forall f (p :: AHyperType -> Type). Applicative f => (M1 i m h # ContainedH f p) -> f (M1 i m h # p) Source #

newtype ContainedH f p (h :: AHyperType) Source #

A HyperType containing a tree inside an action.

Used to express hsequence.

Constructors

MkContainedH 

Fields

_ContainedH :: Iso (ContainedH f0 p0 # k0) (ContainedH f1 p1 # k1) (f0 (p0 # k0)) (f1 (p1 # k1)) Source #

An Iso for the ContainedH newtype

htraverse :: (Applicative f, HTraversable h) => (forall n. HWitness h n -> (p # n) -> f (q # n)) -> (h # p) -> f (h # q) Source #

htraverse1 :: (HTraversable h, HNodesConstraint h ((~) n)) => Traversal (h # p) (h # q) (p # n) (q # n) Source #

HTraversable variant of traverse for HyperTypes with a single node type.

It is a valid Traversal as it avoids using RankNTypes.