HaskellWorks.Data.FromForeignRegion

hw-prim-0.6.3.2: Primitive functions and data types

Safe Haskell | None
Language | Haskell2010

HaskellWorks.Data.FromForeignRegion

Synopsis

- class FromForeignRegion a where
  - fromForeignRegion :: ForeignRegion -> a
- type ForeignRegion = (ForeignPtr Word8, Int, Int)
- mmapFromForeignRegion :: FromForeignRegion a => FilePath -> IO a

# Documentation

class FromForeignRegion a where #

Class for datastructures that can be created from a foreign region

Methods

fromForeignRegion :: ForeignRegion -> a #

Create a value of type @a from a foreign region.

#### Instances

Instances details

FromForeignRegion ByteString # |
Instance details Defined in HaskellWorks.Data.FromForeignRegion Methods fromForeignRegion :: ForeignRegion -> ByteString #
FromForeignRegion (Vector Word16) # |
Instance details Defined in HaskellWorks.Data.FromForeignRegion Methods fromForeignRegion :: ForeignRegion -> Vector Word16 #
FromForeignRegion (Vector Word32) # |
Instance details Defined in HaskellWorks.Data.FromForeignRegion Methods fromForeignRegion :: ForeignRegion -> Vector Word32 #
FromForeignRegion (Vector Word64) # |
Instance details Defined in HaskellWorks.Data.FromForeignRegion Methods fromForeignRegion :: ForeignRegion -> Vector Word64 #
FromForeignRegion (Vector Word8) # |
Instance details Defined in HaskellWorks.Data.FromForeignRegion Methods fromForeignRegion :: ForeignRegion -> Vector Word8 #
(FromForeignRegion a, FromForeignRegion b) => FromForeignRegion (a :*: b) # |
Instance details Defined in HaskellWorks.Data.FromForeignRegion Methods fromForeignRegion :: ForeignRegion -> a :*: b #

type ForeignRegion = (ForeignPtr Word8, Int, Int) #

mmapFromForeignRegion :: FromForeignRegion a => FilePath -> IO a #