base-4.13.0.0: Basic libraries
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.

Constructors

CChar Int8 

Instances

Instances details
Bounded CChar Source # 
Instance details

Defined in Foreign.C.Types

Enum CChar Source # 
Instance details

Defined in Foreign.C.Types

Eq CChar Source # 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Integral CChar Source # 
Instance details

Defined in Foreign.C.Types

Num CChar Source # 
Instance details

Defined in Foreign.C.Types

Ord CChar Source # 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CChar -> CChar -> Ordering #

(<) :: CChar -> CChar -> Bool #

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

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

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

max :: CChar -> CChar -> CChar #

min :: CChar -> CChar -> CChar #

Read 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

FiniteBits CChar Source # 
Instance details

Defined in Foreign.C.Types

Bits CChar Source # 
Instance details

Defined in Foreign.C.Types

Storable CChar Source # 
Instance details

Defined in Foreign.C.Types

newtype CSChar Source #

Haskell type representing the C signed char type.

Constructors

CSChar Int8 

Instances

Instances details
Bounded CSChar Source # 
Instance details

Defined in Foreign.C.Types

Enum CSChar Source # 
Instance details

Defined in Foreign.C.Types

Eq CSChar Source # 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Integral CSChar Source # 
Instance details

Defined in Foreign.C.Types

Num CSChar Source # 
Instance details

Defined in Foreign.C.Types

Ord CSChar Source # 
Instance details

Defined in Foreign.C.Types

Read 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

FiniteBits CSChar Source # 
Instance details

Defined in Foreign.C.Types

Bits CSChar Source # 
Instance details

Defined in Foreign.C.Types

Storable CSChar Source # 
Instance details

Defined in Foreign.C.Types

newtype CUChar Source #

Haskell type representing the C unsigned char type.

Constructors

CUChar Word8 

Instances

Instances details
Bounded CUChar Source # 
Instance details

Defined in Foreign.C.Types

Enum CUChar Source # 
Instance details

Defined in Foreign.C.Types

Eq CUChar Source # 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Integral CUChar Source # 
Instance details

Defined in Foreign.C.Types

Num CUChar Source # 
Instance details

Defined in Foreign.C.Types

Ord CUChar Source # 
Instance details

Defined in Foreign.C.Types

Read 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

FiniteBits CUChar Source # 
Instance details

Defined in Foreign.C.Types

Bits CUChar Source # 
Instance details

Defined in Foreign.C.Types

Storable CUChar Source # 
Instance details

Defined in Foreign.C.Types

newtype CShort Source #

Haskell type representing the C short type.

Constructors

CShort Int16 

Instances

Instances details
Bounded CShort Source # 
Instance details

Defined in Foreign.C.Types

Enum CShort Source # 
Instance details

Defined in Foreign.C.Types

Eq CShort Source # 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Integral CShort Source # 
Instance details

Defined in Foreign.C.Types

Num CShort Source # 
Instance details

Defined in Foreign.C.Types

Ord CShort Source # 
Instance details

Defined in Foreign.C.Types

Read 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

FiniteBits CShort Source # 
Instance details

Defined in Foreign.C.Types

Bits CShort Source # 
Instance details

Defined in Foreign.C.Types

Storable CShort Source # 
Instance details

Defined in Foreign.C.Types

newtype CUShort Source #

Haskell type representing the C unsigned short type.

Constructors

CUShort Word16 

Instances

Instances details
Bounded CUShort Source # 
Instance details

Defined in Foreign.C.Types

Enum CUShort Source # 
Instance details

Defined in Foreign.C.Types

Eq CUShort Source # 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Integral CUShort Source # 
Instance details

Defined in Foreign.C.Types

Num CUShort Source # 
Instance details

Defined in Foreign.C.Types

Ord CUShort Source # 
Instance details

Defined in Foreign.C.Types

Read 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

FiniteBits CUShort Source # 
Instance details

Defined in Foreign.C.Types

Bits CUShort Source # 
Instance details

Defined in Foreign.C.Types

Storable CUShort Source # 
Instance details

Defined in Foreign.C.Types

newtype CInt Source #

Haskell type representing the C int type.

Constructors

CInt Int32 

Instances

Instances details
Bounded CInt Source # 
Instance details

Defined in Foreign.C.Types

Enum CInt Source # 
Instance details

Defined in Foreign.C.Types

Eq CInt Source # 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Integral CInt Source # 
Instance details

Defined in Foreign.C.Types

Num CInt Source # 
Instance details

Defined in Foreign.C.Types

Ord CInt Source # 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CInt -> CInt -> Ordering #

(<) :: CInt -> CInt -> Bool #

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

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

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

max :: CInt -> CInt -> CInt #

min :: CInt -> CInt -> CInt #

Read 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

FiniteBits CInt Source # 
Instance details

Defined in Foreign.C.Types

Bits CInt Source # 
Instance details

Defined in Foreign.C.Types

Storable CInt Source # 
Instance details

Defined in Foreign.C.Types

newtype CUInt Source #

Haskell type representing the C unsigned int type.

Constructors

CUInt Word32 

Instances

Instances details
Bounded CUInt Source # 
Instance details

Defined in Foreign.C.Types

Enum CUInt Source # 
Instance details

Defined in Foreign.C.Types

Eq CUInt Source # 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Integral CUInt Source # 
Instance details

Defined in Foreign.C.Types

Num CUInt Source # 
Instance details

Defined in Foreign.C.Types

Ord CUInt Source # 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CUInt -> CUInt -> Ordering #

(<) :: CUInt -> CUInt -> Bool #

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

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

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

max :: CUInt -> CUInt -> CUInt #

min :: CUInt -> CUInt -> CUInt #

Read 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

FiniteBits CUInt Source # 
Instance details

Defined in Foreign.C.Types

Bits CUInt Source # 
Instance details

Defined in Foreign.C.Types

Storable CUInt Source # 
Instance details

Defined in Foreign.C.Types

newtype CLong Source #

Haskell type representing the C long type.

Constructors

CLong Int64 

Instances

Instances details
Bounded CLong Source # 
Instance details

Defined in Foreign.C.Types

Enum CLong Source # 
Instance details

Defined in Foreign.C.Types

Eq CLong Source # 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Integral CLong Source # 
Instance details

Defined in Foreign.C.Types

Num CLong Source # 
Instance details

Defined in Foreign.C.Types

Ord CLong Source # 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CLong -> CLong -> Ordering #

(<) :: CLong -> CLong -> Bool #

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

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

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

max :: CLong -> CLong -> CLong #

min :: CLong -> CLong -> CLong #

Read 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

FiniteBits CLong Source # 
Instance details

Defined in Foreign.C.Types

Bits CLong Source # 
Instance details

Defined in Foreign.C.Types

Storable CLong Source # 
Instance details

Defined in Foreign.C.Types

newtype CULong Source #

Haskell type representing the C unsigned long type.

Constructors

CULong Word64 

Instances

Instances details
Bounded CULong Source # 
Instance details

Defined in Foreign.C.Types

Enum CULong Source # 
Instance details

Defined in Foreign.C.Types

Eq CULong Source # 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Integral CULong Source # 
Instance details

Defined in Foreign.C.Types

Num CULong Source # 
Instance details

Defined in Foreign.C.Types

Ord CULong Source # 
Instance details

Defined in Foreign.C.Types

Read 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

FiniteBits CULong Source # 
Instance details

Defined in Foreign.C.Types

Bits CULong Source # 
Instance details

Defined in Foreign.C.Types

Storable CULong Source # 
Instance details

Defined in Foreign.C.Types

newtype CPtrdiff Source #

Haskell type representing the C ptrdiff_t type.

Constructors

CPtrdiff Int64 

Instances

Instances details
Bounded CPtrdiff Source # 
Instance details

Defined in Foreign.C.Types

Enum CPtrdiff Source # 
Instance details

Defined in Foreign.C.Types

Eq CPtrdiff Source # 
Instance details

Defined in Foreign.C.Types

Integral CPtrdiff Source # 
Instance details

Defined in Foreign.C.Types

Num CPtrdiff Source # 
Instance details

Defined in Foreign.C.Types

Ord CPtrdiff Source # 
Instance details

Defined in Foreign.C.Types

Read 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

FiniteBits CPtrdiff Source # 
Instance details

Defined in Foreign.C.Types

Bits CPtrdiff Source # 
Instance details

Defined in Foreign.C.Types

Storable CPtrdiff Source # 
Instance details

Defined in Foreign.C.Types

newtype CSize Source #

Haskell type representing the C size_t type.

Constructors

CSize Word64 

Instances

Instances details
Bounded CSize Source # 
Instance details

Defined in Foreign.C.Types

Enum CSize Source # 
Instance details

Defined in Foreign.C.Types

Eq CSize Source # 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Integral CSize Source # 
Instance details

Defined in Foreign.C.Types

Num CSize Source # 
Instance details

Defined in Foreign.C.Types

Ord CSize Source # 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CSize -> CSize -> Ordering #

(<) :: CSize -> CSize -> Bool #

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

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

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

max :: CSize -> CSize -> CSize #

min :: CSize -> CSize -> CSize #

Read 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

FiniteBits CSize Source # 
Instance details

Defined in Foreign.C.Types

Bits CSize Source # 
Instance details

Defined in Foreign.C.Types

Storable CSize Source # 
Instance details

Defined in Foreign.C.Types

newtype CWchar Source #

Haskell type representing the C wchar_t type.

Constructors

CWchar Int32 

Instances

Instances details
Bounded CWchar Source # 
Instance details

Defined in Foreign.C.Types

Enum CWchar Source # 
Instance details

Defined in Foreign.C.Types

Eq CWchar Source # 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Integral CWchar Source # 
Instance details

Defined in Foreign.C.Types

Num CWchar Source # 
Instance details

Defined in Foreign.C.Types

Ord CWchar Source # 
Instance details

Defined in Foreign.C.Types

Read 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

FiniteBits CWchar Source # 
Instance details

Defined in Foreign.C.Types

Bits CWchar Source # 
Instance details

Defined in Foreign.C.Types

Storable CWchar Source # 
Instance details

Defined in Foreign.C.Types

newtype CSigAtomic Source #

Haskell type representing the C sig_atomic_t type.

Constructors

CSigAtomic Int32 

Instances

Instances details
Bounded CSigAtomic Source # 
Instance details

Defined in Foreign.C.Types

Enum CSigAtomic Source # 
Instance details

Defined in Foreign.C.Types

Eq CSigAtomic Source # 
Instance details

Defined in Foreign.C.Types

Integral CSigAtomic Source # 
Instance details

Defined in Foreign.C.Types

Num CSigAtomic Source # 
Instance details

Defined in Foreign.C.Types

Ord CSigAtomic Source # 
Instance details

Defined in Foreign.C.Types

Read 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

FiniteBits CSigAtomic Source # 
Instance details

Defined in Foreign.C.Types

Bits CSigAtomic Source # 
Instance details

Defined in Foreign.C.Types

Storable CSigAtomic Source # 
Instance details

Defined in Foreign.C.Types

newtype CLLong Source #

Haskell type representing the C long long type.

Constructors

CLLong Int64 

Instances

Instances details
Bounded CLLong Source # 
Instance details

Defined in Foreign.C.Types

Enum CLLong Source # 
Instance details

Defined in Foreign.C.Types

Eq CLLong Source # 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Integral CLLong Source # 
Instance details

Defined in Foreign.C.Types

Num CLLong Source # 
Instance details

Defined in Foreign.C.Types

Ord CLLong Source # 
Instance details

Defined in Foreign.C.Types

Read 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

FiniteBits CLLong Source # 
Instance details

Defined in Foreign.C.Types

Bits CLLong Source # 
Instance details

Defined in Foreign.C.Types

Storable CLLong Source # 
Instance details

Defined in Foreign.C.Types

newtype CULLong Source #

Haskell type representing the C unsigned long long type.

Constructors

CULLong Word64 

Instances

Instances details
Bounded CULLong Source # 
Instance details

Defined in Foreign.C.Types

Enum CULLong Source # 
Instance details

Defined in Foreign.C.Types

Eq CULLong Source # 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Integral CULLong Source # 
Instance details

Defined in Foreign.C.Types

Num CULLong Source # 
Instance details

Defined in Foreign.C.Types

Ord CULLong Source # 
Instance details

Defined in Foreign.C.Types

Read 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

FiniteBits CULLong Source # 
Instance details

Defined in Foreign.C.Types

Bits CULLong Source # 
Instance details

Defined in Foreign.C.Types

Storable CULLong Source # 
Instance details

Defined in Foreign.C.Types

newtype CBool Source #

Haskell type representing the C bool type.

Since: 4.10.0.0

Constructors

CBool Word8 

Instances

Instances details
Bounded CBool Source # 
Instance details

Defined in Foreign.C.Types

Enum CBool Source # 
Instance details

Defined in Foreign.C.Types

Eq CBool Source # 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Integral CBool Source # 
Instance details

Defined in Foreign.C.Types

Num CBool Source # 
Instance details

Defined in Foreign.C.Types

Ord CBool Source # 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CBool -> CBool -> Ordering #

(<) :: CBool -> CBool -> Bool #

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

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

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

max :: CBool -> CBool -> CBool #

min :: CBool -> CBool -> CBool #

Read 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

FiniteBits CBool Source # 
Instance details

Defined in Foreign.C.Types

Bits CBool Source # 
Instance details

Defined in Foreign.C.Types

Storable CBool Source # 
Instance details

Defined in Foreign.C.Types

newtype CIntPtr Source #

Constructors

CIntPtr Int64 

Instances

Instances details
Bounded CIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Enum CIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Eq CIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Integral CIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Num CIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Ord CIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Read 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

FiniteBits CIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Bits CIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Storable CIntPtr Source # 
Instance details

Defined in Foreign.C.Types

newtype CUIntPtr Source #

Constructors

CUIntPtr Word64 

Instances

Instances details
Bounded CUIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Enum CUIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Eq CUIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Integral CUIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Num CUIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Ord CUIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Read 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

FiniteBits CUIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Bits CUIntPtr Source # 
Instance details

Defined in Foreign.C.Types

Storable CUIntPtr Source # 
Instance details

Defined in Foreign.C.Types

newtype CIntMax Source #

Constructors

CIntMax Int64 

Instances

Instances details
Bounded CIntMax Source # 
Instance details

Defined in Foreign.C.Types

Enum CIntMax Source # 
Instance details

Defined in Foreign.C.Types

Eq CIntMax Source # 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Integral CIntMax Source # 
Instance details

Defined in Foreign.C.Types

Num CIntMax Source # 
Instance details

Defined in Foreign.C.Types

Ord CIntMax Source # 
Instance details

Defined in Foreign.C.Types

Read 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

FiniteBits CIntMax Source # 
Instance details

Defined in Foreign.C.Types

Bits CIntMax Source # 
Instance details

Defined in Foreign.C.Types

Storable CIntMax Source # 
Instance details

Defined in Foreign.C.Types

newtype CUIntMax Source #

Constructors

CUIntMax Word64 

Instances

Instances details
Bounded CUIntMax Source # 
Instance details

Defined in Foreign.C.Types

Enum CUIntMax Source # 
Instance details

Defined in Foreign.C.Types

Eq CUIntMax Source # 
Instance details

Defined in Foreign.C.Types

Integral CUIntMax Source # 
Instance details

Defined in Foreign.C.Types

Num CUIntMax Source # 
Instance details

Defined in Foreign.C.Types

Ord CUIntMax Source # 
Instance details

Defined in Foreign.C.Types

Read 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

FiniteBits CUIntMax Source # 
Instance details

Defined in Foreign.C.Types

Bits CUIntMax Source # 
Instance details

Defined in Foreign.C.Types

Storable 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.

Constructors

CClock Int64 

Instances

Instances details
Enum CClock Source # 
Instance details

Defined in Foreign.C.Types

Eq CClock Source # 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Num CClock Source # 
Instance details

Defined in Foreign.C.Types

Ord 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

Storable CClock Source # 
Instance details

Defined in Foreign.C.Types

newtype CTime Source #

Haskell type representing the C time_t type.

Constructors

CTime Int64 

Instances

Instances details
Enum CTime Source # 
Instance details

Defined in Foreign.C.Types

Eq CTime Source # 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Num CTime Source # 
Instance details

Defined in Foreign.C.Types

Ord CTime Source # 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CTime -> CTime -> Ordering #

(<) :: CTime -> CTime -> Bool #

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

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

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

max :: CTime -> CTime -> CTime #

min :: CTime -> CTime -> CTime #

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

Storable CTime Source # 
Instance details

Defined in Foreign.C.Types

newtype CUSeconds Source #

Haskell type representing the C useconds_t type.

Since: 4.4.0.0

Constructors

CUSeconds Word32 

Instances

Instances details
Enum CUSeconds Source # 
Instance details

Defined in Foreign.C.Types

Eq CUSeconds Source # 
Instance details

Defined in Foreign.C.Types

Num CUSeconds Source # 
Instance details

Defined in Foreign.C.Types

Ord 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

Storable CUSeconds Source # 
Instance details

Defined in Foreign.C.Types

newtype CSUSeconds Source #

Haskell type representing the C suseconds_t type.

Since: 4.4.0.0

Constructors

CSUSeconds Int64 

Instances

Instances details
Enum CSUSeconds Source # 
Instance details

Defined in Foreign.C.Types

Eq CSUSeconds Source # 
Instance details

Defined in Foreign.C.Types

Num CSUSeconds Source # 
Instance details

Defined in Foreign.C.Types

Ord 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

Storable 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.

Constructors

CFloat Float 

Instances

Instances details
Enum CFloat Source # 
Instance details

Defined in Foreign.C.Types

Eq CFloat Source # 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Floating CFloat Source # 
Instance details

Defined in Foreign.C.Types

Fractional CFloat Source # 
Instance details

Defined in Foreign.C.Types

Num CFloat Source # 
Instance details

Defined in Foreign.C.Types

Ord CFloat Source # 
Instance details

Defined in Foreign.C.Types

Read CFloat Source # 
Instance details

Defined in Foreign.C.Types

Real CFloat Source # 
Instance details

Defined in Foreign.C.Types

RealFloat 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

Storable CFloat Source # 
Instance details

Defined in Foreign.C.Types

newtype CDouble Source #

Haskell type representing the C double type.

Constructors

CDouble Double 

Instances

Instances details
Enum CDouble Source # 
Instance details

Defined in Foreign.C.Types

Eq CDouble Source # 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Floating CDouble Source # 
Instance details

Defined in Foreign.C.Types

Fractional CDouble Source # 
Instance details

Defined in Foreign.C.Types

Num CDouble Source # 
Instance details

Defined in Foreign.C.Types

Ord CDouble Source # 
Instance details

Defined in Foreign.C.Types

Read CDouble Source # 
Instance details

Defined in Foreign.C.Types

Real CDouble Source # 
Instance details

Defined in Foreign.C.Types

RealFloat 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

Storable CDouble Source # 
Instance details

Defined in Foreign.C.Types

Other types

data CFile Source #

Haskell type representing the C FILE type.

data CFpos Source #

Haskell type representing the C fpos_t type.

data CJmpBuf Source #

Haskell type representing the C jmp_buf type.