basement-0.0.16: Foundation scrap box of array & string

License | BSD-style
Maintainer | Vincent Hanquez <vincent@snarc.org>
Stability | experimental
Portability | portable
Safe Haskell | Safe-Inferred
Language | Haskell2010

Basement.Compat.Identity

Description

Identity re-export, with a compat wrapper for older version of base that do not have Data.Functor.Identity

# Documentation

newtype Identity a #

Constructors

Identity |

Fields

- runIdentity :: a

#### Instances

Instances details

MonadFix Identity |
Instance details Defined in Data.Functor.Identity Methods mfix :: (a -> Identity a) -> Identity a
Foldable Identity |

Instance details

Defined in Data.Functor.Identity

Methods

fold :: Monoid m => Identity m -> m

foldMap :: Monoid m => (a -> m) -> Identity a -> m

foldMap' :: Monoid m => (a -> m) -> Identity a -> m

foldr :: (a -> b -> b) -> b -> Identity a -> b

foldr' :: (a -> b -> b) -> b -> Identity a -> b

foldl :: (b -> a -> b) -> b -> Identity a -> b

foldl' :: (b -> a -> b) -> b -> Identity a -> b

foldr1 :: (a -> a -> a) -> Identity a -> a

foldl1 :: (a -> a -> a) -> Identity a -> a

toList :: Identity a -> [a]

null :: Identity a -> Bool

length :: Identity a -> Int

elem :: Eq a => a -> Identity a -> Bool

maximum :: Ord a => Identity a -> a

minimum :: Ord a => Identity a -> a

sum :: Num a => Identity a -> a

product :: Num a => Identity a -> a

Traversable Identity |
Instance details Defined in Data.Traversable Methods traverse :: Applicative f => (a -> f b) -> Identity a -> f (Identity b) sequenceA :: Applicative f => Identity (f a) -> f (Identity a) mapM :: Monad m => (a -> m b) -> Identity a -> m (Identity b) sequence :: Monad m => Identity (m a) -> m (Identity a)
Applicative Identity |
Instance details Defined in Data.Functor.Identity Methods pure :: a -> Identity a # (<*>) :: Identity (a -> b) -> Identity a -> Identity b # liftA2 :: (a -> b -> c) -> Identity a -> Identity b -> Identity c # (*>) :: Identity a -> Identity b -> Identity b # (<*) :: Identity a -> Identity b -> Identity a #
Functor Identity |
Instance details Defined in Data.Functor.Identity Methods fmap :: (a -> b) -> Identity a -> Identity b # (<$) :: a -> Identity b -> Identity a #
Monad Identity |
Instance details Defined in Data.Functor.Identity Methods (>>=) :: Identity a -> (a -> Identity b) -> Identity b # (>>) :: Identity a -> Identity b -> Identity b # return :: a -> Identity a #
Generic1 Identity |
Instance details Defined in Data.Functor.Identity Associated Types type Rep1 Identity :: k -> Type Methods from1 :: forall (a :: k). Identity a -> Rep1 Identity a to1 :: forall (a :: k). Rep1 Identity a -> Identity a
Data a => Data (Identity a) |

Instance details

Defined in Data.Data

Methods

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

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

toConstr :: Identity a -> Constr #

dataTypeOf :: Identity a -> DataType #

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

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

gmapT :: (forall b. Data b => b -> b) -> Identity a -> Identity a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Identity a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Identity a -> r #

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

gmapQi :: Int -> (forall d. Data d => d -> u) -> Identity a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Identity a -> m (Identity a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Identity a -> m (Identity a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Identity a -> m (Identity a) #

IsString a => IsString (Identity a) |
Instance details Defined in Data.String Methods fromString :: String -> Identity a #
Storable a => Storable (Identity a) |

Instance details

Defined in Data.Functor.Identity

Methods

sizeOf :: Identity a -> Int

alignment :: Identity a -> Int

peekElemOff :: Ptr (Identity a) -> Int -> IO (Identity a)

pokeElemOff :: Ptr (Identity a) -> Int -> Identity a -> IO ()

peekByteOff :: Ptr b -> Int -> IO (Identity a)

pokeByteOff :: Ptr b -> Int -> Identity a -> IO ()

peek :: Ptr (Identity a) -> IO (Identity a)

poke :: Ptr (Identity a) -> Identity a -> IO ()

Monoid a => Monoid (Identity a) |
Instance details Defined in Data.Functor.Identity Methods mempty :: Identity a # mappend :: Identity a -> Identity a -> Identity a # mconcat :: [Identity a] -> Identity a #
Semigroup a => Semigroup (Identity a) |
Instance details Defined in Data.Functor.Identity Methods (<>) :: Identity a -> Identity a -> Identity a # sconcat :: NonEmpty (Identity a) -> Identity a # stimes :: Integral b => b -> Identity a -> Identity a #
Bits a => Bits (Identity a) |

Instance details

Defined in Data.Functor.Identity

Methods

(.&.) :: Identity a -> Identity a -> Identity a

(.|.) :: Identity a -> Identity a -> Identity a

xor :: Identity a -> Identity a -> Identity a

complement :: Identity a -> Identity a

shift :: Identity a -> Int -> Identity a

rotate :: Identity a -> Int -> Identity a

zeroBits :: Identity a

bit :: Int -> Identity a

setBit :: Identity a -> Int -> Identity a

clearBit :: Identity a -> Int -> Identity a

complementBit :: Identity a -> Int -> Identity a

testBit :: Identity a -> Int -> Bool

bitSizeMaybe :: Identity a -> Maybe Int

bitSize :: Identity a -> Int

isSigned :: Identity a -> Bool

shiftL :: Identity a -> Int -> Identity a

unsafeShiftL :: Identity a -> Int -> Identity a

shiftR :: Identity a -> Int -> Identity a

unsafeShiftR :: Identity a -> Int -> Identity a

rotateL :: Identity a -> Int -> Identity a

rotateR :: Identity a -> Int -> Identity a

popCount :: Identity a -> Int

FiniteBits a => FiniteBits (Identity a) |
Instance details Defined in Data.Functor.Identity Methods finiteBitSize :: Identity a -> Int countLeadingZeros :: Identity a -> Int countTrailingZeros :: Identity a -> Int
Bounded a => Bounded (Identity a) |
Instance details Defined in Data.Functor.Identity Methods minBound :: Identity a # maxBound :: Identity a #
Enum a => Enum (Identity a) |

Instance details

Defined in Data.Functor.Identity

Methods

succ :: Identity a -> Identity a #

pred :: Identity a -> Identity a #

toEnum :: Int -> Identity a #

fromEnum :: Identity a -> Int #

enumFrom :: Identity a -> [Identity a] #

enumFromThen :: Identity a -> Identity a -> [Identity a] #

enumFromTo :: Identity a -> Identity a -> [Identity a] #

enumFromThenTo :: Identity a -> Identity a -> Identity a -> [Identity a] #

Floating a => Floating (Identity a) |

Instance details

Defined in Data.Functor.Identity

Methods

pi :: Identity a

exp :: Identity a -> Identity a

log :: Identity a -> Identity a

sqrt :: Identity a -> Identity a

(**) :: Identity a -> Identity a -> Identity a

logBase :: Identity a -> Identity a -> Identity a

sin :: Identity a -> Identity a

cos :: Identity a -> Identity a

tan :: Identity a -> Identity a

asin :: Identity a -> Identity a

acos :: Identity a -> Identity a

atan :: Identity a -> Identity a

sinh :: Identity a -> Identity a

cosh :: Identity a -> Identity a

tanh :: Identity a -> Identity a

asinh :: Identity a -> Identity a

acosh :: Identity a -> Identity a

atanh :: Identity a -> Identity a

log1p :: Identity a -> Identity a

expm1 :: Identity a -> Identity a

log1pexp :: Identity a -> Identity a

log1mexp :: Identity a -> Identity a

RealFloat a => RealFloat (Identity a) |

Instance details

Defined in Data.Functor.Identity

Methods

floatRadix :: Identity a -> Integer

floatDigits :: Identity a -> Int

floatRange :: Identity a -> (Int, Int)

decodeFloat :: Identity a -> (Integer, Int)

encodeFloat :: Integer -> Int -> Identity a

exponent :: Identity a -> Int

significand :: Identity a -> Identity a

scaleFloat :: Int -> Identity a -> Identity a

isNaN :: Identity a -> Bool

isInfinite :: Identity a -> Bool

isDenormalized :: Identity a -> Bool

isNegativeZero :: Identity a -> Bool

isIEEE :: Identity a -> Bool

atan2 :: Identity a -> Identity a -> Identity a

Generic (Identity a) |
Instance details Defined in Data.Functor.Identity Associated Types type Rep (Identity a) :: Type -> Type # Methods from :: Identity a -> Rep (Identity a) x # to :: Rep (Identity a) x -> Identity a #
Ix a => Ix (Identity a) |
Instance details Defined in Data.Functor.Identity Methods range :: (Identity a, Identity a) -> [Identity a] index :: (Identity a, Identity a) -> Identity a -> Int unsafeIndex :: (Identity a, Identity a) -> Identity a -> Int inRange :: (Identity a, Identity a) -> Identity a -> Bool rangeSize :: (Identity a, Identity a) -> Int unsafeRangeSize :: (Identity a, Identity a) -> Int
Num a => Num (Identity a) |
Instance details Defined in Data.Functor.Identity Methods (+) :: Identity a -> Identity a -> Identity a (-) :: Identity a -> Identity a -> Identity a (*) :: Identity a -> Identity a -> Identity a negate :: Identity a -> Identity a abs :: Identity a -> Identity a signum :: Identity a -> Identity a fromInteger :: Integer -> Identity a
Read a => Read (Identity a) |
Instance details Defined in Data.Functor.Identity Methods readsPrec :: Int -> ReadS (Identity a) readList :: ReadS [Identity a] readPrec :: ReadPrec (Identity a) readListPrec :: ReadPrec [Identity a]
Fractional a => Fractional (Identity a) |
Instance details Defined in Data.Functor.Identity Methods (/) :: Identity a -> Identity a -> Identity a recip :: Identity a -> Identity a fromRational :: Rational -> Identity a
Integral a => Integral (Identity a) |

Instance details

Defined in Data.Functor.Identity

Methods

quot :: Identity a -> Identity a -> Identity a

rem :: Identity a -> Identity a -> Identity a

div :: Identity a -> Identity a -> Identity a

mod :: Identity a -> Identity a -> Identity a

quotRem :: Identity a -> Identity a -> (Identity a, Identity a)

divMod :: Identity a -> Identity a -> (Identity a, Identity a)

toInteger :: Identity a -> Integer

Real a => Real (Identity a) |
Instance details Defined in Data.Functor.Identity Methods toRational :: Identity a -> Rational
RealFrac a => RealFrac (Identity a) |
Instance details Defined in Data.Functor.Identity Methods properFraction :: Integral b => Identity a -> (b, Identity a) truncate :: Integral b => Identity a -> b round :: Integral b => Identity a -> b ceiling :: Integral b => Identity a -> b floor :: Integral b => Identity a -> b
Show a => Show (Identity a) |
Instance details Defined in Data.Functor.Identity Methods showsPrec :: Int -> Identity a -> ShowS # show :: Identity a -> String # showList :: [Identity a] -> ShowS #
Eq a => Eq (Identity a) |
Instance details Defined in Data.Functor.Identity Methods (==) :: Identity a -> Identity a -> Bool # (/=) :: Identity a -> Identity a -> Bool #
Ord a => Ord (Identity a) |
Instance details Defined in Data.Functor.Identity Methods compare :: Identity a -> Identity a -> Ordering # (<) :: Identity a -> Identity a -> Bool # (<=) :: Identity a -> Identity a -> Bool # (>) :: Identity a -> Identity a -> Bool # (>=) :: Identity a -> Identity a -> Bool # max :: Identity a -> Identity a -> Identity a # min :: Identity a -> Identity a -> Identity a #
type Rep1 Identity |
Instance details Defined in Data.Functor.Identity type Rep1 Identity = D1 ('MetaData "Identity" "Data.Functor.Identity" "base" 'True) (C1 ('MetaCons "Identity" 'PrefixI 'True) (S1 ('MetaSel ('Just "runIdentity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
type Rep (Identity a) |
Instance details Defined in Data.Functor.Identity type Rep (Identity a) = D1 ('MetaData "Identity" "Data.Functor.Identity" "base" 'True) (C1 ('MetaCons "Identity" 'PrefixI 'True) (S1 ('MetaSel ('Just "runIdentity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))