base-4.10.1.0: Basic libraries

Copyright | Conor McBride and Ross Paterson 2005
License | BSD-style (see the LICENSE file in the distribution)
Maintainer | libraries@haskell.org
Stability | experimental
Portability | portable
Safe Haskell | Trustworthy
Language | Haskell2010

Data.Functor.Const

Description

Synopsis

- newtype Const a b = Const {
  - getConst :: a
  }

# Documentation

newtype Const a b #

The `Const` functor.

Constructors

Const |

Fields

- getConst :: a

Instances

Generic1 k (Const k a) # |
Associated Types type Rep1 (Const k a) (f :: Const k a -> *) :: k -> * # Methods from1 :: f a -> Rep1 (Const k a) f a # to1 :: Rep1 (Const k a) f a -> f a #
Show2 (Const *) # | Since: 4.9.0.0
Methods liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Const * a b -> ShowS # liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Const * a b] -> ShowS #
Read2 (Const *) # | Since: 4.9.0.0

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Const * a b) #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Const * a b] #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Const * a b) #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Const * a b] #

Ord2 (Const *) # | Since: 4.9.0.0
Methods liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Const * a c -> Const * b d -> Ordering #
Eq2 (Const *) # | Since: 4.9.0.0
Methods liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Const * a c -> Const * b d -> Bool #
Bifunctor (Const *) # | Since: 4.8.0.0
Methods bimap :: (a -> b) -> (c -> d) -> Const * a c -> Const * b d # first :: (a -> b) -> Const * a c -> Const * b c # second :: (b -> c) -> Const * a b -> Const * a c #
Bifoldable (Const *) # | Since: 4.10.0.0
Methods bifold :: Monoid m => Const * m m -> m # bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Const * a b -> m # bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Const * a b -> c # bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Const * a b -> c #
Bitraversable (Const *) # | Since: 4.10.0.0
Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Const * a b -> f (Const * c d) #
Functor (Const * m) # | Since: 2.1
Methods fmap :: (a -> b) -> Const * m a -> Const * m b # (<$) :: a -> Const * m b -> Const * m a #
Monoid m => Applicative (Const * m) # | Since: 2.0.1
Methods pure :: a -> Const * m a # (<*>) :: Const * m (a -> b) -> Const * m a -> Const * m b # liftA2 :: (a -> b -> c) -> Const * m a -> Const * m b -> Const * m c # (*>) :: Const * m a -> Const * m b -> Const * m b # (<*) :: Const * m a -> Const * m b -> Const * m a #
Foldable (Const * m) # | Since: 4.7.0.0

Methods

fold :: Monoid m => Const * m m -> m #

foldMap :: Monoid m => (a -> m) -> Const * m a -> m #

foldr :: (a -> b -> b) -> b -> Const * m a -> b #

foldr' :: (a -> b -> b) -> b -> Const * m a -> b #

foldl :: (b -> a -> b) -> b -> Const * m a -> b #

foldl' :: (b -> a -> b) -> b -> Const * m a -> b #

foldr1 :: (a -> a -> a) -> Const * m a -> a #

foldl1 :: (a -> a -> a) -> Const * m a -> a #

toList :: Const * m a -> [a] #

null :: Const * m a -> Bool #

length :: Const * m a -> Int #

elem :: Eq a => a -> Const * m a -> Bool #

maximum :: Ord a => Const * m a -> a #

minimum :: Ord a => Const * m a -> a #

sum :: Num a => Const * m a -> a #

product :: Num a => Const * m a -> a #

Traversable (Const * m) # | Since: 4.7.0.0
Methods traverse :: Applicative f => (a -> f b) -> Const * m a -> f (Const * m b) # sequenceA :: Applicative f => Const * m (f a) -> f (Const * m a) # mapM :: Monad m => (a -> m b) -> Const * m a -> m (Const * m b) # sequence :: Monad m => Const * m (m a) -> m (Const * m a) #
Show a => Show1 (Const * a) # | Since: 4.9.0.0
Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Const * a a -> ShowS # liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Const * a a] -> ShowS #
Read a => Read1 (Const * a) # | Since: 4.9.0.0
Methods liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Const * a a) # liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Const * a a] # liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Const * a a) # liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Const * a a] #
Ord a => Ord1 (Const * a) # | Since: 4.9.0.0
Methods liftCompare :: (a -> b -> Ordering) -> Const * a a -> Const * a b -> Ordering #
Eq a => Eq1 (Const * a) # | Since: 4.9.0.0
Methods liftEq :: (a -> b -> Bool) -> Const * a a -> Const * a b -> Bool #
Bounded a => Bounded (Const k a b) # |
Methods minBound :: Const k a b # maxBound :: Const k a b #
Enum a => Enum (Const k a b) # |
Methods succ :: Const k a b -> Const k a b # pred :: Const k a b -> Const k a b # toEnum :: Int -> Const k a b # fromEnum :: Const k a b -> Int # enumFrom :: Const k a b -> [Const k a b] # enumFromThen :: Const k a b -> Const k a b -> [Const k a b] # enumFromTo :: Const k a b -> Const k a b -> [Const k a b] # enumFromThenTo :: Const k a b -> Const k a b -> Const k a b -> [Const k a b] #
Eq a => Eq (Const k a b) # |
Methods (==) :: Const k a b -> Const k a b -> Bool Source # (/=) :: Const k a b -> Const k a b -> Bool Source #
Floating a => Floating (Const k a b) # |

Methods

pi :: Const k a b #

exp :: Const k a b -> Const k a b #

log :: Const k a b -> Const k a b #

sqrt :: Const k a b -> Const k a b #

(**) :: Const k a b -> Const k a b -> Const k a b #

logBase :: Const k a b -> Const k a b -> Const k a b #

sin :: Const k a b -> Const k a b #

cos :: Const k a b -> Const k a b #

tan :: Const k a b -> Const k a b #

asin :: Const k a b -> Const k a b #

acos :: Const k a b -> Const k a b #

atan :: Const k a b -> Const k a b #

sinh :: Const k a b -> Const k a b #

cosh :: Const k a b -> Const k a b #

tanh :: Const k a b -> Const k a b #

asinh :: Const k a b -> Const k a b #

acosh :: Const k a b -> Const k a b #

atanh :: Const k a b -> Const k a b #

log1p :: Const k a b -> Const k a b #

expm1 :: Const k a b -> Const k a b #

log1pexp :: Const k a b -> Const k a b #

log1mexp :: Const k a b -> Const k a b #

Fractional a => Fractional (Const k a b) # |
Methods (/) :: Const k a b -> Const k a b -> Const k a b # recip :: Const k a b -> Const k a b # fromRational :: Rational -> Const k a b #
Integral a => Integral (Const k a b) # |
Methods quot :: Const k a b -> Const k a b -> Const k a b # rem :: Const k a b -> Const k a b -> Const k a b # div :: Const k a b -> Const k a b -> Const k a b # mod :: Const k a b -> Const k a b -> Const k a b # quotRem :: Const k a b -> Const k a b -> (Const k a b, Const k a b) # divMod :: Const k a b -> Const k a b -> (Const k a b, Const k a b) # toInteger :: Const k a b -> Integer #
(Typeable * k3, Data a, Typeable k3 b) => Data (Const k3 a b) # | Since: 4.10.0.0

Methods

gfoldl :: (forall d c. Data d => c (d -> c) -> d -> c c) -> (forall g. g -> c g) -> Const k3 a b -> c (Const k3 a b) #

gunfold :: (forall c r. Data c => c (c -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Const k3 a b) #

toConstr :: Const k3 a b -> Constr #

dataTypeOf :: Const k3 a b -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Const k3 a b)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Const k3 a b)) #

gmapT :: (forall c. Data c => c -> c) -> Const k3 a b -> Const k3 a b #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Const k3 a b -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Const k3 a b -> r #

gmapQ :: (forall d. Data d => d -> u) -> Const k3 a b -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Const k3 a b -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Const k3 a b -> m (Const k3 a b) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Const k3 a b -> m (Const k3 a b) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Const k3 a b -> m (Const k3 a b) #

Num a => Num (Const k a b) # |
Methods (+) :: Const k a b -> Const k a b -> Const k a b # (-) :: Const k a b -> Const k a b -> Const k a b # (*) :: Const k a b -> Const k a b -> Const k a b # negate :: Const k a b -> Const k a b # abs :: Const k a b -> Const k a b # signum :: Const k a b -> Const k a b # fromInteger :: Integer -> Const k a b #
Ord a => Ord (Const k a b) # |
Methods compare :: Const k a b -> Const k a b -> Ordering Source # (<) :: Const k a b -> Const k a b -> Bool Source # (<=) :: Const k a b -> Const k a b -> Bool Source # (>) :: Const k a b -> Const k a b -> Bool Source # (>=) :: Const k a b -> Const k a b -> Bool Source # max :: Const k a b -> Const k a b -> Const k a b Source # min :: Const k a b -> Const k a b -> Const k a b Source #
Read a => Read (Const k a b) # | This instance would be equivalent to the derived instances of the `Const` newtype if the `runConst` field were removed Since: 4.8.0.0
Methods readsPrec :: Int -> ReadS (Const k a b) # readList :: ReadS [Const k a b] # readPrec :: ReadPrec (Const k a b) # readListPrec :: ReadPrec [Const k a b] #
Real a => Real (Const k a b) # |
Methods toRational :: Const k a b -> Rational #
RealFloat a => RealFloat (Const k a b) # |

Methods

floatRadix :: Const k a b -> Integer #

floatDigits :: Const k a b -> Int #

floatRange :: Const k a b -> (Int, Int) #

decodeFloat :: Const k a b -> (Integer, Int) #

encodeFloat :: Integer -> Int -> Const k a b #

exponent :: Const k a b -> Int #

significand :: Const k a b -> Const k a b #

scaleFloat :: Int -> Const k a b -> Const k a b #

isNaN :: Const k a b -> Bool #

isInfinite :: Const k a b -> Bool #

isDenormalized :: Const k a b -> Bool #

isNegativeZero :: Const k a b -> Bool #

isIEEE :: Const k a b -> Bool #

atan2 :: Const k a b -> Const k a b -> Const k a b #

RealFrac a => RealFrac (Const k a b) # |
Methods properFraction :: Integral b => Const k a b -> (b, Const k a b) # truncate :: Integral b => Const k a b -> b # round :: Integral b => Const k a b -> b # ceiling :: Integral b => Const k a b -> b # floor :: Integral b => Const k a b -> b #
Show a => Show (Const k a b) # | This instance would be equivalent to the derived instances of the `Const` newtype if the `runConst` field were removed Since: 4.8.0.0
Methods showsPrec :: Int -> Const k a b -> ShowS # show :: Const k a b -> String # showList :: [Const k a b] -> ShowS #
Ix a => Ix (Const k a b) # |
Methods range :: (Const k a b, Const k a b) -> [Const k a b] # index :: (Const k a b, Const k a b) -> Const k a b -> Int # unsafeIndex :: (Const k a b, Const k a b) -> Const k a b -> Int inRange :: (Const k a b, Const k a b) -> Const k a b -> Bool # rangeSize :: (Const k a b, Const k a b) -> Int # unsafeRangeSize :: (Const k a b, Const k a b) -> Int
IsString a => IsString (Const * a b) # | Since: 4.9.0.0
Methods fromString :: String -> Const * a b #
Generic (Const k a b) # |
Associated Types type Rep (Const k a b) :: * -> * # Methods from :: Const k a b -> Rep (Const k a b) x # to :: Rep (Const k a b) x -> Const k a b #
Semigroup a => Semigroup (Const k a b) # | Since: 4.9.0.0
Methods (<>) :: Const k a b -> Const k a b -> Const k a b # sconcat :: NonEmpty (Const k a b) -> Const k a b # stimes :: Integral b => b -> Const k a b -> Const k a b #
Monoid a => Monoid (Const k a b) # |
Methods mempty :: Const k a b # mappend :: Const k a b -> Const k a b -> Const k a b # mconcat :: [Const k a b] -> Const k a b #
FiniteBits a => FiniteBits (Const k a b) # |
Methods finiteBitSize :: Const k a b -> Int # countLeadingZeros :: Const k a b -> Int # countTrailingZeros :: Const k a b -> Int #
Bits a => Bits (Const k a b) # |

Methods

(.&.) :: Const k a b -> Const k a b -> Const k a b #

(.|.) :: Const k a b -> Const k a b -> Const k a b #

xor :: Const k a b -> Const k a b -> Const k a b #

complement :: Const k a b -> Const k a b #

shift :: Const k a b -> Int -> Const k a b #

rotate :: Const k a b -> Int -> Const k a b #

zeroBits :: Const k a b #

bit :: Int -> Const k a b #

setBit :: Const k a b -> Int -> Const k a b #

clearBit :: Const k a b -> Int -> Const k a b #

complementBit :: Const k a b -> Int -> Const k a b #

testBit :: Const k a b -> Int -> Bool #

bitSizeMaybe :: Const k a b -> Maybe Int #

bitSize :: Const k a b -> Int #

isSigned :: Const k a b -> Bool #

shiftL :: Const k a b -> Int -> Const k a b #

unsafeShiftL :: Const k a b -> Int -> Const k a b #

shiftR :: Const k a b -> Int -> Const k a b #

unsafeShiftR :: Const k a b -> Int -> Const k a b #

rotateL :: Const k a b -> Int -> Const k a b #

rotateR :: Const k a b -> Int -> Const k a b #

popCount :: Const k a b -> Int #

Storable a => Storable (Const k a b) # |

Methods

sizeOf :: Const k a b -> Int #

alignment :: Const k a b -> Int #

peekElemOff :: Ptr (Const k a b) -> Int -> IO (Const k a b) #

pokeElemOff :: Ptr (Const k a b) -> Int -> Const k a b -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Const k a b) #

pokeByteOff :: Ptr b -> Int -> Const k a b -> IO () #

peek :: Ptr (Const k a b) -> IO (Const k a b) #

poke :: Ptr (Const k a b) -> Const k a b -> IO () #

type Rep1 k (Const k a) # |
type Rep1 k (Const k a) = D1 k (MetaData "Const" "Data.Functor.Const" "base" True) (C1 k (MetaCons "Const" PrefixI True) (S1 k (MetaSel (Just Symbol "getConst") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 k a)))
type Rep (Const k a b) # |
type Rep (Const k a b) = D1 * (MetaData "Const" "Data.Functor.Const" "base" True) (C1 * (MetaCons "Const" PrefixI True) (S1 * (MetaSel (Just Symbol "getConst") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)))