FastTypes

ghc-7.8.3: The GHC API

Safe Haskell | None
Language | Haskell98

FastTypes

Contents

- FastInt
  - Getting in and out of FastInt
  - Arithmetic on FastInt
- FastChar
  - Getting in and out of FastChar
  - Operations on FastChar
- FastPtr
  - Getting in and out of FastPtr
  - Casting FastPtrs

Description

Fast integers, characters and pointer types for use in many parts of GHC

Synopsis

- type FastInt = Int#
- _ILIT :: Int -> FastInt
- iBox :: FastInt -> Int
- iUnbox :: Int -> FastInt
- (+#) :: Int# -> Int# -> Int#
- (-#) :: Int# -> Int# -> Int#
- (*#) :: Int# -> Int# -> Int#
- quotFastInt :: FastInt -> FastInt -> FastInt
- negateFastInt :: FastInt -> FastInt
- (==#) :: Int# -> Int# -> Bool
- (/=#) :: Int# -> Int# -> Bool
- (<#) :: Int# -> Int# -> Bool
- (<=#) :: Int# -> Int# -> Bool
- (>=#) :: Int# -> Int# -> Bool
- (>#) :: Int# -> Int# -> Bool
- minFastInt :: FastInt -> FastInt -> FastInt
- maxFastInt :: FastInt -> FastInt -> FastInt
- shiftLFastInt :: FastInt -> FastInt -> FastInt
- shiftR_FastInt :: FastInt -> FastInt -> FastInt
- shiftRLFastInt :: FastInt -> FastInt -> FastInt
- shiftRAFastInt :: FastInt -> FastInt -> FastInt
- bitAndFastInt :: FastInt -> FastInt -> FastInt
- bitOrFastInt :: FastInt -> FastInt -> FastInt
- type FastChar = Char#
- _CLIT :: Char -> FastChar
- cBox :: FastChar -> Char
- cUnbox :: Char -> FastChar
- fastOrd :: FastChar -> FastInt
- fastChr :: FastInt -> FastChar
- eqFastChar :: FastChar -> FastChar -> Bool
- type FastPtr a = Addr#
- pBox :: FastPtr a -> Ptr a
- pUnbox :: Ptr a -> FastPtr a
- castFastPtr :: FastPtr a -> FastPtr b

# FastInt

type FastInt = Int# Source

## Getting in and out of FastInt

_ILIT :: Int -> FastInt Source

iBox :: FastInt -> Int Source

iUnbox :: Int -> FastInt Source

## Arithmetic on FastInt

(+#) :: Int# -> Int# -> Int#

(-#) :: Int# -> Int# -> Int#

(*#) :: Int# -> Int# -> Int#

quotFastInt :: FastInt -> FastInt -> FastInt Source

negateFastInt :: FastInt -> FastInt Source

(==#) :: Int# -> Int# -> Bool infix 4 Source

(/=#) :: Int# -> Int# -> Bool infix 4 Source

(<#) :: Int# -> Int# -> Bool infix 4 Source

(<=#) :: Int# -> Int# -> Bool infix 4 Source

(>=#) :: Int# -> Int# -> Bool infix 4 Source

(>#) :: Int# -> Int# -> Bool infix 4 Source

minFastInt :: FastInt -> FastInt -> FastInt Source

maxFastInt :: FastInt -> FastInt -> FastInt Source

shiftLFastInt :: FastInt -> FastInt -> FastInt Source

shiftR_FastInt :: FastInt -> FastInt -> FastInt Source

shiftRLFastInt :: FastInt -> FastInt -> FastInt Source

shiftRAFastInt :: FastInt -> FastInt -> FastInt Source

bitAndFastInt :: FastInt -> FastInt -> FastInt Source

bitOrFastInt :: FastInt -> FastInt -> FastInt Source

# FastChar

type FastChar = Char# Source

## Getting in and out of FastChar

_CLIT :: Char -> FastChar Source

cBox :: FastChar -> Char Source

cUnbox :: Char -> FastChar Source

## Operations on FastChar

fastOrd :: FastChar -> FastInt Source

fastChr :: FastInt -> FastChar Source

eqFastChar :: FastChar -> FastChar -> Bool Source

# FastPtr

type FastPtr a = Addr# Source

## Getting in and out of FastPtr

pBox :: FastPtr a -> Ptr a Source

pUnbox :: Ptr a -> FastPtr a Source

## Casting FastPtrs

castFastPtr :: FastPtr a -> FastPtr b Source