syntax-tree-0.1.0.1: Typed ASTs

Safe HaskellSafe
LanguageHaskell2010

Data.Functor.Product.PolyKinds

Description

PolyKinds variant of base's Product.

Note that to some extent base's Product is already poly-kinded, but it has problematic type class instances which are not poly-kinded. Furthermore, the mere existence of the non poly-kinded instances disallows orphan instances declaration of proper poly-kinded instances.

If/when Product from base will be fixed (see https://gitlab.haskell.org/ghc/ghc/issues/17015 for more details) this module will be removed and its uses will be replaced with Product from base.

Synopsis

Documentation

data Product f g a Source #

A PolyKinds variant of Product.

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

Constructors

Pair (f a) (g a) 
Instances
Generic1 (Product f g :: k -> Type) Source # 
Instance details

Defined in Data.Functor.Product.PolyKinds

Associated Types

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

Methods

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

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

(Monad f, Monad g) => Monad (Product f g) Source # 
Instance details

Defined in Data.Functor.Product.PolyKinds

Methods

(>>=) :: Product f g a -> (a -> Product f g b) -> Product f g b #

(>>) :: Product f g a -> Product f g b -> Product f g b #

return :: a -> Product f g a #

fail :: String -> Product f g a #

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

Defined in Data.Functor.Product.PolyKinds

Methods

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

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

(MonadFix f, MonadFix g) => MonadFix (Product f g) Source # 
Instance details

Defined in Data.Functor.Product.PolyKinds

Methods

mfix :: (a -> Product f g a) -> Product f g a #

(Applicative f, Applicative g) => Applicative (Product f g) Source # 
Instance details

Defined in Data.Functor.Product.PolyKinds

Methods

pure :: a -> Product f g a #

(<*>) :: Product f g (a -> b) -> Product f g a -> Product f g b #

liftA2 :: (a -> b -> c) -> Product f g a -> Product f g b -> Product f g c #

(*>) :: Product f g a -> Product f g b -> Product f g b #

(<*) :: Product f g a -> Product f g b -> Product f g a #

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

Defined in Data.Functor.Product.PolyKinds

Methods

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

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

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

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

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

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

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

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

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

null :: Product f g a -> Bool #

length :: Product f g a -> Int #

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

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

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

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

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

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

Defined in Data.Functor.Product.PolyKinds

Methods

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

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

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

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

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

Defined in Data.Functor.Product.PolyKinds

Methods

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

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

Defined in Data.Functor.Product.PolyKinds

Methods

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

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

Defined in Data.Functor.Product.PolyKinds

Methods

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

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

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

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

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

Defined in Data.Functor.Product.PolyKinds

Methods

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

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

(MonadZip f, MonadZip g) => MonadZip (Product f g) Source # 
Instance details

Defined in Data.Functor.Product.PolyKinds

Methods

mzip :: Product f g a -> Product f g b -> Product f g (a, b) #

mzipWith :: (a -> b -> c) -> Product f g a -> Product f g b -> Product f g c #

munzip :: Product f g (a, b) -> (Product f g a, Product f g b) #

(Alternative f, Alternative g) => Alternative (Product f g) Source # 
Instance details

Defined in Data.Functor.Product.PolyKinds

Methods

empty :: Product f g a #

(<|>) :: Product f g a -> Product f g a -> Product f g a #

some :: Product f g a -> Product f g [a] #

many :: Product f g a -> Product f g [a] #

(MonadPlus f, MonadPlus g) => MonadPlus (Product f g) Source # 
Instance details

Defined in Data.Functor.Product.PolyKinds

Methods

mzero :: Product f g a #

mplus :: Product f g a -> Product f g a -> Product f g a #

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

Defined in AST.Class.Nodes

Associated Types

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

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

Methods

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

(KPointed a, KPointed b) => KPointed (Product a b) Source # 
Instance details

Defined in AST.Class.Pointed

Methods

pureK :: (forall (n :: Knot -> Type). KWitness (Product a b) n -> Tree p n) -> Tree (Product a b) p Source #

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

Defined in AST.Class.Functor

Methods

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

(KApply a, KApply b) => KApply (Product a b) Source # 
Instance details

Defined in AST.Class.Apply

Methods

zipK :: Tree (Product a b) p -> Tree (Product a b) q -> Tree (Product a b) (Product p q) Source #

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

Defined in AST.Class.Foldable

Methods

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

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

Defined in AST.Class.Traversable

Methods

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

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

Defined in AST.Class.ZipMatch

Methods

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

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

Defined in Data.Functor.Product.PolyKinds

Methods

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

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

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

Defined in Data.Functor.Product.PolyKinds

Methods

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

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

toConstr :: Product f g a -> Constr #

dataTypeOf :: Product f g a -> DataType #

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

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

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

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

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

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

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

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

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

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

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

Defined in Data.Functor.Product.PolyKinds

Methods

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

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

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

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

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

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

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

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

Defined in Data.Functor.Product.PolyKinds

Methods

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

readList :: ReadS [Product f g a] #

readPrec :: ReadPrec (Product f g a) #

readListPrec :: ReadPrec [Product f g a] #

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

Defined in Data.Functor.Product.PolyKinds

Methods

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

show :: Product f g a -> String #

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

Generic (Product f g a) Source # 
Instance details

Defined in Data.Functor.Product.PolyKinds

Associated Types

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

Methods

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

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

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

Defined in Data.Functor.Product.PolyKinds

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

Defined in AST.Class.Nodes

type KNodesConstraint (Product a b) x Source # 
Instance details

Defined in AST.Class.Nodes

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

Defined in Data.Functor.Product.PolyKinds

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