syntax-tree-0.1.0.1: Typed ASTs

Safe HaskellSafe
LanguageHaskell2010

Data.Functor.Sum.PolyKinds

Description

PolyKinds variant of base's Sum.

See notes in Data.Functor.Product.PolyKinds for more info

Synopsis

Documentation

data Sum f g a Source #

A PolyKinds variant of Sum.

Note that the original Sum is poly-kinded in its type, but not in its instances such as Eq.

Constructors

InL (f a) 
InR (g a) 
Instances
Generic1 (Sum f g :: k -> Type) Source # 
Instance details

Defined in Data.Functor.Sum.PolyKinds

Associated Types

type Rep1 (Sum f g) :: k -> Type #

Methods

from1 :: Sum f g a -> Rep1 (Sum f g) a #

to1 :: Rep1 (Sum f g) a -> Sum f g a #

(InferOf a ~ InferOf b, Infer m a, Infer m b) => Infer m (Sum a b) Source # 
Instance details

Defined in AST.Class.Infer

Methods

inferBody :: Tree (Sum a b) (InferChild m k) -> m (Tree (Sum a b) k, Tree (InferOf (Sum a b)) (UVarOf m)) Source #

inferContext :: Proxy m -> Proxy (Sum a b) -> Dict (KNodesConstraint (Sum a b) (Infer m), KNodesConstraint (InferOf (Sum a b)) (Unify m)) Source #

(Functor f, Functor g) => Functor (Sum f g) Source # 
Instance details

Defined in Data.Functor.Sum.PolyKinds

Methods

fmap :: (a -> b) -> Sum f g a -> Sum f g b #

(<$) :: a -> Sum f g b -> Sum f g a #

(Foldable f, Foldable g) => Foldable (Sum f g) Source # 
Instance details

Defined in Data.Functor.Sum.PolyKinds

Methods

fold :: Monoid m => Sum f g m -> m #

foldMap :: Monoid m => (a -> m) -> Sum f g a -> m #

foldr :: (a -> b -> b) -> b -> Sum f g a -> b #

foldr' :: (a -> b -> b) -> b -> Sum f g a -> b #

foldl :: (b -> a -> b) -> b -> Sum f g a -> b #

foldl' :: (b -> a -> b) -> b -> Sum f g a -> b #

foldr1 :: (a -> a -> a) -> Sum f g a -> a #

foldl1 :: (a -> a -> a) -> Sum f g a -> a #

toList :: Sum f g a -> [a] #

null :: Sum f g a -> Bool #

length :: Sum f g a -> Int #

elem :: Eq a => a -> Sum f g a -> Bool #

maximum :: Ord a => Sum f g a -> a #

minimum :: Ord a => Sum f g a -> a #

sum :: Num a => Sum f g a -> a #

product :: Num a => Sum f g a -> a #

(Traversable f, Traversable g) => Traversable (Sum f g) Source # 
Instance details

Defined in Data.Functor.Sum.PolyKinds

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Sum f g a -> f0 (Sum f g b) #

sequenceA :: Applicative f0 => Sum f g (f0 a) -> f0 (Sum f g a) #

mapM :: Monad m => (a -> m b) -> Sum f g a -> m (Sum f g b) #

sequence :: Monad m => Sum f g (m a) -> m (Sum f g a) #

(Eq1 f, Eq1 g) => Eq1 (Sum f g) Source # 
Instance details

Defined in Data.Functor.Sum.PolyKinds

Methods

liftEq :: (a -> b -> Bool) -> Sum f g a -> Sum f g b -> Bool #

(Ord1 f, Ord1 g) => Ord1 (Sum f g) Source # 
Instance details

Defined in Data.Functor.Sum.PolyKinds

Methods

liftCompare :: (a -> b -> Ordering) -> Sum f g a -> Sum f g b -> Ordering #

(Read1 f, Read1 g) => Read1 (Sum f g) Source # 
Instance details

Defined in Data.Functor.Sum.PolyKinds

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Sum f g a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Sum f g a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Sum f g a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Sum f g a] #

(Show1 f, Show1 g) => Show1 (Sum f g) Source # 
Instance details

Defined in Data.Functor.Sum.PolyKinds

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Sum f g a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Sum f g a] -> ShowS #

(KNodes a, KNodes b) => KNodes (Sum a b) Source # 
Instance details

Defined in AST.Class.Nodes

Associated Types

type KNodesConstraint (Sum a b) c :: Constraint Source #

data KWitness (Sum a b) a :: Type Source #

Methods

kLiftConstraint :: KNodesConstraint (Sum a b) c => KWitness (Sum a b) n -> Proxy c -> (c n -> r) -> r Source #

(KFunctor a, KFunctor b) => KFunctor (Sum a b) Source # 
Instance details

Defined in AST.Class.Functor

Methods

mapK :: (forall (n :: Knot -> Type). KWitness (Sum a b) n -> Tree p n -> Tree q n) -> Tree (Sum a b) p -> Tree (Sum a b) q Source #

(KFoldable a, KFoldable b) => KFoldable (Sum a b) Source # 
Instance details

Defined in AST.Class.Foldable

Methods

foldMapK :: Monoid a0 => (forall (n :: Knot -> Type). KWitness (Sum a b) n -> Tree p n -> a0) -> Tree (Sum a b) p -> a0 Source #

(KTraversable a, KTraversable b) => KTraversable (Sum a b) Source # 
Instance details

Defined in AST.Class.Traversable

Methods

sequenceK :: Applicative f => Tree (Sum a b) (ContainedK f p) -> f (Tree (Sum a b) p) Source #

(ZipMatch a, ZipMatch b) => ZipMatch (Sum a b) Source # 
Instance details

Defined in AST.Class.ZipMatch

Methods

zipMatch :: Tree (Sum a b) p -> Tree (Sum a b) q -> Maybe (Tree (Sum a b) (Product p q)) Source #

(Eq (f a), Eq (g a)) => Eq (Sum f g a) Source # 
Instance details

Defined in Data.Functor.Sum.PolyKinds

Methods

(==) :: Sum f g a -> Sum f g a -> Bool #

(/=) :: Sum f g a -> Sum f g a -> Bool #

(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a), Data (g a)) => Data (Sum f g a) Source # 
Instance details

Defined in Data.Functor.Sum.PolyKinds

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g0. g0 -> c g0) -> Sum f g a -> c (Sum f g a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Sum f g a) #

toConstr :: Sum f g a -> Constr #

dataTypeOf :: Sum f g a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Sum f g a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Sum f g a)) #

gmapT :: (forall b. Data b => b -> b) -> Sum f g a -> Sum f g a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Sum f g a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Sum f g a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Sum f g a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Sum f g a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Sum f g a -> m (Sum f g a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Sum f g a -> m (Sum f g a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Sum f g a -> m (Sum f g a) #

(Ord (f a), Ord (g a)) => Ord (Sum f g a) Source # 
Instance details

Defined in Data.Functor.Sum.PolyKinds

Methods

compare :: Sum f g a -> Sum f g a -> Ordering #

(<) :: Sum f g a -> Sum f g a -> Bool #

(<=) :: Sum f g a -> Sum f g a -> Bool #

(>) :: Sum f g a -> Sum f g a -> Bool #

(>=) :: Sum f g a -> Sum f g a -> Bool #

max :: Sum f g a -> Sum f g a -> Sum f g a #

min :: Sum f g a -> Sum f g a -> Sum f g a #

(Read (f a), Read (g a)) => Read (Sum f g a) Source # 
Instance details

Defined in Data.Functor.Sum.PolyKinds

Methods

readsPrec :: Int -> ReadS (Sum f g a) #

readList :: ReadS [Sum f g a] #

readPrec :: ReadPrec (Sum f g a) #

readListPrec :: ReadPrec [Sum f g a] #

(Show (f a), Show (g a)) => Show (Sum f g a) Source # 
Instance details

Defined in Data.Functor.Sum.PolyKinds

Methods

showsPrec :: Int -> Sum f g a -> ShowS #

show :: Sum f g a -> String #

showList :: [Sum f g a] -> ShowS #

Generic (Sum f g a) Source # 
Instance details

Defined in Data.Functor.Sum.PolyKinds

Associated Types

type Rep (Sum f g a) :: Type -> Type #

Methods

from :: Sum f g a -> Rep (Sum f g a) x #

to :: Rep (Sum f g a) x -> Sum f g a #

type Rep1 (Sum f g :: k -> Type) Source # 
Instance details

Defined in Data.Functor.Sum.PolyKinds

type Rep1 (Sum f g :: k -> Type) = D1 (MetaData "Sum" "Data.Functor.Sum.PolyKinds" "syntax-tree-0.1.0.1-5Y9WhklreXaDnL6Q9tTtln" False) (C1 (MetaCons "InL" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 f)) :+: C1 (MetaCons "InR" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 g)))
data KWitness (Sum a b) n Source # 
Instance details

Defined in AST.Class.Nodes

data KWitness (Sum a b) n
type InferOf (Sum a b) Source # 
Instance details

Defined in AST.Class.Infer

type InferOf (Sum a b) = InferOf a
type KNodesConstraint (Sum a b) x Source # 
Instance details

Defined in AST.Class.Nodes

type Rep (Sum f g a) Source # 
Instance details

Defined in Data.Functor.Sum.PolyKinds

type Rep (Sum f g a) = D1 (MetaData "Sum" "Data.Functor.Sum.PolyKinds" "syntax-tree-0.1.0.1-5Y9WhklreXaDnL6Q9tTtln" False) (C1 (MetaCons "InL" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (f a))) :+: C1 (MetaCons "InR" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (g a))))