| Copyright | (c) The University of Glasgow 2001 |
|---|---|
| License | BSD-style (see the file libraries/base/LICENSE) |
| Maintainer | libraries@haskell.org |
| Stability | stable |
| Portability | portable |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Data.Word
Description
Unsigned integer types.
Synopsis
- data Word
- data Word8
- data Word16
- data Word32
- data Word64
- byteSwap16 :: Word16 -> Word16
- byteSwap32 :: Word32 -> Word32
- byteSwap64 :: Word64 -> Word64
- bitReverse8 :: Word8 -> Word8
- bitReverse16 :: Word16 -> Word16
- bitReverse32 :: Word32 -> Word32
- bitReverse64 :: Word64 -> Word64
Unsigned integral types
Instances
| PrintfArg Word Source # | Since: base-2.1 |
Defined in Text.Printf | |
| Bits Word Source # | Since: base-2.1 |
Defined in GHC.Internal.Bits Methods (.&.) :: Word -> Word -> Word Source # (.|.) :: Word -> Word -> Word Source # xor :: Word -> Word -> Word Source # complement :: Word -> Word Source # shift :: Word -> Int -> Word Source # rotate :: Word -> Int -> Word Source # setBit :: Word -> Int -> Word Source # clearBit :: Word -> Int -> Word Source # complementBit :: Word -> Int -> Word Source # testBit :: Word -> Int -> Bool Source # bitSizeMaybe :: Word -> Maybe Int Source # bitSize :: Word -> Int Source # isSigned :: Word -> Bool Source # shiftL :: Word -> Int -> Word Source # unsafeShiftL :: Word -> Int -> Word Source # shiftR :: Word -> Int -> Word Source # unsafeShiftR :: Word -> Int -> Word Source # rotateL :: Word -> Int -> Word Source # | |
| FiniteBits Word Source # | Since: base-4.6.0.0 |
Defined in GHC.Internal.Bits Methods finiteBitSize :: Word -> Int Source # countLeadingZeros :: Word -> Int Source # countTrailingZeros :: Word -> Int Source # | |
| Eq Word Source # | |
| Ord Word Source # | |
Defined in GHC.Internal.Classes | |
| Data Word Source # | Since: base-4.0.0.0 |
Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word -> c Word Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word Source # toConstr :: Word -> Constr Source # dataTypeOf :: Word -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word) Source # gmapT :: (forall b. Data b => b -> b) -> Word -> Word Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Word -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Word -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word -> m Word Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word -> m Word Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word -> m Word Source # | |
| Bounded Word Source # | Since: base-2.1 |
| Enum Word Source # | Since: base-2.1 |
| Storable Word Source # | Since: base-2.1 |
Defined in GHC.Internal.Foreign.Storable Methods sizeOf :: Word -> Int Source # alignment :: Word -> Int Source # peekElemOff :: Ptr Word -> Int -> IO Word Source # pokeElemOff :: Ptr Word -> Int -> Word -> IO () Source # peekByteOff :: Ptr b -> Int -> IO Word Source # pokeByteOff :: Ptr b -> Int -> Word -> IO () Source # | |
| Ix Word Source # | Since: base-4.6.0.0 |
Defined in GHC.Internal.Ix | |
| Num Word Source # | Since: base-2.1 |
| Read Word Source # | Since: base-4.5.0.0 |
| Integral Word Source # | Since: base-2.1 |
Defined in GHC.Internal.Real | |
| Real Word Source # | Since: base-2.1 |
Defined in GHC.Internal.Real Methods toRational :: Word -> Rational Source # | |
| Show Word Source # | Since: base-2.1 |
| Lift Word Source # | |
| Generic1 (URec Word :: k -> Type) Source # | |
| Eq1 (UWord :: Type -> Type) Source # | Since: base-4.21.0.0 |
| Ord1 (UWord :: Type -> Type) Source # | Since: base-4.21.0.0 |
Defined in Data.Functor.Classes | |
| Show1 (UWord :: Type -> Type) Source # | Since: base-4.21.0.0 |
| Foldable (UWord :: Type -> Type) Source # | Since: base-4.9.0.0 |
Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => UWord m -> m Source # foldMap :: Monoid m => (a -> m) -> UWord a -> m Source # foldMap' :: Monoid m => (a -> m) -> UWord a -> m Source # foldr :: (a -> b -> b) -> b -> UWord a -> b Source # foldr' :: (a -> b -> b) -> b -> UWord a -> b Source # foldl :: (b -> a -> b) -> b -> UWord a -> b Source # foldl' :: (b -> a -> b) -> b -> UWord a -> b Source # foldr1 :: (a -> a -> a) -> UWord a -> a Source # foldl1 :: (a -> a -> a) -> UWord a -> a Source # toList :: UWord a -> [a] Source # null :: UWord a -> Bool Source # length :: UWord a -> Int Source # elem :: Eq a => a -> UWord a -> Bool Source # maximum :: Ord a => UWord a -> a Source # minimum :: Ord a => UWord a -> a Source # | |
| Traversable (UWord :: Type -> Type) Source # | Since: base-4.9.0.0 |
Defined in GHC.Internal.Data.Traversable | |
| Functor (URec Word :: Type -> Type) Source # | Since: base-4.9.0.0 |
| Eq (URec Word p) Source # | Since: base-4.9.0.0 |
| Ord (URec Word p) Source # | Since: base-4.9.0.0 |
Defined in GHC.Internal.Generics Methods compare :: URec Word p -> URec Word p -> Ordering Source # (<) :: URec Word p -> URec Word p -> Bool Source # (<=) :: URec Word p -> URec Word p -> Bool Source # (>) :: URec Word p -> URec Word p -> Bool Source # (>=) :: URec Word p -> URec Word p -> Bool Source # | |
| Generic (URec Word p) Source # | |
| Show (URec Word p) Source # | Since: base-4.9.0.0 |
| data URec Word (p :: k) Source # | Used for marking occurrences of Since: base-4.9.0.0 |
| type Rep1 (URec Word :: k -> Type) Source # | Since: base-4.9.0.0 |
| type Rep (URec Word p) Source # | Since: base-4.9.0.0 |
8-bit unsigned integer type
Instances
| PrintfArg Word8 Source # | Since: base-2.1 |
Defined in Text.Printf | |
| Bits Word8 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word Methods (.&.) :: Word8 -> Word8 -> Word8 Source # (.|.) :: Word8 -> Word8 -> Word8 Source # xor :: Word8 -> Word8 -> Word8 Source # complement :: Word8 -> Word8 Source # shift :: Word8 -> Int -> Word8 Source # rotate :: Word8 -> Int -> Word8 Source # setBit :: Word8 -> Int -> Word8 Source # clearBit :: Word8 -> Int -> Word8 Source # complementBit :: Word8 -> Int -> Word8 Source # testBit :: Word8 -> Int -> Bool Source # bitSizeMaybe :: Word8 -> Maybe Int Source # bitSize :: Word8 -> Int Source # isSigned :: Word8 -> Bool Source # shiftL :: Word8 -> Int -> Word8 Source # unsafeShiftL :: Word8 -> Int -> Word8 Source # shiftR :: Word8 -> Int -> Word8 Source # unsafeShiftR :: Word8 -> Int -> Word8 Source # rotateL :: Word8 -> Int -> Word8 Source # | |
| FiniteBits Word8 Source # | Since: base-4.6.0.0 |
Defined in GHC.Internal.Word Methods finiteBitSize :: Word8 -> Int Source # countLeadingZeros :: Word8 -> Int Source # countTrailingZeros :: Word8 -> Int Source # | |
| Eq Word8 Source # | Since: base-2.1 |
| Ord Word8 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word | |
| Data Word8 Source # | Since: base-4.0.0.0 |
Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word8 -> c Word8 Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word8 Source # toConstr :: Word8 -> Constr Source # dataTypeOf :: Word8 -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word8) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word8) Source # gmapT :: (forall b. Data b => b -> b) -> Word8 -> Word8 Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word8 -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word8 -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Word8 -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Word8 -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word8 -> m Word8 Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word8 -> m Word8 Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word8 -> m Word8 Source # | |
| Bounded Word8 Source # | Since: base-2.1 |
| Enum Word8 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word Methods succ :: Word8 -> Word8 Source # pred :: Word8 -> Word8 Source # toEnum :: Int -> Word8 Source # fromEnum :: Word8 -> Int Source # enumFrom :: Word8 -> [Word8] Source # enumFromThen :: Word8 -> Word8 -> [Word8] Source # enumFromTo :: Word8 -> Word8 -> [Word8] Source # enumFromThenTo :: Word8 -> Word8 -> Word8 -> [Word8] Source # | |
| Storable Word8 Source # | Since: base-2.1 |
Defined in GHC.Internal.Foreign.Storable Methods sizeOf :: Word8 -> Int Source # alignment :: Word8 -> Int Source # peekElemOff :: Ptr Word8 -> Int -> IO Word8 Source # pokeElemOff :: Ptr Word8 -> Int -> Word8 -> IO () Source # peekByteOff :: Ptr b -> Int -> IO Word8 Source # pokeByteOff :: Ptr b -> Int -> Word8 -> IO () Source # | |
| Ix Word8 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word | |
| Num Word8 Source # | Since: base-2.1 |
| Read Word8 Source # | Since: base-2.1 |
| Integral Word8 Source # | Since: base-2.1 |
| Real Word8 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word Methods toRational :: Word8 -> Rational Source # | |
| Show Word8 Source # | Since: base-2.1 |
| Lift Word8 Source # | |
16-bit unsigned integer type
Instances
| PrintfArg Word16 Source # | Since: base-2.1 |
Defined in Text.Printf Methods formatArg :: Word16 -> FieldFormatter Source # parseFormat :: Word16 -> ModifierParser Source # | |
| Bits Word16 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word Methods (.&.) :: Word16 -> Word16 -> Word16 Source # (.|.) :: Word16 -> Word16 -> Word16 Source # xor :: Word16 -> Word16 -> Word16 Source # complement :: Word16 -> Word16 Source # shift :: Word16 -> Int -> Word16 Source # rotate :: Word16 -> Int -> Word16 Source # setBit :: Word16 -> Int -> Word16 Source # clearBit :: Word16 -> Int -> Word16 Source # complementBit :: Word16 -> Int -> Word16 Source # testBit :: Word16 -> Int -> Bool Source # bitSizeMaybe :: Word16 -> Maybe Int Source # bitSize :: Word16 -> Int Source # isSigned :: Word16 -> Bool Source # shiftL :: Word16 -> Int -> Word16 Source # unsafeShiftL :: Word16 -> Int -> Word16 Source # shiftR :: Word16 -> Int -> Word16 Source # unsafeShiftR :: Word16 -> Int -> Word16 Source # rotateL :: Word16 -> Int -> Word16 Source # | |
| FiniteBits Word16 Source # | Since: base-4.6.0.0 |
Defined in GHC.Internal.Word Methods finiteBitSize :: Word16 -> Int Source # countLeadingZeros :: Word16 -> Int Source # countTrailingZeros :: Word16 -> Int Source # | |
| Eq Word16 Source # | Since: base-2.1 |
| Ord Word16 Source # | Since: base-2.1 |
| Data Word16 Source # | Since: base-4.0.0.0 |
Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word16 -> c Word16 Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word16 Source # toConstr :: Word16 -> Constr Source # dataTypeOf :: Word16 -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word16) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word16) Source # gmapT :: (forall b. Data b => b -> b) -> Word16 -> Word16 Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word16 -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word16 -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Word16 -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Word16 -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word16 -> m Word16 Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word16 -> m Word16 Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word16 -> m Word16 Source # | |
| Bounded Word16 Source # | Since: base-2.1 |
| Enum Word16 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word Methods succ :: Word16 -> Word16 Source # pred :: Word16 -> Word16 Source # toEnum :: Int -> Word16 Source # fromEnum :: Word16 -> Int Source # enumFrom :: Word16 -> [Word16] Source # enumFromThen :: Word16 -> Word16 -> [Word16] Source # enumFromTo :: Word16 -> Word16 -> [Word16] Source # enumFromThenTo :: Word16 -> Word16 -> Word16 -> [Word16] Source # | |
| Storable Word16 Source # | Since: base-2.1 |
Defined in GHC.Internal.Foreign.Storable Methods sizeOf :: Word16 -> Int Source # alignment :: Word16 -> Int Source # peekElemOff :: Ptr Word16 -> Int -> IO Word16 Source # pokeElemOff :: Ptr Word16 -> Int -> Word16 -> IO () Source # peekByteOff :: Ptr b -> Int -> IO Word16 Source # pokeByteOff :: Ptr b -> Int -> Word16 -> IO () Source # | |
| Ix Word16 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word Methods range :: (Word16, Word16) -> [Word16] Source # index :: (Word16, Word16) -> Word16 -> Int Source # unsafeIndex :: (Word16, Word16) -> Word16 -> Int Source # inRange :: (Word16, Word16) -> Word16 -> Bool Source # rangeSize :: (Word16, Word16) -> Int Source # unsafeRangeSize :: (Word16, Word16) -> Int Source # | |
| Num Word16 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word | |
| Read Word16 Source # | Since: base-2.1 |
| Integral Word16 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word | |
| Real Word16 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word Methods toRational :: Word16 -> Rational Source # | |
| Show Word16 Source # | Since: base-2.1 |
| Lift Word16 Source # | |
32-bit unsigned integer type
Instances
| PrintfArg Word32 Source # | Since: base-2.1 |
Defined in Text.Printf Methods formatArg :: Word32 -> FieldFormatter Source # parseFormat :: Word32 -> ModifierParser Source # | |
| Bits Word32 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word Methods (.&.) :: Word32 -> Word32 -> Word32 Source # (.|.) :: Word32 -> Word32 -> Word32 Source # xor :: Word32 -> Word32 -> Word32 Source # complement :: Word32 -> Word32 Source # shift :: Word32 -> Int -> Word32 Source # rotate :: Word32 -> Int -> Word32 Source # setBit :: Word32 -> Int -> Word32 Source # clearBit :: Word32 -> Int -> Word32 Source # complementBit :: Word32 -> Int -> Word32 Source # testBit :: Word32 -> Int -> Bool Source # bitSizeMaybe :: Word32 -> Maybe Int Source # bitSize :: Word32 -> Int Source # isSigned :: Word32 -> Bool Source # shiftL :: Word32 -> Int -> Word32 Source # unsafeShiftL :: Word32 -> Int -> Word32 Source # shiftR :: Word32 -> Int -> Word32 Source # unsafeShiftR :: Word32 -> Int -> Word32 Source # rotateL :: Word32 -> Int -> Word32 Source # | |
| FiniteBits Word32 Source # | Since: base-4.6.0.0 |
Defined in GHC.Internal.Word Methods finiteBitSize :: Word32 -> Int Source # countLeadingZeros :: Word32 -> Int Source # countTrailingZeros :: Word32 -> Int Source # | |
| Eq Word32 Source # | Since: base-2.1 |
| Ord Word32 Source # | Since: base-2.1 |
| Data Word32 Source # | Since: base-4.0.0.0 |
Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word32 -> c Word32 Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word32 Source # toConstr :: Word32 -> Constr Source # dataTypeOf :: Word32 -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word32) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word32) Source # gmapT :: (forall b. Data b => b -> b) -> Word32 -> Word32 Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word32 -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word32 -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Word32 -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Word32 -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word32 -> m Word32 Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word32 -> m Word32 Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word32 -> m Word32 Source # | |
| Bounded Word32 Source # | Since: base-2.1 |
| Enum Word32 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word Methods succ :: Word32 -> Word32 Source # pred :: Word32 -> Word32 Source # toEnum :: Int -> Word32 Source # fromEnum :: Word32 -> Int Source # enumFrom :: Word32 -> [Word32] Source # enumFromThen :: Word32 -> Word32 -> [Word32] Source # enumFromTo :: Word32 -> Word32 -> [Word32] Source # enumFromThenTo :: Word32 -> Word32 -> Word32 -> [Word32] Source # | |
| Storable Word32 Source # | Since: base-2.1 |
Defined in GHC.Internal.Foreign.Storable Methods sizeOf :: Word32 -> Int Source # alignment :: Word32 -> Int Source # peekElemOff :: Ptr Word32 -> Int -> IO Word32 Source # pokeElemOff :: Ptr Word32 -> Int -> Word32 -> IO () Source # peekByteOff :: Ptr b -> Int -> IO Word32 Source # pokeByteOff :: Ptr b -> Int -> Word32 -> IO () Source # | |
| Ix Word32 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word Methods range :: (Word32, Word32) -> [Word32] Source # index :: (Word32, Word32) -> Word32 -> Int Source # unsafeIndex :: (Word32, Word32) -> Word32 -> Int Source # inRange :: (Word32, Word32) -> Word32 -> Bool Source # rangeSize :: (Word32, Word32) -> Int Source # unsafeRangeSize :: (Word32, Word32) -> Int Source # | |
| Num Word32 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word | |
| Read Word32 Source # | Since: base-2.1 |
| Integral Word32 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word | |
| Real Word32 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word Methods toRational :: Word32 -> Rational Source # | |
| Show Word32 Source # | Since: base-2.1 |
| Lift Word32 Source # | |
64-bit unsigned integer type
Instances
| PrintfArg Word64 Source # | Since: base-2.1 |
Defined in Text.Printf Methods formatArg :: Word64 -> FieldFormatter Source # parseFormat :: Word64 -> ModifierParser Source # | |
| Bits Word64 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word Methods (.&.) :: Word64 -> Word64 -> Word64 Source # (.|.) :: Word64 -> Word64 -> Word64 Source # xor :: Word64 -> Word64 -> Word64 Source # complement :: Word64 -> Word64 Source # shift :: Word64 -> Int -> Word64 Source # rotate :: Word64 -> Int -> Word64 Source # setBit :: Word64 -> Int -> Word64 Source # clearBit :: Word64 -> Int -> Word64 Source # complementBit :: Word64 -> Int -> Word64 Source # testBit :: Word64 -> Int -> Bool Source # bitSizeMaybe :: Word64 -> Maybe Int Source # bitSize :: Word64 -> Int Source # isSigned :: Word64 -> Bool Source # shiftL :: Word64 -> Int -> Word64 Source # unsafeShiftL :: Word64 -> Int -> Word64 Source # shiftR :: Word64 -> Int -> Word64 Source # unsafeShiftR :: Word64 -> Int -> Word64 Source # rotateL :: Word64 -> Int -> Word64 Source # | |
| FiniteBits Word64 Source # | Since: base-4.6.0.0 |
Defined in GHC.Internal.Word Methods finiteBitSize :: Word64 -> Int Source # countLeadingZeros :: Word64 -> Int Source # countTrailingZeros :: Word64 -> Int Source # | |
| Eq Word64 Source # | Since: base-2.1 |
| Ord Word64 Source # | Since: base-2.1 |
| Data Word64 Source # | Since: base-4.0.0.0 |
Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word64 -> c Word64 Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word64 Source # toConstr :: Word64 -> Constr Source # dataTypeOf :: Word64 -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word64) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word64) Source # gmapT :: (forall b. Data b => b -> b) -> Word64 -> Word64 Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word64 -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word64 -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Word64 -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Word64 -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word64 -> m Word64 Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word64 -> m Word64 Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word64 -> m Word64 Source # | |
| Bounded Word64 Source # | Since: base-2.1 |
| Enum Word64 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word Methods succ :: Word64 -> Word64 Source # pred :: Word64 -> Word64 Source # toEnum :: Int -> Word64 Source # fromEnum :: Word64 -> Int Source # enumFrom :: Word64 -> [Word64] Source # enumFromThen :: Word64 -> Word64 -> [Word64] Source # enumFromTo :: Word64 -> Word64 -> [Word64] Source # enumFromThenTo :: Word64 -> Word64 -> Word64 -> [Word64] Source # | |
| Storable Word64 Source # | Since: base-2.1 |
Defined in GHC.Internal.Foreign.Storable Methods sizeOf :: Word64 -> Int Source # alignment :: Word64 -> Int Source # peekElemOff :: Ptr Word64 -> Int -> IO Word64 Source # pokeElemOff :: Ptr Word64 -> Int -> Word64 -> IO () Source # peekByteOff :: Ptr b -> Int -> IO Word64 Source # pokeByteOff :: Ptr b -> Int -> Word64 -> IO () Source # | |
| Ix Word64 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word Methods range :: (Word64, Word64) -> [Word64] Source # index :: (Word64, Word64) -> Word64 -> Int Source # unsafeIndex :: (Word64, Word64) -> Word64 -> Int Source # inRange :: (Word64, Word64) -> Word64 -> Bool Source # rangeSize :: (Word64, Word64) -> Int Source # unsafeRangeSize :: (Word64, Word64) -> Int Source # | |
| Num Word64 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word | |
| Read Word64 Source # | Since: base-2.1 |
| Integral Word64 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word | |
| Real Word64 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word Methods toRational :: Word64 -> Rational Source # | |
| Show Word64 Source # | Since: base-2.1 |
| Lift Word64 Source # | |
byte swapping
byteSwap16 :: Word16 -> Word16 Source #
Reverse order of bytes in Word16.
Since: base-4.7.0.0
byteSwap32 :: Word32 -> Word32 Source #
Reverse order of bytes in Word32.
Since: base-4.7.0.0
byteSwap64 :: Word64 -> Word64 Source #
Reverse order of bytes in Word64.
Since: base-4.7.0.0
bit reversal
bitReverse8 :: Word8 -> Word8 Source #
Reverse the order of the bits in a Word8.
Since: base-4.14.0.0
bitReverse16 :: Word16 -> Word16 Source #
Reverse the order of the bits in a Word16.
Since: base-4.14.0.0
bitReverse32 :: Word32 -> Word32 Source #
Reverse the order of the bits in a Word32.
Since: base-4.14.0.0
bitReverse64 :: Word64 -> Word64 Source #
Reverse the order of the bits in a Word64.
Since: base-4.14.0.0
Notes
- All arithmetic is performed modulo 2^n, where n is the number of
bits in the type. One non-obvious consequence of this is that
negateshould not raise an error on negative arguments. - For coercing between any two integer types, use
fromIntegral, which is specialized for all the common cases so should be fast enough. Coercing word types to and from integer types preserves representation, not sign. - An unbounded size unsigned integer type is available with
Natural. - The rules that hold for
Enuminstances over a bounded type such asInt(see the section of the Haskell report dealing with arithmetic sequences) also hold for theEnuminstances over the variousWordtypes defined here. - Right and left shifts by amounts greater than or equal to the width
of the type result in a zero result. 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 example
1 << 32 == 1in some C implementations.