hypertypes-0.1.0.2: Typed ASTs
Safe HaskellNone
LanguageHaskell2010

Hyper.Type.AST.Row

Description

Row types

Synopsis

Documentation

class (Ord (RowConstraintsKey constraints), TypeConstraints constraints) => RowConstraints constraints where Source #

Associated Types

type RowConstraintsKey constraints Source #

Methods

forbidden :: Lens' constraints (Set (RowConstraintsKey constraints)) Source #

data RowExtend key val rest h Source #

Row-extend primitive for use in both value-level and type-level

Constructors

RowExtend 

Fields

Instances

Instances details
HNodes (RowExtend key val rest) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Associated Types

type HNodesConstraint (RowExtend key val rest) c Source #

type HWitnessType (RowExtend key val rest) :: HyperType -> Type Source #

Methods

hLiftConstraint :: forall c (n :: HyperType) r. HNodesConstraint (RowExtend key val rest) c => HWitness (RowExtend key val rest) n -> Proxy c -> (c n => r) -> r Source #

Monoid key => HPointed (RowExtend key val rest) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Methods

hpure :: (forall (n :: HyperType). HWitness (RowExtend key val rest) n -> p # n) -> RowExtend key val rest # p Source #

HFunctor (RowExtend key val rest) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Methods

hmap :: (forall (n :: HyperType). HWitness (RowExtend key val rest) n -> (p # n) -> q # n) -> (RowExtend key val rest # p) -> RowExtend key val rest # q Source #

HFoldable (RowExtend key val rest) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Methods

hfoldMap :: Monoid a => (forall (n :: HyperType). HWitness (RowExtend key val rest) n -> (p # n) -> a) -> (RowExtend key val rest # p) -> a Source #

HTraversable (RowExtend key val rest) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Methods

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

Semigroup key => HApply (RowExtend key val rest) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Methods

hzip :: forall (p :: HyperType) (q :: HyperType). (RowExtend key val rest # p) -> (RowExtend key val rest # q) -> RowExtend key val rest # (p :*: q) Source #

Eq key => ZipMatch (RowExtend key val rest) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Methods

zipMatch :: forall (p :: HyperType) (q :: HyperType). (RowExtend key val rest # p) -> (RowExtend key val rest # q) -> Maybe (RowExtend key val rest # (p :*: q)) Source #

HContext (RowExtend key val rest) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Methods

hcontext :: forall (p :: HyperType). (RowExtend key val rest # p) -> RowExtend key val rest # (HFunc p (Const (RowExtend key val rest # p)) :*: p) Source #

HMorph (RowExtend key val0 rest0) (RowExtend key val1 rest1) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Associated Types

type MorphConstraint (RowExtend key val0 rest0) (RowExtend key val1 rest1) c Source #

data MorphWitness (RowExtend key val0 rest0) (RowExtend key val1 rest1) :: HyperType -> HyperType -> Type Source #

Methods

morphMap :: (forall (a :: HyperType) (b :: HyperType). MorphWitness (RowExtend key val0 rest0) (RowExtend key val1 rest1) a b -> (p # a) -> q # b) -> (RowExtend key val0 rest0 # p) -> RowExtend key val1 rest1 # q Source #

morphLiftConstraint :: forall c (a :: HyperType) (b :: HyperType) r. MorphConstraint (RowExtend key val0 rest0) (RowExtend key val1 rest1) c => MorphWitness (RowExtend key val0 rest0) (RowExtend key val1 rest1) a b -> Proxy c -> (c a b => r) -> r Source #

Constraints (RowExtend key val rest h) Eq => Eq (RowExtend key val rest h) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Methods

(==) :: RowExtend key val rest h -> RowExtend key val rest h -> Bool #

(/=) :: RowExtend key val rest h -> RowExtend key val rest h -> Bool #

Constraints (RowExtend key val rest h) Ord => Ord (RowExtend key val rest h) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Methods

compare :: RowExtend key val rest h -> RowExtend key val rest h -> Ordering #

(<) :: RowExtend key val rest h -> RowExtend key val rest h -> Bool #

(<=) :: RowExtend key val rest h -> RowExtend key val rest h -> Bool #

(>) :: RowExtend key val rest h -> RowExtend key val rest h -> Bool #

(>=) :: RowExtend key val rest h -> RowExtend key val rest h -> Bool #

max :: RowExtend key val rest h -> RowExtend key val rest h -> RowExtend key val rest h #

min :: RowExtend key val rest h -> RowExtend key val rest h -> RowExtend key val rest h #

Constraints (RowExtend key val rest h) Show => Show (RowExtend key val rest h) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Methods

showsPrec :: Int -> RowExtend key val rest h -> ShowS #

show :: RowExtend key val rest h -> String #

showList :: [RowExtend key val rest h] -> ShowS #

Generic (RowExtend key val rest h) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Associated Types

type Rep (RowExtend key val rest h) :: Type -> Type #

Methods

from :: RowExtend key val rest h -> Rep (RowExtend key val rest h) x #

to :: Rep (RowExtend key val rest h) x -> RowExtend key val rest h #

Constraints (RowExtend key val rest h) Binary => Binary (RowExtend key val rest h) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Methods

put :: RowExtend key val rest h -> Put #

get :: Get (RowExtend key val rest h) #

putList :: [RowExtend key val rest h] -> Put #

Constraints (RowExtend key val rest h) NFData => NFData (RowExtend key val rest h) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Methods

rnf :: RowExtend key val rest h -> () #

type HWitnessType (RowExtend key val rest) Source # 
Instance details

Defined in Hyper.Type.AST.Row

type HWitnessType (RowExtend key val rest) = W_RowExtend key val rest
type HNodesConstraint (RowExtend key val rest) constraint Source # 
Instance details

Defined in Hyper.Type.AST.Row

type HNodesConstraint (RowExtend key val rest) constraint = (constraint val, constraint rest)
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
type MorphConstraint (RowExtend key val0 rest0) (RowExtend key val1 rest1) constraint Source # 
Instance details

Defined in Hyper.Type.AST.Row

type MorphConstraint (RowExtend key val0 rest0) (RowExtend key val1 rest1) constraint = (constraint rest0 rest1, constraint val0 val1)
type Rep (RowExtend key val rest h) Source # 
Instance details

Defined in Hyper.Type.AST.Row

type Rep (RowExtend key val rest h) = D1 ('MetaData "RowExtend" "Hyper.Type.AST.Row" "hypertypes-0.1.0.2-GDiSRF0EwgQ6Mkx3yytlTL" 'False) (C1 ('MetaCons "RowExtend" 'PrefixI 'True) (S1 ('MetaSel ('Just "_eKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 key) :*: (S1 ('MetaSel ('Just "_eVal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (h :# val)) :*: S1 ('MetaSel ('Just "_eRest") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (h :# rest)))))

eKey :: forall key val rest h key. Lens (RowExtend key val rest h) (RowExtend key val rest h) key key Source #

eVal :: forall key val rest h val. Lens (RowExtend key val rest h) (RowExtend key val rest h) ((:#) h val) ((:#) h val) Source #

eRest :: forall key val rest h rest. Lens (RowExtend key val rest h) (RowExtend key val rest h) ((:#) h rest) ((:#) h rest) Source #

data W_RowExtend (key :: Type) (val :: HyperType) (rest :: HyperType) node where Source #

Constructors

W_RowExtend_val :: W_RowExtend key val rest val 
W_RowExtend_rest :: W_RowExtend key val rest rest 

data FlatRowExtends key val rest h Source #

Constructors

FlatRowExtends 

Fields

Instances

Instances details
HNodes (FlatRowExtends key val rest) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Associated Types

type HNodesConstraint (FlatRowExtends key val rest) c Source #

type HWitnessType (FlatRowExtends key val rest) :: HyperType -> Type Source #

Methods

hLiftConstraint :: forall c (n :: HyperType) r. HNodesConstraint (FlatRowExtends key val rest) c => HWitness (FlatRowExtends key val rest) n -> Proxy c -> (c n => r) -> r Source #

Applicative (Map key) => HPointed (FlatRowExtends key val rest) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Methods

hpure :: (forall (n :: HyperType). HWitness (FlatRowExtends key val rest) n -> p # n) -> FlatRowExtends key val rest # p Source #

HFunctor (FlatRowExtends key val rest) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Methods

hmap :: (forall (n :: HyperType). HWitness (FlatRowExtends key val rest) n -> (p # n) -> q # n) -> (FlatRowExtends key val rest # p) -> FlatRowExtends key val rest # q Source #

HFoldable (FlatRowExtends key val rest) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Methods

hfoldMap :: Monoid a => (forall (n :: HyperType). HWitness (FlatRowExtends key val rest) n -> (p # n) -> a) -> (FlatRowExtends key val rest # p) -> a Source #

HTraversable (FlatRowExtends key val rest) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Methods

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

Applicative (Map key) => HApply (FlatRowExtends key val rest) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Methods

hzip :: forall (p :: HyperType) (q :: HyperType). (FlatRowExtends key val rest # p) -> (FlatRowExtends key val rest # q) -> FlatRowExtends key val rest # (p :*: q) Source #

Constraints (FlatRowExtends key val rest h) Eq => Eq (FlatRowExtends key val rest h) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Methods

(==) :: FlatRowExtends key val rest h -> FlatRowExtends key val rest h -> Bool #

(/=) :: FlatRowExtends key val rest h -> FlatRowExtends key val rest h -> Bool #

Constraints (FlatRowExtends key val rest h) Ord => Ord (FlatRowExtends key val rest h) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Methods

compare :: FlatRowExtends key val rest h -> FlatRowExtends key val rest h -> Ordering #

(<) :: FlatRowExtends key val rest h -> FlatRowExtends key val rest h -> Bool #

(<=) :: FlatRowExtends key val rest h -> FlatRowExtends key val rest h -> Bool #

(>) :: FlatRowExtends key val rest h -> FlatRowExtends key val rest h -> Bool #

(>=) :: FlatRowExtends key val rest h -> FlatRowExtends key val rest h -> Bool #

max :: FlatRowExtends key val rest h -> FlatRowExtends key val rest h -> FlatRowExtends key val rest h #

min :: FlatRowExtends key val rest h -> FlatRowExtends key val rest h -> FlatRowExtends key val rest h #

Constraints (FlatRowExtends key val rest h) Show => Show (FlatRowExtends key val rest h) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Methods

showsPrec :: Int -> FlatRowExtends key val rest h -> ShowS #

show :: FlatRowExtends key val rest h -> String #

showList :: [FlatRowExtends key val rest h] -> ShowS #

Generic (FlatRowExtends key val rest h) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Associated Types

type Rep (FlatRowExtends key val rest h) :: Type -> Type #

Methods

from :: FlatRowExtends key val rest h -> Rep (FlatRowExtends key val rest h) x #

to :: Rep (FlatRowExtends key val rest h) x -> FlatRowExtends key val rest h #

Constraints (FlatRowExtends key val rest h) Binary => Binary (FlatRowExtends key val rest h) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Methods

put :: FlatRowExtends key val rest h -> Put #

get :: Get (FlatRowExtends key val rest h) #

putList :: [FlatRowExtends key val rest h] -> Put #

Constraints (FlatRowExtends key val rest h) NFData => NFData (FlatRowExtends key val rest h) Source # 
Instance details

Defined in Hyper.Type.AST.Row

Methods

rnf :: FlatRowExtends key val rest h -> () #

type HWitnessType (FlatRowExtends key val rest) Source # 
Instance details

Defined in Hyper.Type.AST.Row

type HWitnessType (FlatRowExtends key val rest) = W_FlatRowExtends key val rest
type HNodesConstraint (FlatRowExtends key val rest) constraint Source # 
Instance details

Defined in Hyper.Type.AST.Row

type HNodesConstraint (FlatRowExtends key val rest) constraint = (constraint val, constraint rest)
type Rep (FlatRowExtends key val rest h) Source # 
Instance details

Defined in Hyper.Type.AST.Row

type Rep (FlatRowExtends key val rest h) = D1 ('MetaData "FlatRowExtends" "Hyper.Type.AST.Row" "hypertypes-0.1.0.2-GDiSRF0EwgQ6Mkx3yytlTL" 'False) (C1 ('MetaCons "FlatRowExtends" 'PrefixI 'True) (S1 ('MetaSel ('Just "_freExtends") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map key (h :# val))) :*: S1 ('MetaSel ('Just "_freRest") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (h :# rest))))

freExtends :: forall key val rest h key val. Lens (FlatRowExtends key val rest h) (FlatRowExtends key val rest h) (Map key ((:#) h val)) (Map key ((:#) h val)) Source #

freRest :: forall key val rest h rest. Lens (FlatRowExtends key val rest h) (FlatRowExtends key val rest h) ((:#) h rest) ((:#) h rest) Source #

data W_FlatRowExtends (key :: Type) (val :: HyperType) (rest :: HyperType) node where Source #

Constructors

W_FlatRowExtends_val :: W_FlatRowExtends key val rest val 
W_FlatRowExtends_rest :: W_FlatRowExtends key val rest rest 

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

flattenRow :: (Ord key, Monad m) => ((v # rest) -> m (Maybe (RowExtend key val rest # v))) -> (v # rest) -> m (FlatRowExtends key val rest # v) Source #

flattenRowExtend :: (Ord key, Monad m) => ((v # rest) -> m (Maybe (RowExtend key val rest # v))) -> (RowExtend key val rest # v) -> m (FlatRowExtends key val rest # v) Source #

unflattenRow :: Monad m => ((RowExtend key val rest # v) -> m (v # rest)) -> (FlatRowExtends key val rest # v) -> m (v # rest) Source #

verifyRowExtendConstraints :: RowConstraints (TypeConstraintsOf rowTyp) => (TypeConstraintsOf rowTyp -> TypeConstraintsOf valTyp) -> TypeConstraintsOf rowTyp -> (RowExtend (RowKey rowTyp) valTyp rowTyp # h) -> Maybe (RowExtend (RowKey rowTyp) valTyp rowTyp # WithConstraint h) Source #

rowExtendStructureMismatch :: Ord key => (Unify m rowTyp, Unify m valTyp) => (forall c. Unify m c => (UVarOf m # c) -> (UVarOf m # c) -> m (UVarOf m # c)) -> Prism' (rowTyp # UVarOf m) (RowExtend key valTyp rowTyp # UVarOf m) -> (RowExtend key valTyp rowTyp # UVarOf m) -> (RowExtend key valTyp rowTyp # UVarOf m) -> m () Source #

rowElementInfer :: forall m valTyp rowTyp. (UnifyGen m valTyp, UnifyGen m rowTyp, RowConstraints (TypeConstraintsOf rowTyp)) => ((RowExtend (RowKey rowTyp) valTyp rowTyp # UVarOf m) -> rowTyp # UVarOf m) -> RowKey rowTyp -> m (UVarOf m # valTyp, UVarOf m # rowTyp) Source #