Safe Haskell | None |
---|---|
Language | Haskell2010 |
Unsigned and signed words
Synopsis
- type family WordAtLeast (n :: Nat) where ...
- type family IntAtLeast (n :: Nat) where ...
- type family WordN (n :: Nat) where ...
- type family IntN (n :: Nat) where ...
- newtype CSize = CSize Word64
- data CUShort
- data CShort
- data CUInt
- data CInt
- data CULong
- data CLong
- module GHC.Word
- module GHC.Int
- data Word# :: TYPE WordRep
- data Int# :: TYPE IntRep
- plusWord# :: Word# -> Word# -> Word#
- minusWord# :: Word# -> Word# -> Word#
- (+#) :: Int# -> Int# -> Int#
- (-#) :: Int# -> Int# -> Int#
- (==#) :: Int# -> Int# -> Int#
- (>#) :: Int# -> Int# -> Int#
- (<#) :: Int# -> Int# -> Int#
- (>=#) :: Int# -> Int# -> Int#
- (<=#) :: Int# -> Int# -> Int#
- ltWord# :: Word# -> Word# -> Int#
- leWord# :: Word# -> Word# -> Int#
- gtWord# :: Word# -> Word# -> Int#
- geWord# :: Word# -> Word# -> Int#
- eqWord# :: Word# -> Word# -> Int#
- isTrue# :: Int# -> Bool
Documentation
type family WordAtLeast (n :: Nat) where ... Source #
Return a Word with at least n
bits
type family IntAtLeast (n :: Nat) where ... Source #
Return a Int with at least n
bits
Some C types
Haskell type representing the C size_t
type.
Instances
Bounded CSize | |
Enum CSize | |
Eq CSize | |
Integral CSize | |
Num CSize | |
Ord CSize | |
Read CSize | |
Real CSize | |
Defined in Foreign.C.Types toRational :: CSize -> Rational # | |
Show CSize | |
Storable CSize | |
Bits CSize | |
Defined in Foreign.C.Types (.&.) :: CSize -> CSize -> CSize # (.|.) :: CSize -> CSize -> CSize # xor :: CSize -> CSize -> CSize # complement :: CSize -> CSize # shift :: CSize -> Int -> CSize # rotate :: CSize -> Int -> CSize # setBit :: CSize -> Int -> CSize # clearBit :: CSize -> Int -> CSize # complementBit :: CSize -> Int -> CSize # testBit :: CSize -> Int -> Bool # bitSizeMaybe :: CSize -> Maybe Int # shiftL :: CSize -> Int -> CSize # unsafeShiftL :: CSize -> Int -> CSize # shiftR :: CSize -> Int -> CSize # unsafeShiftR :: CSize -> Int -> CSize # rotateL :: CSize -> Int -> CSize # | |
FiniteBits CSize | |
Defined in Foreign.C.Types finiteBitSize :: CSize -> Int # countLeadingZeros :: CSize -> Int # countTrailingZeros :: CSize -> Int # | |
Storable CSize Source # | |
Haskell type representing the C unsigned short
type.
Instances
Haskell type representing the C short
type.
Instances
Haskell type representing the C unsigned int
type.
Instances
Bounded CUInt | |
Enum CUInt | |
Eq CUInt | |
Integral CUInt | |
Num CUInt | |
Ord CUInt | |
Read CUInt | |
Real CUInt | |
Defined in Foreign.C.Types toRational :: CUInt -> Rational # | |
Show CUInt | |
Storable CUInt | |
Bits CUInt | |
Defined in Foreign.C.Types (.&.) :: CUInt -> CUInt -> CUInt # (.|.) :: CUInt -> CUInt -> CUInt # xor :: CUInt -> CUInt -> CUInt # complement :: CUInt -> CUInt # shift :: CUInt -> Int -> CUInt # rotate :: CUInt -> Int -> CUInt # setBit :: CUInt -> Int -> CUInt # clearBit :: CUInt -> Int -> CUInt # complementBit :: CUInt -> Int -> CUInt # testBit :: CUInt -> Int -> Bool # bitSizeMaybe :: CUInt -> Maybe Int # shiftL :: CUInt -> Int -> CUInt # unsafeShiftL :: CUInt -> Int -> CUInt # shiftR :: CUInt -> Int -> CUInt # unsafeShiftR :: CUInt -> Int -> CUInt # rotateL :: CUInt -> Int -> CUInt # | |
FiniteBits CUInt | |
Defined in Foreign.C.Types finiteBitSize :: CUInt -> Int # countLeadingZeros :: CUInt -> Int # countTrailingZeros :: CUInt -> Int # | |
Storable CUInt Source # | |
Haskell type representing the C int
type.
Instances
Bounded CInt | |
Enum CInt | |
Eq CInt | |
Integral CInt | |
Num CInt | |
Ord CInt | |
Read CInt | |
Real CInt | |
Defined in Foreign.C.Types toRational :: CInt -> Rational # | |
Show CInt | |
Storable CInt | |
Defined in Foreign.C.Types | |
Bits CInt | |
Defined in Foreign.C.Types (.&.) :: CInt -> CInt -> CInt # (.|.) :: CInt -> CInt -> CInt # complement :: CInt -> CInt # shift :: CInt -> Int -> CInt # rotate :: CInt -> Int -> CInt # setBit :: CInt -> Int -> CInt # clearBit :: CInt -> Int -> CInt # complementBit :: CInt -> Int -> CInt # testBit :: CInt -> Int -> Bool # bitSizeMaybe :: CInt -> Maybe Int # shiftL :: CInt -> Int -> CInt # unsafeShiftL :: CInt -> Int -> CInt # shiftR :: CInt -> Int -> CInt # unsafeShiftR :: CInt -> Int -> CInt # rotateL :: CInt -> Int -> CInt # | |
FiniteBits CInt | |
Defined in Foreign.C.Types | |
Storable CInt Source # | |
Haskell type representing the C unsigned long
type.
Instances
Haskell type representing the C long
type.
Instances
Bounded CLong | |
Enum CLong | |
Eq CLong | |
Integral CLong | |
Num CLong | |
Ord CLong | |
Read CLong | |
Real CLong | |
Defined in Foreign.C.Types toRational :: CLong -> Rational # | |
Show CLong | |
Storable CLong | |
Bits CLong | |
Defined in Foreign.C.Types (.&.) :: CLong -> CLong -> CLong # (.|.) :: CLong -> CLong -> CLong # xor :: CLong -> CLong -> CLong # complement :: CLong -> CLong # shift :: CLong -> Int -> CLong # rotate :: CLong -> Int -> CLong # setBit :: CLong -> Int -> CLong # clearBit :: CLong -> Int -> CLong # complementBit :: CLong -> Int -> CLong # testBit :: CLong -> Int -> Bool # bitSizeMaybe :: CLong -> Maybe Int # shiftL :: CLong -> Int -> CLong # unsafeShiftL :: CLong -> Int -> CLong # shiftR :: CLong -> Int -> CLong # unsafeShiftR :: CLong -> Int -> CLong # rotateL :: CLong -> Int -> CLong # | |
FiniteBits CLong | |
Defined in Foreign.C.Types finiteBitSize :: CLong -> Int # countLeadingZeros :: CLong -> Int # countTrailingZeros :: CLong -> Int # | |
Storable CLong Source # | |
Unlifted
module GHC.Word
module GHC.Int
minusWord# :: Word# -> Word# -> Word# #
Alias for tagToEnum#
. Returns True if its parameter is 1# and False
if it is 0#.