Movatterモバイル変換


[0]ホーム

URL:


base-4.12.0.0: Basic libraries

Copyright(c) The University of Glasgow 2001
LicenseBSD-style (see the file libraries/base/LICENSE)
Maintainerlibraries@haskell.org
Stabilityexperimental
Portabilityportable
Safe HaskellTrustworthy
LanguageHaskell2010

Data.Int

Contents

Description

Signed integer types

Synopsis

Signed integer types

dataInt#

A fixed-precision integer type with at least the range[-2^29 .. 2^29-1]. The exact range for a given implementation can be determined by usingminBound andmaxBound from theBounded class.

Instances
BoundedIntSource#

Since: 2.1

Instance details

Defined inGHC.Enum

EnumIntSource#

Since: 2.1

Instance details

Defined inGHC.Enum

EqInt 
Instance details

Defined inGHC.Classes

Methods

(==) ::Int ->Int ->Bool#

(/=) ::Int ->Int ->Bool#

IntegralIntSource#

Since: 2.0.1

Instance details

Defined inGHC.Real

DataIntSource#

Since: 4.0.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) ->Int -> cIntSource#

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

toConstr ::Int ->ConstrSource#

dataTypeOf ::Int ->DataTypeSource#

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

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

gmapT :: (forall b.Data b => b -> b) ->Int ->IntSource#

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

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

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

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

gmapM ::Monad m => (forall d.Data d => d -> m d) ->Int -> mIntSource#

gmapMp ::MonadPlus m => (forall d.Data d => d -> m d) ->Int -> mIntSource#

gmapMo ::MonadPlus m => (forall d.Data d => d -> m d) ->Int -> mIntSource#

NumIntSource#

Since: 2.1

Instance details

Defined inGHC.Num

OrdInt 
Instance details

Defined inGHC.Classes

ReadIntSource#

Since: 2.1

Instance details

Defined inGHC.Read

RealIntSource#

Since: 2.0.1

Instance details

Defined inGHC.Real

ShowIntSource#

Since: 2.1

Instance details

Defined inGHC.Show

IxIntSource#

Since: 2.1

Instance details

Defined inGHC.Arr

FiniteBitsIntSource#

Since: 4.6.0.0

Instance details

Defined inData.Bits

BitsIntSource#

Since: 2.1

Instance details

Defined inData.Bits

StorableIntSource#

Since: 2.1

Instance details

Defined inForeign.Storable

PrintfArgIntSource#

Since: 2.1

Instance details

Defined inText.Printf

Generic1 (URecInt :: k ->Type)Source# 
Instance details

Defined inGHC.Generics

Associated Types

typeRep1 (URecInt) :: k ->TypeSource#

Functor (URecInt ::Type ->Type)Source#

Since: 4.9.0.0

Instance details

Defined inGHC.Generics

Methods

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

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

Foldable (URecInt ::Type ->Type)Source#

Since: 4.9.0.0

Instance details

Defined inData.Foldable

Methods

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

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

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

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

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

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

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

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

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

null ::URecInt a ->BoolSource#

length ::URecInt a ->IntSource#

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

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

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

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

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

Traversable (URecInt ::Type ->Type)Source#

Since: 4.9.0.0

Instance details

Defined inData.Traversable

Methods

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

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

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

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

Eq (URecInt p)Source#

Since: 4.9.0.0

Instance details

Defined inGHC.Generics

Methods

(==) ::URecInt p ->URecInt p ->Bool#

(/=) ::URecInt p ->URecInt p ->Bool#

Ord (URecInt p)Source#

Since: 4.9.0.0

Instance details

Defined inGHC.Generics

Show (URecInt p)Source#

Since: 4.9.0.0

Instance details

Defined inGHC.Generics

Generic (URecInt p)Source# 
Instance details

Defined inGHC.Generics

Associated Types

typeRep (URecInt p) ::Type ->TypeSource#

Methods

from ::URecInt p ->Rep (URecInt p) xSource#

to ::Rep (URecInt p) x ->URecInt pSource#

dataURecInt (p :: k)Source#

Used for marking occurrences ofInt#

Since: 4.9.0.0

Instance details

Defined inGHC.Generics

dataURecInt (p :: k) =UInt {}
typeRep1 (URecInt :: k ->Type)Source#

Since: 4.9.0.0

Instance details

Defined inGHC.Generics

typeRep1 (URecInt :: k ->Type) =D1 (MetaData "URec" "GHC.Generics" "base"False) (C1 (MetaCons "UInt"PrefixITrue) (S1 (MetaSel (Just "uInt#")NoSourceUnpackednessNoSourceStrictnessDecidedLazy) (UInt :: k ->Type)))
typeRep (URecInt p)Source#

Since: 4.9.0.0

Instance details

Defined inGHC.Generics

typeRep (URecInt p) =D1 (MetaData "URec" "GHC.Generics" "base"False) (C1 (MetaCons "UInt"PrefixITrue) (S1 (MetaSel (Just "uInt#")NoSourceUnpackednessNoSourceStrictnessDecidedLazy) (UInt ::Type ->Type)))

dataInt8Source#

8-bit signed integer type

Instances
BoundedInt8Source#

Since: 2.1

Instance details

Defined inGHC.Int

EnumInt8Source#

Since: 2.1

Instance details

Defined inGHC.Int

EqInt8Source#

Since: 2.1

Instance details

Defined inGHC.Int

Methods

(==) ::Int8 ->Int8 ->Bool#

(/=) ::Int8 ->Int8 ->Bool#

IntegralInt8Source#

Since: 2.1

Instance details

Defined inGHC.Int

DataInt8Source#

Since: 4.0.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) ->Int8 -> cInt8Source#

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

toConstr ::Int8 ->ConstrSource#

dataTypeOf ::Int8 ->DataTypeSource#

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

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

gmapT :: (forall b.Data b => b -> b) ->Int8 ->Int8Source#

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

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

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

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

gmapM ::Monad m => (forall d.Data d => d -> m d) ->Int8 -> mInt8Source#

gmapMp ::MonadPlus m => (forall d.Data d => d -> m d) ->Int8 -> mInt8Source#

gmapMo ::MonadPlus m => (forall d.Data d => d -> m d) ->Int8 -> mInt8Source#

NumInt8Source#

Since: 2.1

Instance details

Defined inGHC.Int

OrdInt8Source#

Since: 2.1

Instance details

Defined inGHC.Int

ReadInt8Source#

Since: 2.1

Instance details

Defined inGHC.Int

RealInt8Source#

Since: 2.1

Instance details

Defined inGHC.Int

ShowInt8Source#

Since: 2.1

Instance details

Defined inGHC.Int

IxInt8Source#

Since: 2.1

Instance details

Defined inGHC.Int

FiniteBitsInt8Source#

Since: 4.6.0.0

Instance details

Defined inGHC.Int

BitsInt8Source#

Since: 2.1

Instance details

Defined inGHC.Int

StorableInt8Source#

Since: 2.1

Instance details

Defined inForeign.Storable

PrintfArgInt8Source#

Since: 2.1

Instance details

Defined inText.Printf

dataInt16Source#

16-bit signed integer type

Instances
BoundedInt16Source#

Since: 2.1

Instance details

Defined inGHC.Int

EnumInt16Source#

Since: 2.1

Instance details

Defined inGHC.Int

EqInt16Source#

Since: 2.1

Instance details

Defined inGHC.Int

IntegralInt16Source#

Since: 2.1

Instance details

Defined inGHC.Int

DataInt16Source#

Since: 4.0.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) ->Int16 -> cInt16Source#

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

toConstr ::Int16 ->ConstrSource#

dataTypeOf ::Int16 ->DataTypeSource#

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

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

gmapT :: (forall b.Data b => b -> b) ->Int16 ->Int16Source#

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

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

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

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

gmapM ::Monad m => (forall d.Data d => d -> m d) ->Int16 -> mInt16Source#

gmapMp ::MonadPlus m => (forall d.Data d => d -> m d) ->Int16 -> mInt16Source#

gmapMo ::MonadPlus m => (forall d.Data d => d -> m d) ->Int16 -> mInt16Source#

NumInt16Source#

Since: 2.1

Instance details

Defined inGHC.Int

OrdInt16Source#

Since: 2.1

Instance details

Defined inGHC.Int

ReadInt16Source#

Since: 2.1

Instance details

Defined inGHC.Int

RealInt16Source#

Since: 2.1

Instance details

Defined inGHC.Int

ShowInt16Source#

Since: 2.1

Instance details

Defined inGHC.Int

IxInt16Source#

Since: 2.1

Instance details

Defined inGHC.Int

FiniteBitsInt16Source#

Since: 4.6.0.0

Instance details

Defined inGHC.Int

BitsInt16Source#

Since: 2.1

Instance details

Defined inGHC.Int

StorableInt16Source#

Since: 2.1

Instance details

Defined inForeign.Storable

PrintfArgInt16Source#

Since: 2.1

Instance details

Defined inText.Printf

dataInt32Source#

32-bit signed integer type

Instances
BoundedInt32Source#

Since: 2.1

Instance details

Defined inGHC.Int

EnumInt32Source#

Since: 2.1

Instance details

Defined inGHC.Int

EqInt32Source#

Since: 2.1

Instance details

Defined inGHC.Int

IntegralInt32Source#

Since: 2.1

Instance details

Defined inGHC.Int

DataInt32Source#

Since: 4.0.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) ->Int32 -> cInt32Source#

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

toConstr ::Int32 ->ConstrSource#

dataTypeOf ::Int32 ->DataTypeSource#

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

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

gmapT :: (forall b.Data b => b -> b) ->Int32 ->Int32Source#

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

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

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

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

gmapM ::Monad m => (forall d.Data d => d -> m d) ->Int32 -> mInt32Source#

gmapMp ::MonadPlus m => (forall d.Data d => d -> m d) ->Int32 -> mInt32Source#

gmapMo ::MonadPlus m => (forall d.Data d => d -> m d) ->Int32 -> mInt32Source#

NumInt32Source#

Since: 2.1

Instance details

Defined inGHC.Int

OrdInt32Source#

Since: 2.1

Instance details

Defined inGHC.Int

ReadInt32Source#

Since: 2.1

Instance details

Defined inGHC.Int

RealInt32Source#

Since: 2.1

Instance details

Defined inGHC.Int

ShowInt32Source#

Since: 2.1

Instance details

Defined inGHC.Int

IxInt32Source#

Since: 2.1

Instance details

Defined inGHC.Int

FiniteBitsInt32Source#

Since: 4.6.0.0

Instance details

Defined inGHC.Int

BitsInt32Source#

Since: 2.1

Instance details

Defined inGHC.Int

StorableInt32Source#

Since: 2.1

Instance details

Defined inForeign.Storable

PrintfArgInt32Source#

Since: 2.1

Instance details

Defined inText.Printf

dataInt64Source#

64-bit signed integer type

Instances
BoundedInt64Source#

Since: 2.1

Instance details

Defined inGHC.Int

EnumInt64Source#

Since: 2.1

Instance details

Defined inGHC.Int

EqInt64Source#

Since: 2.1

Instance details

Defined inGHC.Int

IntegralInt64Source#

Since: 2.1

Instance details

Defined inGHC.Int

DataInt64Source#

Since: 4.0.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) ->Int64 -> cInt64Source#

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

toConstr ::Int64 ->ConstrSource#

dataTypeOf ::Int64 ->DataTypeSource#

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

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

gmapT :: (forall b.Data b => b -> b) ->Int64 ->Int64Source#

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

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

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

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

gmapM ::Monad m => (forall d.Data d => d -> m d) ->Int64 -> mInt64Source#

gmapMp ::MonadPlus m => (forall d.Data d => d -> m d) ->Int64 -> mInt64Source#

gmapMo ::MonadPlus m => (forall d.Data d => d -> m d) ->Int64 -> mInt64Source#

NumInt64Source#

Since: 2.1

Instance details

Defined inGHC.Int

OrdInt64Source#

Since: 2.1

Instance details

Defined inGHC.Int

ReadInt64Source#

Since: 2.1

Instance details

Defined inGHC.Int

RealInt64Source#

Since: 2.1

Instance details

Defined inGHC.Int

ShowInt64Source#

Since: 2.1

Instance details

Defined inGHC.Int

IxInt64Source#

Since: 2.1

Instance details

Defined inGHC.Int

FiniteBitsInt64Source#

Since: 4.6.0.0

Instance details

Defined inGHC.Int

BitsInt64Source#

Since: 2.1

Instance details

Defined inGHC.Int

StorableInt64Source#

Since: 2.1

Instance details

Defined inForeign.Storable

PrintfArgInt64Source#

Since: 2.1

Instance details

Defined inText.Printf

Notes

  • All arithmetic is performed modulo 2^n, wheren is the number of bits in the type.
  • For coercing between any two integer types, usefromIntegral, which is specialized for all the common cases so should be fast enough. Coercing word types (seeData.Word) to and from integer types preserves representation, not sign.
  • The rules that hold forEnum instances over a bounded type such asInt (see the section of the Haskell report dealing with arithmetic sequences) also hold for theEnum instances over the variousInt types defined here.
  • Right and left shifts by amounts greater than or equal to the width of the type result in either zero or -1, depending on the sign of the value being shifted. This is contrary to the behaviour in C, which is undefined; a common interpretation is to truncate the shift count to the width of the type, for example1 << 32 == 1 in some C implementations.

Produced byHaddock version 2.20.0


[8]ページ先頭

©2009-2025 Movatter.jp