Movatterモバイル変換


[0]ホーム

URL:


base-4.12.0.0: Basic libraries

Copyright(c) Andy Gill 2001
(c) Oregon Graduate Institute of Science and Technology 2001
LicenseBSD-style (see the file LICENSE)
Maintainerross@soi.city.ac.uk
Stabilityexperimental
Portabilityportable
Safe HaskellTrustworthy
LanguageHaskell2010

Data.Functor.Identity

Description

The identity functor and monad.

This trivial type constructor serves two purposes:

  • It can be used with functions parameterized by functor or monad classes.
  • It can be used as a base monad to which a series of monad transformers may be applied to construct a composite monad. Most monad transformer modules include the special case of applying the transformer toIdentity. For example,State s is an abbreviation forStateT sIdentity.

Since: 4.8.0.0

Synopsis

Documentation

newtypeIdentity aSource#

Identity functor and monad. (a non-strict monad)

Since: 4.8.0.0

Constructors

Identity 

Fields

Instances
MonadIdentitySource#

Since: 4.8.0.0

Instance details

Defined inData.Functor.Identity

FunctorIdentitySource#

Since: 4.8.0.0

Instance details

Defined inData.Functor.Identity

Methods

fmap :: (a -> b) ->Identity a ->Identity bSource#

(<$) :: a ->Identity b ->Identity aSource#

MonadFixIdentitySource#

Since: 4.8.0.0

Instance details

Defined inData.Functor.Identity

Methods

mfix :: (a ->Identity a) ->Identity aSource#

ApplicativeIdentitySource#

Since: 4.8.0.0

Instance details

Defined inData.Functor.Identity

FoldableIdentitySource#

Since: 4.8.0.0

Instance details

Defined inData.Functor.Identity

Methods

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

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

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

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

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

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

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

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

toList ::Identity a -> [a]Source#

null ::Identity a ->BoolSource#

length ::Identity a ->IntSource#

elem ::Eq a => a ->Identity a ->BoolSource#

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

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

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

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

TraversableIdentitySource#

Since: 4.9.0.0

Instance details

Defined inData.Traversable

Methods

traverse ::Applicative f => (a -> f b) ->Identity a -> f (Identity b)Source#

sequenceA ::Applicative f =>Identity (f a) -> f (Identity a)Source#

mapM ::Monad m => (a -> m b) ->Identity a -> m (Identity b)Source#

sequence ::Monad m =>Identity (m a) -> m (Identity a)Source#

MonadZipIdentitySource#

Since: 4.8.0.0

Instance details

Defined inControl.Monad.Zip

Methods

mzip ::Identity a ->Identity b ->Identity (a, b)Source#

mzipWith :: (a -> b -> c) ->Identity a ->Identity b ->Identity cSource#

munzip ::Identity (a, b) -> (Identity a,Identity b)Source#

Show1IdentitySource#

Since: 4.9.0.0

Instance details

Defined inData.Functor.Classes

Methods

liftShowsPrec :: (Int -> a ->ShowS) -> ([a] ->ShowS) ->Int ->Identity a ->ShowSSource#

liftShowList :: (Int -> a ->ShowS) -> ([a] ->ShowS) -> [Identity a] ->ShowSSource#

Read1IdentitySource#

Since: 4.9.0.0

Instance details

Defined inData.Functor.Classes

Ord1IdentitySource#

Since: 4.9.0.0

Instance details

Defined inData.Functor.Classes

Methods

liftCompare :: (a -> b ->Ordering) ->Identity a ->Identity b ->OrderingSource#

Eq1IdentitySource#

Since: 4.9.0.0

Instance details

Defined inData.Functor.Classes

Methods

liftEq :: (a -> b ->Bool) ->Identity a ->Identity b ->BoolSource#

Bounded a =>Bounded (Identity a)Source#

Since: 4.9.0.0

Instance details

Defined inData.Functor.Identity

Enum a =>Enum (Identity a)Source#

Since: 4.9.0.0

Instance details

Defined inData.Functor.Identity

Eq a =>Eq (Identity a)Source#

Since: 4.8.0.0

Instance details

Defined inData.Functor.Identity

Floating a =>Floating (Identity a)Source#

Since: 4.9.0.0

Instance details

Defined inData.Functor.Identity

Methods

pi ::Identity aSource#

exp ::Identity a ->Identity aSource#

log ::Identity a ->Identity aSource#

sqrt ::Identity a ->Identity aSource#

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

logBase ::Identity a ->Identity a ->Identity aSource#

sin ::Identity a ->Identity aSource#

cos ::Identity a ->Identity aSource#

tan ::Identity a ->Identity aSource#

asin ::Identity a ->Identity aSource#

acos ::Identity a ->Identity aSource#

atan ::Identity a ->Identity aSource#

sinh ::Identity a ->Identity aSource#

cosh ::Identity a ->Identity aSource#

tanh ::Identity a ->Identity aSource#

asinh ::Identity a ->Identity aSource#

acosh ::Identity a ->Identity aSource#

atanh ::Identity a ->Identity aSource#

log1p ::Identity a ->Identity aSource#

expm1 ::Identity a ->Identity aSource#

log1pexp ::Identity a ->Identity aSource#

log1mexp ::Identity a ->Identity aSource#

Fractional a =>Fractional (Identity a)Source#

Since: 4.9.0.0

Instance details

Defined inData.Functor.Identity

Integral a =>Integral (Identity a)Source#

Since: 4.9.0.0

Instance details

Defined inData.Functor.Identity

Data a =>Data (Identity a)Source#

Since: 4.9.0.0

Instance details

Defined inData.Data

Methods

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

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

toConstr ::Identity a ->ConstrSource#

dataTypeOf ::Identity a ->DataTypeSource#

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

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

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

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

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

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

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

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

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

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

Num a =>Num (Identity a)Source#

Since: 4.9.0.0

Instance details

Defined inData.Functor.Identity

Ord a =>Ord (Identity a)Source#

Since: 4.8.0.0

Instance details

Defined inData.Functor.Identity

Read a =>Read (Identity a)Source#

This instance would be equivalent to the derived instances of theIdentity newtype if therunIdentity field were removed

Since: 4.8.0.0

Instance details

Defined inData.Functor.Identity

Real a =>Real (Identity a)Source#

Since: 4.9.0.0

Instance details

Defined inData.Functor.Identity

RealFloat a =>RealFloat (Identity a)Source#

Since: 4.9.0.0

Instance details

Defined inData.Functor.Identity

RealFrac a =>RealFrac (Identity a)Source#

Since: 4.9.0.0

Instance details

Defined inData.Functor.Identity

Show a =>Show (Identity a)Source#

This instance would be equivalent to the derived instances of theIdentity newtype if therunIdentity field were removed

Since: 4.8.0.0

Instance details

Defined inData.Functor.Identity

Ix a =>Ix (Identity a)Source#

Since: 4.9.0.0

Instance details

Defined inData.Functor.Identity

IsString a =>IsString (Identity a)Source#

Since: 4.9.0.0

Instance details

Defined inData.String

Generic (Identity a)Source# 
Instance details

Defined inData.Functor.Identity

Associated Types

typeRep (Identity a) ::Type ->TypeSource#

Semigroup a =>Semigroup (Identity a)Source#

Since: 4.9.0.0

Instance details

Defined inData.Functor.Identity

Monoid a =>Monoid (Identity a)Source#

Since: 4.9.0.0

Instance details

Defined inData.Functor.Identity

FiniteBits a =>FiniteBits (Identity a)Source#

Since: 4.9.0.0

Instance details

Defined inData.Functor.Identity

Bits a =>Bits (Identity a)Source#

Since: 4.9.0.0

Instance details

Defined inData.Functor.Identity

Methods

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

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

xor ::Identity a ->Identity a ->Identity aSource#

complement ::Identity a ->Identity aSource#

shift ::Identity a ->Int ->Identity aSource#

rotate ::Identity a ->Int ->Identity aSource#

zeroBits ::Identity aSource#

bit ::Int ->Identity aSource#

setBit ::Identity a ->Int ->Identity aSource#

clearBit ::Identity a ->Int ->Identity aSource#

complementBit ::Identity a ->Int ->Identity aSource#

testBit ::Identity a ->Int ->BoolSource#

bitSizeMaybe ::Identity a ->MaybeIntSource#

bitSize ::Identity a ->IntSource#

isSigned ::Identity a ->BoolSource#

shiftL ::Identity a ->Int ->Identity aSource#

unsafeShiftL ::Identity a ->Int ->Identity aSource#

shiftR ::Identity a ->Int ->Identity aSource#

unsafeShiftR ::Identity a ->Int ->Identity aSource#

rotateL ::Identity a ->Int ->Identity aSource#

rotateR ::Identity a ->Int ->Identity aSource#

popCount ::Identity a ->IntSource#

Storable a =>Storable (Identity a)Source#

Since: 4.9.0.0

Instance details

Defined inData.Functor.Identity

Generic1IdentitySource# 
Instance details

Defined inData.Functor.Identity

Associated Types

typeRep1Identity :: k ->TypeSource#

typeRep (Identity a)Source#

Since: 4.8.0.0

Instance details

Defined inData.Functor.Identity

typeRep (Identity a) =D1 (MetaData "Identity" "Data.Functor.Identity" "base"True) (C1 (MetaCons "Identity"PrefixITrue) (S1 (MetaSel (Just "runIdentity")NoSourceUnpackednessNoSourceStrictnessDecidedLazy) (Rec0 a)))
typeRep1IdentitySource#

Since: 4.8.0.0

Instance details

Defined inData.Functor.Identity

typeRep1Identity =D1 (MetaData "Identity" "Data.Functor.Identity" "base"True) (C1 (MetaCons "Identity"PrefixITrue) (S1 (MetaSel (Just "runIdentity")NoSourceUnpackednessNoSourceStrictnessDecidedLazy)Par1))

Produced byHaddock version 2.20.0


[8]ページ先頭

©2009-2025 Movatter.jp