| Copyright | (c) The University of Glasgow 2001 |
|---|---|
| License | BSD-style (see the file libraries/base/LICENSE) |
| Maintainer | libraries@haskell.org |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | Trustworthy |
| Language | Haskell2010 |
Data.Int
Contents
Description
Signed integer types
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.
| BoundedIntSource# | Since: 2.1 |
| EnumIntSource# | Since: 2.1 |
| EqInt | |
| IntegralIntSource# | Since: 2.0.1 |
| DataIntSource# | Since: 4.0.0.0 |
Instance detailsDefined 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 |
| OrdInt | |
| ReadIntSource# | Since: 2.1 |
| RealIntSource# | Since: 2.0.1 |
| ShowIntSource# | Since: 2.1 |
| IxIntSource# | Since: 2.1 |
| FiniteBitsIntSource# | Since: 4.6.0.0 |
| BitsIntSource# | Since: 2.1 |
Instance detailsDefined inData.Bits Methods (.&.) ::Int ->Int ->IntSource# (.|.) ::Int ->Int ->IntSource# complement ::Int ->IntSource# shift ::Int ->Int ->IntSource# rotate ::Int ->Int ->IntSource# setBit ::Int ->Int ->IntSource# clearBit ::Int ->Int ->IntSource# complementBit ::Int ->Int ->IntSource# testBit ::Int ->Int ->BoolSource# bitSizeMaybe ::Int ->MaybeIntSource# shiftL ::Int ->Int ->IntSource# unsafeShiftL ::Int ->Int ->IntSource# shiftR ::Int ->Int ->IntSource# unsafeShiftR ::Int ->Int ->IntSource# rotateL ::Int ->Int ->IntSource# | |
| StorableIntSource# | Since: 2.1 |
Instance detailsDefined inForeign.Storable | |
| PrintfArgIntSource# | Since: 2.1 |
Instance detailsDefined inText.Printf | |
| Generic1 (URecInt :: k ->Type)Source# | |
| Functor (URecInt ::Type ->Type)Source# | Since: 4.9.0.0 |
| Foldable (URecInt ::Type ->Type)Source# | Since: 4.9.0.0 |
Instance detailsDefined 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# | |
| Traversable (URecInt ::Type ->Type)Source# | Since: 4.9.0.0 |
Instance detailsDefined inData.Traversable | |
| Eq (URecInt p)Source# | Since: 4.9.0.0 |
| Ord (URecInt p)Source# | Since: 4.9.0.0 |
Instance detailsDefined inGHC.Generics | |
| Show (URecInt p)Source# | Since: 4.9.0.0 |
| Generic (URecInt p)Source# | |
| dataURecInt (p :: k)Source# | Used for marking occurrences of Since: 4.9.0.0 |
| typeRep1 (URecInt :: k ->Type)Source# | Since: 4.9.0.0 |
Instance detailsDefined inGHC.Generics | |
| typeRep (URecInt p)Source# | Since: 4.9.0.0 |
Instance detailsDefined inGHC.Generics | |
8-bit signed integer type
16-bit signed integer type
32-bit signed integer type
64-bit signed integer type
n is the number of bits in the type.fromIntegral, 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.Enum 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.1 << 32 == 1 in some C implementations.Produced byHaddock version 2.20.0