Copyright | (c) Ross Paterson 2014 |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | [email protected] |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Sums, lifted to functors.
Since: base-4.9.0.0
Lifted sum of functors.
Generic1 (Sum f g :: k -> Type) | Since: base-4.9.0.0 |
(Functor f, Functor g) => Functor (Sum f g) | Since: base-4.9.0.0 |
(Foldable f, Foldable g) => Foldable (Sum f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Sum Methodsfold :: Monoid m => Sum f g m -> m Source foldMap :: Monoid m => (a -> m) -> Sum f g a -> m Source foldMap' :: Monoid m => (a -> m) -> Sum f g a -> m Source foldr :: (a -> b -> b) -> b -> Sum f g a -> b Source foldr' :: (a -> b -> b) -> b -> Sum f g a -> b Source foldl :: (b -> a -> b) -> b -> Sum f g a -> b Source foldl' :: (b -> a -> b) -> b -> Sum f g a -> b Source foldr1 :: (a -> a -> a) -> Sum f g a -> a Source foldl1 :: (a -> a -> a) -> Sum f g a -> a Source toList :: Sum f g a -> [a] Source null :: Sum f g a -> Bool Source length :: Sum f g a -> Int Source elem :: Eq a => a -> Sum f g a -> Bool Source maximum :: Ord a => Sum f g a -> a Source minimum :: Ord a => Sum f g a -> a Source | |
(Traversable f, Traversable g) => Traversable (Sum f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Sum | |
(Show1 f, Show1 g) => Show1 (Sum f g) | Since: base-4.9.0.0 |
(Read1 f, Read1 g) => Read1 (Sum f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Sum MethodsliftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Sum f g a) Source liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Sum f g a] Source liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Sum f g a) Source liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Sum f g a] Source | |
(Ord1 f, Ord1 g) => Ord1 (Sum f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Sum | |
(Eq1 f, Eq1 g) => Eq1 (Sum f g) | Since: base-4.9.0.0 |
(Contravariant f, Contravariant g) => Contravariant (Sum f g) | |
(Eq1 f, Eq1 g, Eq a) => Eq (Sum f g a) | Since: base-4.9.0.0 |
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a), Data (g a)) => Data (Sum f g a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Sum Methodsgfoldl :: (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) Source gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Sum f g a) Source toConstr :: Sum f g a -> Constr Source dataTypeOf :: Sum f g a -> DataType Source dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Sum f g a)) Source dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Sum f g a)) Source gmapT :: (forall b. Data b => b -> b) -> Sum f g a -> Sum f g a Source gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Sum f g a -> r Source gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Sum f g a -> r Source gmapQ :: (forall d. Data d => d -> u) -> Sum f g a -> [u] Source gmapQi :: Int -> (forall d. Data d => d -> u) -> Sum f g a -> u Source gmapM :: Monad m => (forall d. Data d => d -> m d) -> Sum f g a -> m (Sum f g a) Source gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Sum f g a -> m (Sum f g a) Source gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Sum f g a -> m (Sum f g a) Source | |
(Ord1 f, Ord1 g, Ord a) => Ord (Sum f g a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Sum | |
(Read1 f, Read1 g, Read a) => Read (Sum f g a) | Since: base-4.9.0.0 |
(Show1 f, Show1 g, Show a) => Show (Sum f g a) | Since: base-4.9.0.0 |
Generic (Sum f g a) | Since: base-4.9.0.0 |
type Rep1 (Sum f g :: k -> Type) | |
Defined in Data.Functor.Sum type Rep1 (Sum f g :: k -> Type) = D1 ('MetaData "Sum" "Data.Functor.Sum" "base" '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))) | |
type Rep (Sum f g a) | |
Defined in Data.Functor.Sum type Rep (Sum f g a) = D1 ('MetaData "Sum" "Data.Functor.Sum" "base" '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)))) |
© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/8.8.3/docs/html/libraries/base-4.13.0.0/Data-Functor-Sum.html