Haskell Core Libraries (base package)ParentContentsIndex
GHC.Exts
Portability non-portable (GHC Extensions)
Stability internal
Maintainer cvs-ghc@haskell.org
Contents
Representations of some basic types
Primitive operations
Fusion
Linear implicit parameter support
Description
GHC Extensions: this is the Approved Way to get at GHC-specific extensions.
Synopsis
data Int = I# Int#
data Word = W# Word#
data Float = F# Float#
data Double = D# Double#
data Integer
= S# Int#
| J# Int# ByteArray#
data Char = C# Char#
data Ptr a = Ptr Addr#
data FunPtr a = FunPtr Addr#
shiftL# :: Word# -> Int# -> Word#
shiftRL# :: Word# -> Int# -> Word#
iShiftL# :: Int# -> Int# -> Int#
iShiftRA# :: Int# -> Int# -> Int#
iShiftRL# :: Int# -> Int# -> Int#
build :: forall a . (forall b . (a -> b -> b) -> b -> b) -> [a]
augment :: forall a . (forall b . (a -> b -> b) -> b -> b) -> [a] -> [a]
class Splittable t where
split :: t -> (t, t)
Representations of some basic types
data Int
A fixed-precision integer type with at least the range [-2^29 .. 2^29-1]. The exact range for a given implementation can be determined by using minBound and maxBound from the Bounded class.
Constructors
I# Int#
Instances
IArray UArray Int
(Ix ix) => Eq (UArray ix Int)
(Ix ix) => Ord (UArray ix Int)
(Ix ix, Show ix) => Show (UArray ix Int)
MArray (STUArray s) Int (ST s)
(Ix ix, Show ix) => Show (DiffUArray ix Int)
IArray (IOToDiffArray IOUArray) Int
MArray IOUArray Int IO
Bits Int
Typeable Int
Arbitrary Int
Storable Int
Ix Int
Eq Int
Ord Int
CCallable Int
CReturnable Int
Bounded Int
Enum Int
Num Int
Read Int
Real Int
Integral Int
Show Int
Random Int
data Word
A Word is an unsigned integral type, with the same size as Int.
Constructors
W# Word#
Instances
IArray UArray Word
(Ix ix) => Eq (UArray ix Word)
(Ix ix) => Ord (UArray ix Word)
(Ix ix, Show ix) => Show (UArray ix Word)
MArray (STUArray s) Word (ST s)
(Ix ix, Show ix) => Show (DiffUArray ix Word)
IArray (IOToDiffArray IOUArray) Word
MArray IOUArray Word IO
Storable Word
CCallable Word
CReturnable Word
Show Word
Num Word
Real Word
Enum Word
Integral Word
Bounded Word
Ix Word
Read Word
Bits Word
Eq Word
Ord Word
data Float
Single-precision floating point numbers.
Constructors
F# Float#
Instances
IArray UArray Float
(Ix ix) => Eq (UArray ix Float)
(Ix ix) => Ord (UArray ix Float)
(Ix ix, Show ix) => Show (UArray ix Float)
MArray (STUArray s) Float (ST s)
(Ix ix, Show ix) => Show (DiffUArray ix Float)
IArray (IOToDiffArray IOUArray) Float
MArray IOUArray Float IO
Typeable Float
Data Float
Arbitrary Float
Storable Float
CCallable Float
CReturnable Float
Eq Float
Ord Float
Num Float
Real Float
Fractional Float
RealFrac Float
Floating Float
RealFloat Float
Show Float
Enum Float
Read Float
Random Float
data Double
Double-precision floating point numbers.
Constructors
D# Double#
Instances
IArray UArray Double
(Ix ix) => Eq (UArray ix Double)
(Ix ix) => Ord (UArray ix Double)
(Ix ix, Show ix) => Show (UArray ix Double)
MArray (STUArray s) Double (ST s)
(Ix ix, Show ix) => Show (DiffUArray ix Double)
IArray (IOToDiffArray IOUArray) Double
MArray IOUArray Double IO
Typeable Double
Arbitrary Double
Storable Double
CCallable Double
CReturnable Double
Eq Double
Ord Double
Num Double
Real Double
Fractional Double
Floating Double
RealFrac Double
RealFloat Double
Show Double
Enum Double
Read Double
Random Double
data Integer
Arbitrary-precision integers.
Constructors
S# Int#
J# Int# ByteArray#
Instances
Bits Integer
Typeable Integer
Arbitrary Integer
Ix Integer
Eq Integer
Ord Integer
Num Integer
Enum Integer
Show Integer
Read Integer
Real Integer
Integral Integer
Random Integer
data Char

The character type Char is an enumeration whose values represent Unicode characters. A character literal in Haskell has type Char.

To convert a Char to or from an Int, use toEnum and fromEnum from the Enum class respectively (equivalently ord and chr also do the trick).

Constructors
C# Char#
Instances
Error [Char]
IArray UArray Char
(Ix ix) => Eq (UArray ix Char)
(Ix ix) => Ord (UArray ix Char)
(Ix ix, Show ix) => Show (UArray ix Char)
MArray (STUArray s) Char (ST s)
(Ix ix, Show ix) => Show (DiffUArray ix Char)
IArray (IOToDiffArray IOUArray) Char
MArray IOUArray Char IO
Typeable Char
Data Char
Storable Char
Ix Char
Eq Char
Ord Char
CCallable Char
CReturnable Char
Bounded Char
Enum Char
Read Char
Show Char
Random Char
HTML Char
data Ptr a

A value of type Ptr a represents a pointer to an object, or an array of objects, which may be marshalled to or from Haskell values of type a.

The type a will normally be an instance of class Storable which provides the marshalling operations.

Constructors
Ptr Addr#
Instances
IArray UArray (Ptr a)
(Ix ix) => Eq (UArray ix (Ptr a))
(Ix ix) => Ord (UArray ix (Ptr a))
MArray (STUArray s) (Ptr a) (ST s)
IArray (IOToDiffArray IOUArray) (Ptr a)
MArray IOUArray (Ptr a) IO
(Typeable a) => Typeable (Ptr a)
Show (Ptr a)
Storable (Ptr a)
CCallable (Ptr a)
CReturnable (Ptr a)
Eq (Ptr a)
Ord (Ptr a)
data FunPtr a

A value of type FunPtr a is a pointer to a piece of code. It may be the pointer to a C function or to a Haskell function created using foreign export dynamic. A foreign export dynamic should normally be declared to produce a FunPtr of the correct type. For example:

 type Compare = 'Int' -> 'Int' -> 'Bool'
 foreign export dynamic mkCompare :: Compare -> 'IO' ('FunPtr' Compare)
Constructors
FunPtr Addr#
Instances
IArray UArray (FunPtr a)
(Ix ix) => Eq (UArray ix (FunPtr a))
(Ix ix) => Ord (UArray ix (FunPtr a))
MArray (STUArray s) (FunPtr a) (ST s)
IArray (IOToDiffArray IOUArray) (FunPtr a)
MArray IOUArray (FunPtr a) IO
Show (FunPtr a)
Storable (FunPtr a)
CCallable (FunPtr a)
CReturnable (FunPtr a)
Eq (FunPtr a)
Ord (FunPtr a)
Primitive operations
shiftL# :: Word# -> Int# -> Word#
shiftRL# :: Word# -> Int# -> Word#
iShiftL# :: Int# -> Int# -> Int#
iShiftRA# :: Int# -> Int# -> Int#
iShiftRL# :: Int# -> Int# -> Int#
Fusion
build :: forall a . (forall b . (a -> b -> b) -> b -> b) -> [a]
augment :: forall a . (forall b . (a -> b -> b) -> b -> b) -> [a] -> [a]
Linear implicit parameter support
class Splittable t where
Methods
split :: t -> (t, t)
Produced by Haddock version 0.4