expressions-0.1.4: Expressions and Formulae a la carte

Copyright(C) 2017-18 Jakub Daniel
LicenseBSD-style (see the file LICENSE)
MaintainerJakub Daniel <jakub.daniel@protonmail.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Data.Expression.Utils.Indexed.Sum

Description

 

Synopsis

Documentation

data (f :+: g) a i infixr 8 Source #

Sum of two indexed functors

Constructors

InL (f a i) 
InR (g a i) 

Instances

(IShow k k1 f, IShow k k1 g) => IShow k k1 ((:+:) k (k1 -> *) f g) Source # 

Methods

ishow :: f (Const k String) i -> Const ((k :+: (k1 -> *)) f g) String i Source #

(IFunctor k f, IFunctor k g, IFunctor k h, (:<:) k f g) => (:<:) k f ((:+:) k (k -> *) h g) Source # 

Methods

inj :: (k :+: (k -> *)) h g a i -> g a i Source #

prj :: g a i -> Maybe ((k :+: (k -> *)) h g a i) Source #

(IFunctor k f, IFunctor k g) => (:<:) k f ((:+:) k (k -> *) f g) Source # 

Methods

inj :: (k :+: (k -> *)) f g a i -> g a i Source #

prj :: g a i -> Maybe ((k :+: (k -> *)) f g a i) Source #

(IFoldable i f, IFoldable i g) => IFoldable i ((:+:) i (i -> *) f g) Source # 

Methods

ifold :: Monoid m => f (Const ((i :+: (i -> *)) f g) m) i' -> Const ((i :+: (i -> *)) f g) m i' Source #

(IEq1 i f, IEq1 i g) => IEq1 i ((:+:) i (i -> *) f g) Source # 

Methods

ieq1 :: IEq ((i :+: (i -> *)) f g) a => f a j -> f a j -> Bool Source #

(IFunctor i f, IFunctor i g) => IFunctor i ((:+:) i (i -> *) f g) Source # 

Methods

imap :: (forall i'. a i' -> b i') -> forall i'. f a i' -> f b i' Source #

index :: f a i' -> Sing ((i :+: (i -> *)) f g) i' Source #

(ITraversable i f, ITraversable i g) => ITraversable i ((:+:) i (i -> *) f g) Source # 

Methods

itraverse :: Applicative f => (forall i'. a i' -> f (b i')) -> forall i'. t a i' -> f (t b i') Source #

(MaybeQuantified k f, MaybeQuantified k g) => MaybeQuantified k ((:+:) k (k -> *) f g) Source # 

Methods

isQuantified' :: MaybeQuantified ((k :+: (k -> *)) f g) g => f (IFix ((k :+: (k -> *)) f g) g) s -> Const ((k :+: (k -> *)) f g) Any s

freevars' :: f (Const ((k :+: (k -> *)) f g) [DynamicallySorted (VarF (Sort -> *))]) s -> Const ((k :+: (k -> *)) f g) [DynamicallySorted (VarF (Sort -> *))] s

JoinSemiLattice (ALia BooleanSort) # 
JoinSemiLattice (QFALia BooleanSort) # 
JoinSemiLattice (Lia BooleanSort) # 
JoinSemiLattice (QFLia BooleanSort) # 
JoinSemiLattice (QFLogic BooleanSort) # 
MeetSemiLattice (ALia BooleanSort) # 
MeetSemiLattice (QFALia BooleanSort) # 
MeetSemiLattice (Lia BooleanSort) # 
MeetSemiLattice (QFLia BooleanSort) # 
MeetSemiLattice (QFLogic BooleanSort) # 
Lattice (ALia BooleanSort) # 
Lattice (QFALia BooleanSort) # 
Lattice (Lia BooleanSort) # 
Lattice (QFLia BooleanSort) # 
Lattice (QFLogic BooleanSort) # 
BoundedJoinSemiLattice (ALia BooleanSort) # 
BoundedJoinSemiLattice (QFALia BooleanSort) # 
BoundedJoinSemiLattice (Lia BooleanSort) # 
BoundedJoinSemiLattice (QFLia BooleanSort) # 
BoundedJoinSemiLattice (QFLogic BooleanSort) # 
BoundedMeetSemiLattice (ALia BooleanSort) # 

Methods

top :: ALia BooleanSort #

BoundedMeetSemiLattice (QFALia BooleanSort) # 
BoundedMeetSemiLattice (Lia BooleanSort) # 

Methods

top :: Lia BooleanSort #

BoundedMeetSemiLattice (QFLia BooleanSort) # 
BoundedMeetSemiLattice (QFLogic BooleanSort) # 
BoundedLattice (ALia BooleanSort) # 
BoundedLattice (QFALia BooleanSort) # 
BoundedLattice (Lia BooleanSort) # 
BoundedLattice (QFLia BooleanSort) # 
BoundedLattice (QFLogic BooleanSort) # 
ComplementedLattice (ALia BooleanSort) Source # 
ComplementedLattice (QFALia BooleanSort) Source # 
ComplementedLattice (Lia BooleanSort) Source # 
ComplementedLattice (QFLia BooleanSort) Source # 
ComplementedLattice (QFLogic BooleanSort) Source # 
(Parseable (k1 -> k -> *) f h, Parseable (k1 -> k -> *) g h) => Parseable (k1 -> k -> *) ((:+:) k k1 f g) h Source # 

Methods

parser :: Proxy ((k :+: k1) f g) h -> Parser (DynamicallySorted g) -> Parser (DynamicallySorted g) Source #

class (IFunctor f, IFunctor g) => f :<: g where Source #

Inclusion relation for indexed sum functors

Minimal complete definition

inj, prj

Methods

inj :: f a i -> g a i Source #

prj :: g a i -> Maybe (f a i) Source #

Instances

IFunctor i f => (:<:) i f f Source # 

Methods

inj :: f a i -> g a i Source #

prj :: g a i -> Maybe (f a i) Source #

(IFunctor k f, IFunctor k g, IFunctor k h, (:<:) k f g) => (:<:) k f ((:+:) k (k -> *) h g) Source # 

Methods

inj :: (k :+: (k -> *)) h g a i -> g a i Source #

prj :: g a i -> Maybe ((k :+: (k -> *)) h g a i) Source #

(IFunctor k f, IFunctor k g) => (:<:) k f ((:+:) k (k -> *) f g) Source # 

Methods

inj :: (k :+: (k -> *)) f g a i -> g a i Source #

prj :: g a i -> Maybe ((k :+: (k -> *)) f g a i) Source #

inject :: g :<: f => forall i. g (IFix f) i -> IFix f i Source #

Inject a component into a sum.

match :: g :<: f => forall i. IFix f i -> Maybe (g (IFix f) i) Source #

Try to unpack a sum into a component.