A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://hackage.haskell.org/packages/archive/base/4.6.0.0/doc/html/Foreign-C-Types.html below:

Foreign.C.Types

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:

Integral types

These types are 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.

newtype CSChar Source

Haskell type representing the C signed char type.

newtype CUChar Source

Haskell type representing the C unsigned char type.

newtype CShort Source

Haskell type representing the C short type.

newtype CUShort Source

Haskell type representing the C unsigned short type.

newtype CInt Source

Haskell type representing the C int type.

newtype CUInt Source

Haskell type representing the C unsigned int type.

newtype CLong Source

Haskell type representing the C long type.

newtype CULong Source

Haskell type representing the C unsigned long type.

newtype CPtrdiff Source

Haskell type representing the C ptrdiff_t type.

newtype CSize Source

Haskell type representing the C size_t type.

newtype CWchar Source

Haskell type representing the C wchar_t type.

newtype CLLong Source

Haskell type representing the C long long type.

newtype CULLong Source

Haskell type representing the C unsigned long long type.

Numeric types

These types are 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.

newtype CTime Source

Haskell type representing the C time_t type.

To convert CTime to UTCTime, use the following formula:

  posixSecondsToUTCTime (realToFrac :: POSIXTime)
Floating types

These types are 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.

newtype CFloat Source

Haskell type representing the C float type.

newtype CDouble Source

Haskell type representing the C double type.

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.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4