base-4.19.2.0: Core data structures and operations
Copyright(c) The FFI task force 2001
LicenseBSD-style (see the file libraries/base/LICENSE)
Maintainerffi@haskell.org
Stabilityprovisional
Portabilityportable
Safe HaskellTrustworthy
LanguageHaskell2010

Foreign.C.Types

Description

Mapping of C types to corresponding Haskell types.

Synopsis

Representations of C types

These types are needed to accurately represent C function prototypes, in order to access C library interfaces in Haskell. The Haskell system is not required to represent those types exactly as C does, but the following guarantees are provided concerning a Haskell type CT representing a C type t:

  • If a C function prototype has t as an argument or result type, the use of CT in the corresponding position in a foreign declaration permits the Haskell program to access the full range of values encoded by the C type; and conversely, any Haskell value for CT has a valid representation in C.
  • sizeOf (undefined :: CT) will yield the same value as sizeof (t) in C.
  • alignment (undefined :: CT) matches the alignment constraint enforced by the C implementation for t.
  • The members peek and poke of the Storable class map all values of CT to the corresponding value of t and vice versa.
  • When an instance of Bounded is defined for CT, the values of minBound and maxBound coincide with t_MIN and t_MAX in C.
  • When an instance of Eq or Ord is defined for CT, the predicates defined by the type class implement the same relation as the corresponding predicate in C on t.
  • When an instance of Num, Read, Integral, Fractional, Floating, RealFrac, or RealFloat is defined for CT, the arithmetic operations defined by the type class implement the same function as the corresponding arithmetic operations (if available) in C on t.
  • When an instance of Bits is defined for CT, the bitwise operation defined by the type class implement the same function as the corresponding bitwise operation in C on t.

Platform differences

This module contains platform specific information about types. As such, the types presented on this page reflect the platform on which the documentation was generated and may not coincide with the types on your platform.

Integral types

These types are represented as newtypes of types in Data.Int and Data.Word, and are instances of Eq, Ord, Num, Read, Show, Enum, Typeable, Storable, Bounded, Real, Integral and Bits.

newtype CChar Source #

Haskell type representing the C char type. (The concrete types of Foreign.C.Types are platform-specific.)

Constructors

CChar Int8 

Instances

Instances details
Storable CChar Source # 
Instance details

Defined in Foreign.C.Types

Bits CChar Source # 
Instance details

Defined in Foreign.C.Types

FiniteBits CChar Source # 
Instance details

Defined in Foreign.C.Types

Bounded CChar Source # 
Instance details

Defined in Foreign.C.Types

Enum CChar Source # 
Instance details

Defined in Foreign.C.Types

Ix CChar Source # 
Instance details

Defined in Foreign.C.Types

Num CChar Source # 
Instance details

Defined in Foreign.C.Types

Read CChar Source # 
Instance details

Defined in Foreign.C.Types

Integral CChar Source # 
Instance details

Defined in Foreign.C.Types

Real CChar Source # 
Instance details

Defined in Foreign.C.Types

Show CChar Source # 
Instance details

Defined in Foreign.C.Types

Eq CChar Source # 
Instance details

Defined in Foreign.C.Types

Methods

(==) :: CChar -> CChar -> Bool Source #

(/=) :: CChar -> CChar -> Bool Source #

Ord CChar Source # 
Instance details

Defined in Foreign.C.Types

newtype CSChar Source #

Haskell type representing the C signed char type. (The concrete types of Foreign.C.Types are platform-specific.)

Constructors

CSChar Int8 

Instances

Instances details
Storable CSChar Source # 
Instance details

Defined in Foreign.C.Types

Bits CSChar Source # 
Instance details

Defined in Foreign.C.Types

FiniteBits CSChar Source # 
Instance details

Defined in Foreign.C.Types

Bounded CSChar Source # 
Instance details

Defined in Foreign.C.Types

Enum CSChar Source # 
Instance details

Defined in Foreign.C.Types

Ix CSChar Source # 
Instance details

Defined in Foreign.C.Types

Num CSChar Source # 
Instance details

Defined in Foreign.C.Types

Read CSChar Source # 
Instance details

Defined in Foreign.C.Types

Integral CSChar Source # 
Instance details

Defined in Foreign.C.Types

Real CSChar Source # 
Instance details

Defined in Foreign.C.Types

Show CSChar Source # 
Instance details

Defined in Foreign.C.Types

Eq CSChar Source # 
Instance details

Defined in Foreign.C.Types

Ord CSChar Source # 
Instance details

Defined in Foreign.C.Types

newtype CUChar Source #

Haskell type representing the C unsigned char type. (The concrete types of Foreign.C.Types are platform-specific.)

Constructors

CUChar Word8 

Instances

Instances details
Storable CUChar Source # 
Instance details

Defined in Foreign.C.Types

Bits CUChar Source # 
Instance details

Defined in Foreign.C.Types

FiniteBits CUChar Source # 
Instance details

Defined in Foreign.C.Types

Bounded CUChar Source # 
Instance details

Defined in Foreign.C.Types

Enum CUChar Source # 
Instance details

Defined in Foreign.C.Types

Ix CUChar Source # 
Instance details

Defined in Foreign.C.Types

Num CUChar Source # 
Instance details

Defined in Foreign.C.Types

Read CUChar Source # 
Instance details

Defined in Foreign.C.Types

Integral CUChar Source # 
Instance details

Defined in Foreign.C.Types

Real CUChar Source # 
Instance details

Defined in Foreign.C.Types

Show CUChar Source # 
Instance details

Defined in Foreign.C.Types

Eq CUChar Source # 
Instance details

Defined in Foreign.C.Types

Ord CUChar Source # 
Instance details

Defined in Foreign.C.Types

newtype CShort Source #

Haskell type representing the C short type. (The concrete types of Foreign.C.Types are platform-specific.)

Constructors

CShort Int16 

Instances

Instances details
Storable CShort Source # 
Instance details

Defined in Foreign.C.Types

Bits CShort Source # 
Instance details

Defined in Foreign.C.Types

FiniteBits CShort Source # 
Instance details

Defined in Foreign.C.Types

Bounded CShort Source # 
Instance details

Defined in Foreign.C.Types

Enum CShort Source # 
Instance details

Defined in Foreign.C.Types

Ix CShort Source # 
Instance details

Defined in Foreign.C.Types

Num CShort Source # 
Instance details

Defined in Foreign.C.Types

Read CShort Source # 
Instance details

Defined in Foreign.C.Types

Integral CShort Source # 
Instance details

Defined in Foreign.C.Types

Real CShort Source # 
Instance details

Defined in Foreign.C.Types

Show CShort Source # 
Instance details

Defined in Foreign.C.Types

Eq CShort Source # 
Instance details

Defined in Foreign.C.Types

Ord CShort Source # 
Instance details

Defined in Foreign.C.Types

newtype CUShort Source #

Haskell type representing the C unsigned short type. (The concrete types of Foreign.C.Types are platform-specific.)

Constructors

CUShort Word16 

Instances

Instances details
Storable CUShort Source # 
Instance details

Defined in Foreign.C.Types

Bits CUShort Source # 
Instance details

Defined in Foreign.C.Types

FiniteBits CUShort Source # 
Instance details

Defined in Foreign.C.Types

Bounded CUShort Source # 
Instance details

Defined in Foreign.C.Types

Enum CUShort Source # 
Instance details

Defined in Foreign.C.Types

Ix CUShort Source # 
Instance details

Defined in Foreign.C.Types

Num CUShort Source # 
Instance details

Defined in Foreign.C.Types

Read CUShort Source # 
Instance details

Defined in Foreign.C.Types

Integral CUShort Source # 
Instance details

Defined in Foreign.C.Types

Real CUShort Source # 
Instance details

Defined in Foreign.C.Types

Show CUShort Source # 
Instance details

Defined in Foreign.C.Types

Eq CUShort Source # 
Instance details

Defined in Foreign.C.Types

Ord CUShort Source # 
Instance details

Defined in Foreign.C.Types

newtype CInt Source #

Haskell type representing the C int type. (The concrete types of Foreign.C.Types are platform-specific.)

Constructors

CInt Int32 

Instances

Instances details
Storable CInt Source # 
Instance details

Defined in Foreign.C.Types

Bits CInt Source # 
Instance details

Defined in Foreign.C.Types

FiniteBits CInt Source # 
Instance details

Defined in Foreign.C.Types

Bounded CInt Source # 
Instance details

Defined in Foreign.C.Types

Enum CInt Source # 
Instance details

Defined in Foreign.C.Types

Ix CInt Source # 
Instance details

Defined in Foreign.C.Types

Num CInt Source # 
Instance details

Defined in Foreign.C.Types

Read CInt Source # 
Instance details

Defined in Foreign.C.Types

Integral CInt Source # 
Instance details

Defined in Foreign.C.Types

Real CInt Source # 
Instance details

Defined in Foreign.C.Types

Show CInt Source # 
Instance details

Defined in Foreign.C.Types

Eq CInt Source # 
Instance details

Defined in Foreign.C.Types

Methods

(==) :: CInt -> CInt -> Bool Source #

(/=) :: CInt -> CInt -> Bool Source #

Ord CInt Source # 
Instance details

Defined in Foreign.C.Types

newtype CUInt Source #

Haskell type representing the C unsigned int type. (The concrete types of Foreign.C.Types are platform-specific.)

Constructors

CUInt Word32 

Instances

Instances details
Storable CUInt Source # 
Instance details

Defined in Foreign.C.Types

Bits CUInt Source # 
Instance details

Defined in Foreign.C.Types

FiniteBits CUInt Source # 
Instance details

Defined in Foreign.C.Types

Bounded CUInt Source # 
Instance details

Defined in Foreign.C.Types

Enum CUInt Source # 
Instance details

Defined in Foreign.C.Types

Ix CUInt Source # 
Instance details

Defined in Foreign.C.Types

Num CUInt Source # 
Instance details

Defined in Foreign.C.Types

Read CUInt Source # 
Instance details

Defined in Foreign.C.Types

Integral CUInt Source # 
Instance details

Defined in Foreign.C.Types

Real CUInt Source # 
Instance details

Defined in Foreign.C.Types

Show CUInt Source # 
Instance details

Defined in Foreign.C.Types

Eq CUInt Source # 
Instance details

Defined in Foreign.C.Types

Methods

(==) :: CUInt -> CUInt -> Bool Source #

(/=) :: CUInt -> CUInt -> Bool Source #

Ord CUInt Source # 
Instance details

Defined in Foreign.C.Types

newtype CLong Source #

Haskell type representing the C long type. (The concrete types of Foreign.C.Types are platform-specific.)

Constructors

CLong Int64 

Instances

Instances details
Storable CLong Source # 
Instance details

Defined in Foreign.C.Types

Bits CLong Source # 
Instance details

Defined in Foreign.C.Types

FiniteBits CLong Source # 
Instance details

Defined in Foreign.C.Types

Bounded CLong Source # 
Instance details

Defined in Foreign.C.Types

Enum CLong Source # 
Instance details

Defined in Foreign.C.Types

Ix CLong Source # 
Instance details

Defined in Foreign.C.Types

Num CLong Source # 
Instance details

Defined in Foreign.C.Types

Read CLong Source # 
Instance details

Defined in Foreign.C.Types

Integral CLong Source # 
Instance details

Defined in Foreign.C.Types

Real CLong Source # 
Instance details

Defined in Foreign.C.Types

Show CLong Source # 
Instance details

Defined in Foreign.C.Types

Eq CLong Source # 
Instance details

Defined in Foreign.C.Types

Methods

(==) :: CLong -> CLong -> Bool Source #

(/=) :: CLong -> CLong -> Bool Source #

Ord CLong Source # 
Instance details

Defined in Foreign.C.Types

newtype CULong Source #

Haskell type representing the C unsigned long type. (The concrete types of Foreign.C.Types are platform-specific.)

Constructors

CULong Word64 

Instances

Instances details
Storable CULong Source # 
Instance details

Defined in Foreign.C.Types

Bits CULong Source # 
Instance details

Defined in Foreign.C.Types

FiniteBits CULong Source # 
Instance details

Defined in Foreign.C.Types

Bounded CULong Source # 
Instance details

Defined in Foreign.C.Types

Enum CULong Source # 
Instance details

Defined in Foreign.C.Types

Ix CULong Source # 
Instance details

Defined in Foreign.C.Types

Num CULong Source # 
Instance details

Defined in Foreign.C.Types

Read CULong Source # 
Instance details

Defined in Foreign.C.Types

Integral CULong Source # 
Instance details

Defined in Foreign.C.Types

Real CULong Source # 
Instance details

Defined in Foreign.C.Types

Show CULong Source # 
Instance details

Defined in Foreign.C.Types

Eq CULong Source # 
Instance details

Defined in Foreign.C.Types

Ord CULong Source # 
Instance details

Defined in Foreign.C.Types

newtype CPtrdiff Source #

Haskell type representing the C ptrdiff_t type. (The concrete types of Foreign.C.Types are platform-specific.)

Constructors

CPtrdiff Int64 

Instances

Instances details
Storable CPtrdiff Source # 
Instance details

Defined in Foreign.C.Types

Bits CPtrdiff Source # 
Instance details

Defined in Foreign.C.Types

FiniteBits CPtrdiff Source # 
Instance details

Defined in Foreign.C.Types

Bounded CPtrdiff Source # 
Instance details

Defined in Foreign.C.Types

Enum CPtrdiff Source # 
Instance details

Defined in Foreign.C.Types

Ix CPtrdiff Source # 
Instance details

Defined in Foreign.C.Types

Num CPtrdiff Source # 
Instance details

Defined in Foreign.C.Types

Read CPtrdiff Source # 
Instance details

Defined in Foreign.C.Types

Integral CPtrdiff Source # 
Instance details

Defined in Foreign.C.Types

Real CPtrdiff Source # 
Instance details

Defined in Foreign.C.Types

Show CPtrdiff Source # 
Instance details

Defined in Foreign.C.Types

Eq CPtrdiff Source # 
Instance details

Defined in Foreign.C.Types

Ord CPtrdiff Source # 
Instance details

Defined in Foreign.C.Types

newtype CSize Source #

Haskell type representing the C size_t type. (The concrete types of Foreign.C.Types are platform-specific.)

Constructors

CSize Word64 

Instances

Instances details
Storable CSize Source # 
Instance details

Defined in Foreign.C.Types

Bits CSize Source # 
Instance details

Defined in Foreign.C.Types

FiniteBits CSize Source # 
Instance details

Defined in Foreign.C.Types

Bounded CSize Source # 
Instance details

Defined in Foreign.C.Types

Enum CSize Source # 
Instance details

Defined in Foreign.C.Types

Ix CSize Source # 
Instance details

Defined in Foreign.C.Types

Num CSize Source # 
Instance details

Defined in Foreign.C.Types

Read CSize Source # 
Instance details

Defined in Foreign.C.Types

Integral CSize Source # 
Instance details

Defined in Foreign.C.Types

Real CSize Source # 
Instance details

Defined in Foreign.C.Types

Show CSize Source # 
Instance details

Defined in Foreign.C.Types

Eq CSize Source # 
Instance details

Defined in Foreign.C.Types

Methods

(==) :: CSize -> CSize -> Bool Source #

(/=) :: CSize -> CSize -> Bool Source #

Ord CSize Source # 
Instance details

Defined in Foreign.C.Types

newtype CWchar Source #

Haskell type representing the C wchar_t type. (The concrete types of Foreign.C.Types are platform-specific.)

Constructors

CWchar Int32 

Instances

Instances details
Storable CWchar Source # 
Instance details

Defined in Foreign.C.Types

Bits CWchar Source # 
Instance details

Defined in Foreign.C.Types

FiniteBits CWchar Source # 
Instance details

Defined in Foreign.C.Types

Bounded CWchar Source # 
Instance details

Defined in Foreign.C.Types

Enum CWchar Source # 
Instance details

Defined in Foreign.C.Types

Ix CWchar Source # 
Instance details

Defined in Foreign.C.Types

Num CWchar Source # 
Instance details

Defined in Foreign.C.Types

Read CWchar Source # 
Instance details

Defined in Foreign.C.Types

Integral CWchar Source # 
Instance details

Defined in Foreign.C.Types

Real CWchar Source # 
Instance details

Defined in Foreign.C.Types

Show CWchar Source # 
Instance details

Defined in Foreign.C.Types

Eq CWchar Source # 
Instance details

Defined in Foreign.C.Types

Ord CWchar Source # 
Instance details

Defined in Foreign.C.Types

newtype CSigAtomic Source #

Haskell type representing the C sig_atomic_t type. (The concrete types of Foreign.C.Types are platform-specific.) See Note [Lack of signals on wasm32-wasi].

Constructors

CSigAtomic Int32 

Instances

Instances details
Storable CSigAtomic Source # 
Instance details

Defined in Foreign.C.Types

Bits CSigAtomic Source # 
Instance details

Defined in Foreign.C.Types

FiniteBits CSigAtomic Source # 
Instance details

Defined in Foreign.C.Types

Bounded CSigAtomic Source # 
Instance details

Defined in Foreign.C.Types

Enum CSigAtomic Source # 
Instance details

Defined in Foreign.C.Types

Ix CSigAtomic Source # 
Instance details

Defined in Foreign.C.Types

Num CSigAtomic Source # 
Instance details

Defined in Foreign.C.Types

Read CSigAtomic Source # 
Instance details

Defined in Foreign.C.Types

Integral CSigAtomic Source # 
Instance details

Defined in Foreign.C.Types

Real CSigAtomic Source # 
Instance details

Defined in Foreign.C.Types

Show CSigAtomic Source # 
Instance details

Defined in Foreign.C.Types

Eq CSigAtomic Source # 
Instance details

Defined in Foreign.C.Types

Ord CSigAtomic Source # 
Instance details

Defined in Foreign.C.Types

newtype CLLong Source #

Haskell type representing the C long long type. (The concrete types of Foreign.C.Types are platform-specific.)

Constructors

CLLong Int64 

Instances

Instances details
Storable CLLong Source # 
Instance details

Defined in Foreign.C.Types

Bits CLLong Source # 
Instance details

Defined in Foreign.C.Types

FiniteBits CLLong Source # 
Instance details

Defined in Foreign.C.Types

Bounded CLLong Source # 
Instance details

Defined in Foreign.C.Types

Enum CLLong Source # 
Instance details

Defined in Foreign.C.Types

Ix CLLong Source # 
Instance details

Defined in Foreign.C.Types

Num CLLong Source # 
Instance details

Defined in Foreign.C.Types

Read CLLong Source # 
Instance details

Defined in Foreign.C.Types

Integral CLLong Source # 
Instance details

Defined in Foreign.C.Types

Real CLLong Source # 
Instance details

Defined in Foreign.C.Types

Show CLLong Source # 
Instance details

Defined in Foreign.C.Types

Eq CLLong Source # 
Instance details

Defined in Foreign.C.Types

Ord CLLong Source # 
Instance details

Defined in Foreign.C.Types

newtype CULLong Source #

Haskell type representing the C unsigned long long type. (The concrete types of Foreign.C.Types are platform-specific.)

Constructors

CULLong Word64 

Instances

Instances details
Storable CULLong Source # 
Instance details

Defined in Foreign.C.Types

Bits CULLong Source # 
Instance details

Defined in Foreign.C.Types

FiniteBits CULLong Source # 
Instance details

Defined in Foreign.C.Types

Bounded CULLong Source # 
Instance details

Defined in Foreign.C.Types

Enum CULLong Source # 
Instance details

Defined in Foreign.C.Types

Ix CULLong Source # 
Instance details

Defined in Foreign.C.Types

Num CULLong Source # 
Instance details

Defined in Foreign.C.Types

Read CULLong Source # 
Instance details

Defined in Foreign.C.Types

Integral CULLong Source # 
Instance details

Defined in Foreign.C.Types

Real CULLong Source # 
Instance details

Defined in Foreign.C.Types

Show CULLong Source # 
Instance details

Defined in Foreign.C.Types

Eq CULLong Source # 
Instance details

Defined in Foreign.C.Types

Ord CULLong Source # 
Instance details

Defined in Foreign.C.Types

newtype CBool Source #

Haskell type representing the C bool type. (The concrete types of Foreign.C.Types are platform-specific.)

Since: base-4.10.0.0

Constructors

CBool Word8 

Instances

Instances details
Storable CBool Source # 
Instance details

Defined in Foreign.C.Types

Bits CBool Source # 
Instance details

Defined in Foreign.C.Types

FiniteBits CBool Source # 
Instance details

Defined in Foreign.C.Types

Bounded CBool Source # 
Instance details

Defined in Foreign.C.Types

Enum CBool Source # 
Instance details

Defined in Foreign.C.Types

Ix CBool Source # 
Instance details

Defined in Foreign.C.Types

Num CBool Source # 
Instance details

Defined in Foreign.C.Types

Read CBool Source # 
Instance details

Defined in Foreign.C.Types

Integral CBool Source # 
Instance details

Defined in Foreign.C.Types

Real CBool Source # 
Instance details

Defined in Foreign.C.Types

Show CBool Source # 
Instance details

Defined in Foreign.C.Types

Eq CBool Source # 
Instance details

Defined in Foreign.C.Types

Methods

(==) :: CBool -> CBool -> Bool Source #

(/=) :: CBool -> CBool -> Bool Source #

Ord CBool Source # 
Instance details

Defined in Foreign.C.Types

newtype CIntPtr Source #

Constructors

CIntPtr Int64 

Instances

Instances details
Storable CIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Bits CIntPtr Source # 
Instance details

Defined in Foreign.C.Types

FiniteBits CIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Bounded CIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Enum CIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Ix CIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Num CIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Read CIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Integral CIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Real CIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Show CIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Eq CIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Ord CIntPtr Source # 
Instance details

Defined in Foreign.C.Types

newtype CUIntPtr Source #

Constructors

CUIntPtr Word64 

Instances

Instances details
Storable CUIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Bits CUIntPtr Source # 
Instance details

Defined in Foreign.C.Types

FiniteBits CUIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Bounded CUIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Enum CUIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Ix CUIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Num CUIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Read CUIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Integral CUIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Real CUIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Show CUIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Eq CUIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Ord CUIntPtr Source # 
Instance details

Defined in Foreign.C.Types

newtype CIntMax Source #

Constructors

CIntMax Int64 

Instances

Instances details
Storable CIntMax Source # 
Instance details

Defined in Foreign.C.Types

Bits CIntMax Source # 
Instance details

Defined in Foreign.C.Types

FiniteBits CIntMax Source # 
Instance details

Defined in Foreign.C.Types

Bounded CIntMax Source # 
Instance details

Defined in Foreign.C.Types

Enum CIntMax Source # 
Instance details

Defined in Foreign.C.Types

Ix CIntMax Source # 
Instance details

Defined in Foreign.C.Types

Num CIntMax Source # 
Instance details

Defined in Foreign.C.Types

Read CIntMax Source # 
Instance details

Defined in Foreign.C.Types

Integral CIntMax Source # 
Instance details

Defined in Foreign.C.Types

Real CIntMax Source # 
Instance details

Defined in Foreign.C.Types

Show CIntMax Source # 
Instance details

Defined in Foreign.C.Types

Eq CIntMax Source # 
Instance details

Defined in Foreign.C.Types

Ord CIntMax Source # 
Instance details

Defined in Foreign.C.Types

newtype CUIntMax Source #

Constructors

CUIntMax Word64 

Instances

Instances details
Storable CUIntMax Source # 
Instance details

Defined in Foreign.C.Types

Bits CUIntMax Source # 
Instance details

Defined in Foreign.C.Types

FiniteBits CUIntMax Source # 
Instance details

Defined in Foreign.C.Types

Bounded CUIntMax Source # 
Instance details

Defined in Foreign.C.Types

Enum CUIntMax Source # 
Instance details

Defined in Foreign.C.Types

Ix CUIntMax Source # 
Instance details

Defined in Foreign.C.Types

Num CUIntMax Source # 
Instance details

Defined in Foreign.C.Types

Read CUIntMax Source # 
Instance details

Defined in Foreign.C.Types

Integral CUIntMax Source # 
Instance details

Defined in Foreign.C.Types

Real CUIntMax Source # 
Instance details

Defined in Foreign.C.Types

Show CUIntMax Source # 
Instance details

Defined in Foreign.C.Types

Eq CUIntMax Source # 
Instance details

Defined in Foreign.C.Types

Ord CUIntMax Source # 
Instance details

Defined in Foreign.C.Types

Numeric types

These types are represented as newtypes of basic foreign types, and are instances of Eq, Ord, Num, Read, Show, Enum, Typeable and Storable.

newtype CClock Source #

Haskell type representing the C clock_t type. (The concrete types of Foreign.C.Types are platform-specific.)

Constructors

CClock Int64 

Instances

Instances details
Storable CClock Source # 
Instance details

Defined in Foreign.C.Types

Enum CClock Source # 
Instance details

Defined in Foreign.C.Types

Num CClock Source # 
Instance details

Defined in Foreign.C.Types

Read CClock Source # 
Instance details

Defined in Foreign.C.Types

Real CClock Source # 
Instance details

Defined in Foreign.C.Types

Show CClock Source # 
Instance details

Defined in Foreign.C.Types

Eq CClock Source # 
Instance details

Defined in Foreign.C.Types

Ord CClock Source # 
Instance details

Defined in Foreign.C.Types

newtype CTime Source #

Haskell type representing the C time_t type. (The concrete types of Foreign.C.Types are platform-specific.)

Constructors

CTime Int64 

Instances

Instances details
Storable CTime Source # 
Instance details

Defined in Foreign.C.Types

Enum CTime Source # 
Instance details

Defined in Foreign.C.Types

Num CTime Source # 
Instance details

Defined in Foreign.C.Types

Read CTime Source # 
Instance details

Defined in Foreign.C.Types

Real CTime Source # 
Instance details

Defined in Foreign.C.Types

Show CTime Source # 
Instance details

Defined in Foreign.C.Types

Eq CTime Source # 
Instance details

Defined in Foreign.C.Types

Methods

(==) :: CTime -> CTime -> Bool Source #

(/=) :: CTime -> CTime -> Bool Source #

Ord CTime Source # 
Instance details

Defined in Foreign.C.Types

newtype CUSeconds Source #

Haskell type representing the C useconds_t type. (The concrete types of Foreign.C.Types are platform-specific.)

Since: base-4.4.0.0

Constructors

CUSeconds Word32 

Instances

Instances details
Storable CUSeconds Source # 
Instance details

Defined in Foreign.C.Types

Enum CUSeconds Source # 
Instance details

Defined in Foreign.C.Types

Num CUSeconds Source # 
Instance details

Defined in Foreign.C.Types

Read CUSeconds Source # 
Instance details

Defined in Foreign.C.Types

Real CUSeconds Source # 
Instance details

Defined in Foreign.C.Types

Show CUSeconds Source # 
Instance details

Defined in Foreign.C.Types

Eq CUSeconds Source # 
Instance details

Defined in Foreign.C.Types

Ord CUSeconds Source # 
Instance details

Defined in Foreign.C.Types

newtype CSUSeconds Source #

Haskell type representing the C suseconds_t type. (The concrete types of Foreign.C.Types are platform-specific.)

Since: base-4.4.0.0

Constructors

CSUSeconds Int64 

Instances

Instances details
Storable CSUSeconds Source # 
Instance details

Defined in Foreign.C.Types

Enum CSUSeconds Source # 
Instance details

Defined in Foreign.C.Types

Num CSUSeconds Source # 
Instance details

Defined in Foreign.C.Types

Read CSUSeconds Source # 
Instance details

Defined in Foreign.C.Types

Real CSUSeconds Source # 
Instance details

Defined in Foreign.C.Types

Show CSUSeconds Source # 
Instance details

Defined in Foreign.C.Types

Eq CSUSeconds Source # 
Instance details

Defined in Foreign.C.Types

Ord CSUSeconds Source # 
Instance details

Defined in Foreign.C.Types

To convert CTime to UTCTime, use the following:

\t -> posixSecondsToUTCTime (realToFrac t :: POSIXTime)

Floating types

These types are represented as newtypes of Float and Double, and are instances of Eq, Ord, Num, Read, Show, Enum, Typeable, Storable, Real, Fractional, Floating, RealFrac and RealFloat. That does mean that CFloat's (respectively CDouble's) instances of Eq, Ord, Num and Fractional are as badly behaved as Float's (respectively Double's).

newtype CFloat Source #

Haskell type representing the C float type. (The concrete types of Foreign.C.Types are platform-specific.)

Constructors

CFloat Float 

Instances

Instances details
Storable CFloat Source # 
Instance details

Defined in Foreign.C.Types

Enum CFloat Source # 
Instance details

Defined in Foreign.C.Types

Floating CFloat Source # 
Instance details

Defined in Foreign.C.Types

RealFloat CFloat Source # 
Instance details

Defined in Foreign.C.Types

Num CFloat Source # 
Instance details

Defined in Foreign.C.Types

Read CFloat Source # 
Instance details

Defined in Foreign.C.Types

Fractional CFloat Source # 
Instance details

Defined in Foreign.C.Types

Real CFloat Source # 
Instance details

Defined in Foreign.C.Types

RealFrac CFloat Source # 
Instance details

Defined in Foreign.C.Types

Show CFloat Source # 
Instance details

Defined in Foreign.C.Types

Eq CFloat Source # 
Instance details

Defined in Foreign.C.Types

Ord CFloat Source # 
Instance details

Defined in Foreign.C.Types

newtype CDouble Source #

Haskell type representing the C double type. (The concrete types of Foreign.C.Types are platform-specific.)

Constructors

CDouble Double 

Instances

Instances details
Storable CDouble Source # 
Instance details

Defined in Foreign.C.Types

Enum CDouble Source # 
Instance details

Defined in Foreign.C.Types

Floating CDouble Source # 
Instance details

Defined in Foreign.C.Types

RealFloat CDouble Source # 
Instance details

Defined in Foreign.C.Types

Num CDouble Source # 
Instance details

Defined in Foreign.C.Types

Read CDouble Source # 
Instance details

Defined in Foreign.C.Types

Fractional CDouble Source # 
Instance details

Defined in Foreign.C.Types

Real CDouble Source # 
Instance details

Defined in Foreign.C.Types

RealFrac CDouble Source # 
Instance details

Defined in Foreign.C.Types

Show CDouble Source # 
Instance details

Defined in Foreign.C.Types

Eq CDouble Source # 
Instance details

Defined in Foreign.C.Types

Ord CDouble Source # 
Instance details

Defined in Foreign.C.Types

Other types

data CFile Source #

Haskell type representing the C FILE type. (The concrete types of Foreign.C.Types are platform-specific.)

data CFpos Source #

Haskell type representing the C fpos_t type. (The concrete types of Foreign.C.Types are platform-specific.)

data CJmpBuf Source #

Haskell type representing the C jmp_buf type. (The concrete types of Foreign.C.Types are platform-specific.)