W3cubDocs

/Haskell 8

Data.Functor.Constant

Copyright (c) Ross Paterson 2010
License BSD-style (see the file LICENSE)
Maintainer [email protected]
Stability experimental
Portability portable
Safe Haskell Safe
Language Haskell98

Description

The constant functor.

newtype Constant a b Source

Constant functor.

Constructors

Constant

Fields

Instances
Bitraversable (Constant :: Type -> Type -> Type)
Instance details

Defined in Data.Functor.Constant

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Constant a b -> f (Constant c d) Source

Bifoldable (Constant :: Type -> Type -> Type)
Instance details

Defined in Data.Functor.Constant

Methods

bifold :: Monoid m => Constant m m -> m Source

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Constant a b -> m Source

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Constant a b -> c Source

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Constant a b -> c Source

Bifunctor (Constant :: Type -> Type -> Type)
Instance details

Defined in Data.Functor.Constant

Methods

bimap :: (a -> b) -> (c -> d) -> Constant a c -> Constant b d Source

first :: (a -> b) -> Constant a c -> Constant b c Source

second :: (b -> c) -> Constant a b -> Constant a c Source

Eq2 (Constant :: Type -> Type -> Type)
Instance details

Defined in Data.Functor.Constant

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Constant a c -> Constant b d -> Bool Source

Ord2 (Constant :: Type -> Type -> Type)
Instance details

Defined in Data.Functor.Constant

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Constant a c -> Constant b d -> Ordering Source

Read2 (Constant :: Type -> Type -> Type)
Instance details

Defined in Data.Functor.Constant

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Constant a b) Source

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Constant a b] Source

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Constant a b) Source

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Constant a b] Source

Show2 (Constant :: Type -> Type -> Type)
Instance details

Defined in Data.Functor.Constant

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Constant a b -> ShowS Source

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Constant a b] -> ShowS Source

Functor (Constant a :: Type -> Type)
Instance details

Defined in Data.Functor.Constant

Methods

fmap :: (a0 -> b) -> Constant a a0 -> Constant a b Source

(<$) :: a0 -> Constant a b -> Constant a a0 Source

Monoid a => Applicative (Constant a :: Type -> Type)
Instance details

Defined in Data.Functor.Constant

Methods

pure :: a0 -> Constant a a0 Source

(<*>) :: Constant a (a0 -> b) -> Constant a a0 -> Constant a b Source

liftA2 :: (a0 -> b -> c) -> Constant a a0 -> Constant a b -> Constant a c Source

(*>) :: Constant a a0 -> Constant a b -> Constant a b Source

(<*) :: Constant a a0 -> Constant a b -> Constant a a0 Source

Foldable (Constant a :: Type -> Type)
Instance details

Defined in Data.Functor.Constant

Methods

fold :: Monoid m => Constant a m -> m Source

foldMap :: Monoid m => (a0 -> m) -> Constant a a0 -> m Source

foldr :: (a0 -> b -> b) -> b -> Constant a a0 -> b Source

foldr' :: (a0 -> b -> b) -> b -> Constant a a0 -> b Source

foldl :: (b -> a0 -> b) -> b -> Constant a a0 -> b Source

foldl' :: (b -> a0 -> b) -> b -> Constant a a0 -> b Source

foldr1 :: (a0 -> a0 -> a0) -> Constant a a0 -> a0 Source

foldl1 :: (a0 -> a0 -> a0) -> Constant a a0 -> a0 Source

toList :: Constant a a0 -> [a0] Source

null :: Constant a a0 -> Bool Source

length :: Constant a a0 -> Int Source

elem :: Eq a0 => a0 -> Constant a a0 -> Bool Source

maximum :: Ord a0 => Constant a a0 -> a0 Source

minimum :: Ord a0 => Constant a a0 -> a0 Source

sum :: Num a0 => Constant a a0 -> a0 Source

product :: Num a0 => Constant a a0 -> a0 Source

Traversable (Constant a :: Type -> Type)
Instance details

Defined in Data.Functor.Constant

Methods

traverse :: Applicative f => (a0 -> f b) -> Constant a a0 -> f (Constant a b) Source

sequenceA :: Applicative f => Constant a (f a0) -> f (Constant a a0) Source

mapM :: Monad m => (a0 -> m b) -> Constant a a0 -> m (Constant a b) Source

sequence :: Monad m => Constant a (m a0) -> m (Constant a a0) Source

Contravariant (Constant a :: Type -> Type)
Instance details

Defined in Data.Functor.Constant

Methods

contramap :: (a0 -> b) -> Constant a b -> Constant a a0 Source

(>$) :: b -> Constant a b -> Constant a a0 Source

Eq a => Eq1 (Constant a :: Type -> Type)
Instance details

Defined in Data.Functor.Constant

Methods

liftEq :: (a0 -> b -> Bool) -> Constant a a0 -> Constant a b -> Bool Source

Ord a => Ord1 (Constant a :: Type -> Type)
Instance details

Defined in Data.Functor.Constant

Methods

liftCompare :: (a0 -> b -> Ordering) -> Constant a a0 -> Constant a b -> Ordering Source

Read a => Read1 (Constant a :: Type -> Type)
Instance details

Defined in Data.Functor.Constant

Methods

liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (Constant a a0) Source

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Constant a a0] Source

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Constant a a0) Source

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Constant a a0] Source

Show a => Show1 (Constant a :: Type -> Type)
Instance details

Defined in Data.Functor.Constant

Methods

liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> Constant a a0 -> ShowS Source

liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [Constant a a0] -> ShowS Source

Eq a => Eq (Constant a b)
Instance details

Defined in Data.Functor.Constant

Methods

(==) :: Constant a b -> Constant a b -> Bool

(/=) :: Constant a b -> Constant a b -> Bool

Ord a => Ord (Constant a b)
Instance details

Defined in Data.Functor.Constant

Methods

compare :: Constant a b -> Constant a b -> Ordering

(<) :: Constant a b -> Constant a b -> Bool

(<=) :: Constant a b -> Constant a b -> Bool

(>) :: Constant a b -> Constant a b -> Bool

(>=) :: Constant a b -> Constant a b -> Bool

max :: Constant a b -> Constant a b -> Constant a b

min :: Constant a b -> Constant a b -> Constant a b

Read a => Read (Constant a b)
Instance details

Defined in Data.Functor.Constant

Show a => Show (Constant a b)
Instance details

Defined in Data.Functor.Constant

Methods

showsPrec :: Int -> Constant a b -> ShowS Source

show :: Constant a b -> String Source

showList :: [Constant a b] -> ShowS Source

Semigroup a => Semigroup (Constant a b)
Instance details

Defined in Data.Functor.Constant

Methods

(<>) :: Constant a b -> Constant a b -> Constant a b Source

sconcat :: NonEmpty (Constant a b) -> Constant a b Source

stimes :: Integral b0 => b0 -> Constant a b -> Constant a b Source

Monoid a => Monoid (Constant a b)
Instance details

Defined in Data.Functor.Constant

Methods

mempty :: Constant a b Source

mappend :: Constant a b -> Constant a b -> Constant a b Source

mconcat :: [Constant a b] -> Constant a b Source

© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/8.6.1/docs/html/libraries/transformers-0.5.5.0/Data-Functor-Constant.html