Copyright | Conor McBride and Ross Paterson 2005 |
---|---|
License | BSD-style (see the LICENSE file in the distribution) |
Maintainer | libraries@haskell.org |
Stability | stable |
Portability | portable |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
Data.Functor.Const
Description
Documentation
The Const
functor.
Instances
Instances details
Instance details
Defined in Data.Bifoldable
Instance details
Defined in Data.Bitraversable
Methods
bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Const a b -> f (Const c d) Source #
Instance details
Defined in Data.Functor.Classes
Instance details
Defined in Data.Functor.Classes
Methods
liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Const a b) Source #
liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Const a b] Source #
liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Const a b) Source #
liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Const a b] Source #
Instance details
Defined in Data.Functor.Classes
Instance details
Defined in Data.Functor.Const
Methods
fold :: Monoid m0 => Const m m0 -> m0 Source #
foldMap :: Monoid m0 => (a -> m0) -> Const m a -> m0 Source #
foldMap' :: Monoid m0 => (a -> m0) -> Const m a -> m0 Source #
foldr :: (a -> b -> b) -> b -> Const m a -> b Source #
foldr' :: (a -> b -> b) -> b -> Const m a -> b Source #
foldl :: (b -> a -> b) -> b -> Const m a -> b Source #
foldl' :: (b -> a -> b) -> b -> Const m a -> b Source #
foldr1 :: (a -> a -> a) -> Const m a -> a Source #
foldl1 :: (a -> a -> a) -> Const m a -> a Source #
toList :: Const m a -> [a] Source #
null :: Const m a -> Bool Source #
length :: Const m a -> Int Source #
elem :: Eq a => a -> Const m a -> Bool Source #
maximum :: Ord a => Const m a -> a Source #
minimum :: Ord a => Const m a -> a Source #
Instance details
Defined in Data.Functor.Classes
Instance details
Defined in Data.Functor.Classes
Methods
liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (Const a a0) Source #
liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Const a a0] Source #
liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Const a a0) Source #
liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Const a a0] Source #
Instance details
Defined in Data.Traversable
Instance details
Defined in Data.Functor.Const
Instance details
Defined in Data.Data
Methods
gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Const a b -> c (Const a b) Source #
gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Const a b) Source #
toConstr :: Const a b -> Constr Source #
dataTypeOf :: Const a b -> DataType Source #
dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Const a b)) Source #
dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Const a b)) Source #
gmapT :: (forall b0. Data b0 => b0 -> b0) -> Const a b -> Const a b Source #
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Const a b -> r Source #
gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Const a b -> r Source #
gmapQ :: (forall d. Data d => d -> u) -> Const a b -> [u] Source #
gmapQi :: Int -> (forall d. Data d => d -> u) -> Const a b -> u Source #
gmapM :: Monad m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) Source #
gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) Source #
gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) Source #
Instance details
Defined in Data.Functor.Const
Methods
sizeOf :: Const a b -> Int Source #
alignment :: Const a b -> Int Source #
peekElemOff :: Ptr (Const a b) -> Int -> IO (Const a b) Source #
pokeElemOff :: Ptr (Const a b) -> Int -> Const a b -> IO () Source #
peekByteOff :: Ptr b0 -> Int -> IO (Const a b) Source #
pokeByteOff :: Ptr b0 -> Int -> Const a b -> IO () Source #
Instance details
Defined in Data.Functor.Const
Methods
(.&.) :: Const a b -> Const a b -> Const a b Source #
(.|.) :: Const a b -> Const a b -> Const a b Source #
xor :: Const a b -> Const a b -> Const a b Source #
complement :: Const a b -> Const a b Source #
shift :: Const a b -> Int -> Const a b Source #
rotate :: Const a b -> Int -> Const a b Source #
zeroBits :: Const a b Source #
bit :: Int -> Const a b Source #
setBit :: Const a b -> Int -> Const a b Source #
clearBit :: Const a b -> Int -> Const a b Source #
complementBit :: Const a b -> Int -> Const a b Source #
testBit :: Const a b -> Int -> Bool Source #
bitSizeMaybe :: Const a b -> Maybe Int Source #
bitSize :: Const a b -> Int Source #
isSigned :: Const a b -> Bool Source #
shiftL :: Const a b -> Int -> Const a b Source #
unsafeShiftL :: Const a b -> Int -> Const a b Source #
shiftR :: Const a b -> Int -> Const a b Source #
unsafeShiftR :: Const a b -> Int -> Const a b Source #
rotateL :: Const a b -> Int -> Const a b Source #
Instance details
Defined in Data.Functor.Const
Methods
finiteBitSize :: Const a b -> Int Source #
countLeadingZeros :: Const a b -> Int Source #
countTrailingZeros :: Const a b -> Int Source #
Instance details
Defined in Data.Functor.Const
Methods
succ :: Const a b -> Const a b Source #
pred :: Const a b -> Const a b Source #
toEnum :: Int -> Const a b Source #
fromEnum :: Const a b -> Int Source #
enumFrom :: Const a b -> [Const a b] Source #
enumFromThen :: Const a b -> Const a b -> [Const a b] Source #
enumFromTo :: Const a b -> Const a b -> [Const a b] Source #
enumFromThenTo :: Const a b -> Const a b -> Const a b -> [Const a b] Source #
Instance details
Defined in Data.Functor.Const
Methods
exp :: Const a b -> Const a b Source #
log :: Const a b -> Const a b Source #
sqrt :: Const a b -> Const a b Source #
(**) :: Const a b -> Const a b -> Const a b Source #
logBase :: Const a b -> Const a b -> Const a b Source #
sin :: Const a b -> Const a b Source #
cos :: Const a b -> Const a b Source #
tan :: Const a b -> Const a b Source #
asin :: Const a b -> Const a b Source #
acos :: Const a b -> Const a b Source #
atan :: Const a b -> Const a b Source #
sinh :: Const a b -> Const a b Source #
cosh :: Const a b -> Const a b Source #
tanh :: Const a b -> Const a b Source #
asinh :: Const a b -> Const a b Source #
acosh :: Const a b -> Const a b Source #
atanh :: Const a b -> Const a b Source #
log1p :: Const a b -> Const a b Source #
expm1 :: Const a b -> Const a b Source #
Instance details
Defined in Data.Functor.Const
Methods
floatRadix :: Const a b -> Integer Source #
floatDigits :: Const a b -> Int Source #
floatRange :: Const a b -> (Int, Int) Source #
decodeFloat :: Const a b -> (Integer, Int) Source #
encodeFloat :: Integer -> Int -> Const a b Source #
exponent :: Const a b -> Int Source #
significand :: Const a b -> Const a b Source #
scaleFloat :: Int -> Const a b -> Const a b Source #
isNaN :: Const a b -> Bool Source #
isInfinite :: Const a b -> Bool Source #
isDenormalized :: Const a b -> Bool Source #
isNegativeZero :: Const a b -> Bool Source #
Instance details
Defined in Data.Functor.Const
Methods
range :: (Const a b, Const a b) -> [Const a b] Source #
index :: (Const a b, Const a b) -> Const a b -> Int Source #
unsafeIndex :: (Const a b, Const a b) -> Const a b -> Int Source #
inRange :: (Const a b, Const a b) -> Const a b -> Bool Source #
Instance details
Defined in Data.Functor.Const
Methods
(+) :: Const a b -> Const a b -> Const a b Source #
(-) :: Const a b -> Const a b -> Const a b Source #
(*) :: Const a b -> Const a b -> Const a b Source #
negate :: Const a b -> Const a b Source #
abs :: Const a b -> Const a b Source #
signum :: Const a b -> Const a b Source #
fromInteger :: Integer -> Const a b Source #
This instance would be equivalent to the derived instances of the
Const
newtype if the getConst
field were removed
Since: base-4.8.0.0
Instance details
Defined in Data.Functor.Const
Methods
quot :: Const a b -> Const a b -> Const a b Source #
rem :: Const a b -> Const a b -> Const a b Source #
div :: Const a b -> Const a b -> Const a b Source #
mod :: Const a b -> Const a b -> Const a b Source #
quotRem :: Const a b -> Const a b -> (Const a b, Const a b) Source #
divMod :: Const a b -> Const a b -> (Const a b, Const a b) Source #
Instance details
Defined in Data.Functor.Const
This instance would be equivalent to the derived instances of the
Const
newtype if the getConst
field were removed
Since: base-4.8.0.0
Instance details
Defined in Data.Functor.Const
Methods
compare :: Const a b -> Const a b -> Ordering Source #
(<) :: Const a b -> Const a b -> Bool Source #
(<=) :: Const a b -> Const a b -> Bool Source #
(>) :: Const a b -> Const a b -> Bool Source #
(>=) :: Const a b -> Const a b -> Bool Source #
Instance details
Defined in Data.Functor.Const
Instance details
Defined in Data.Functor.Const