foundation-0.0.29: Alternative prelude with batteries and no dependencies
License BSD-style
Maintainer Haskell Foundation
Stability experimental
Portability portable
Safe Haskell None
Language Haskell2010

Foundation.Class.Storable

Description

Synopsis

Documentation

class Storable a where Source #

Storable type of self determined size.

Instances

Instances details
Storable Char Source #
Instance details

Defined in Foundation.Class.Storable

Storable Double Source #
Instance details

Defined in Foundation.Class.Storable

Storable Float Source #
Instance details

Defined in Foundation.Class.Storable

Storable Int8 Source #
Instance details

Defined in Foundation.Class.Storable

Storable Int16 Source #
Instance details

Defined in Foundation.Class.Storable

Storable Int32 Source #
Instance details

Defined in Foundation.Class.Storable

Storable Int64 Source #
Instance details

Defined in Foundation.Class.Storable

Storable Word8 Source #
Instance details

Defined in Foundation.Class.Storable

Storable Word16 Source #
Instance details

Defined in Foundation.Class.Storable

Storable Word32 Source #
Instance details

Defined in Foundation.Class.Storable

Storable Word64 Source #
Instance details

Defined in Foundation.Class.Storable

Storable CChar Source #
Instance details

Defined in Foundation.Class.Storable

Storable CUChar Source #
Instance details

Defined in Foundation.Class.Storable

Storable Word256 Source #
Instance details

Defined in Foundation.Class.Storable

Storable Word128 Source #
Instance details

Defined in Foundation.Class.Storable

Storable IPv6 Source #
Instance details

Defined in Foundation.Network.IPv6

Storable IPv4 Source #
Instance details

Defined in Foundation.Network.IPv4

Storable UUID Source #
Instance details

Defined in Foundation.UUID

Storable ( Ptr a) Source #
Instance details

Defined in Foundation.Class.Storable

Storable ( LE Word16 ) Source #
Instance details

Defined in Foundation.Class.Storable

Storable ( LE Word32 ) Source #
Instance details

Defined in Foundation.Class.Storable

Storable ( LE Word64 ) Source #
Instance details

Defined in Foundation.Class.Storable

Storable ( LE Word256 ) Source #
Instance details

Defined in Foundation.Class.Storable

Storable ( LE Word128 ) Source #
Instance details

Defined in Foundation.Class.Storable

Storable ( BE Word16 ) Source #
Instance details

Defined in Foundation.Class.Storable

Storable ( BE Word32 ) Source #
Instance details

Defined in Foundation.Class.Storable

Storable ( BE Word64 ) Source #
Instance details

Defined in Foundation.Class.Storable

Storable ( BE Word256 ) Source #
Instance details

Defined in Foundation.Class.Storable

Storable ( BE Word128 ) Source #
Instance details

Defined in Foundation.Class.Storable

class Storable a => StorableFixed a where Source #

Extending the Storable type class to the types that can be sequenced in a structure.

Instances

Instances details
StorableFixed Char Source #
Instance details

Defined in Foundation.Class.Storable

StorableFixed Double Source #
Instance details

Defined in Foundation.Class.Storable

StorableFixed Float Source #
Instance details

Defined in Foundation.Class.Storable

StorableFixed Int8 Source #
Instance details

Defined in Foundation.Class.Storable

StorableFixed Int16 Source #
Instance details

Defined in Foundation.Class.Storable

StorableFixed Int32 Source #
Instance details

Defined in Foundation.Class.Storable

StorableFixed Int64 Source #
Instance details

Defined in Foundation.Class.Storable

StorableFixed Word8 Source #
Instance details

Defined in Foundation.Class.Storable

StorableFixed Word16 Source #
Instance details

Defined in Foundation.Class.Storable

StorableFixed Word32 Source #
Instance details

Defined in Foundation.Class.Storable

StorableFixed Word64 Source #
Instance details

Defined in Foundation.Class.Storable

StorableFixed CChar Source #
Instance details

Defined in Foundation.Class.Storable

StorableFixed CUChar Source #
Instance details

Defined in Foundation.Class.Storable

StorableFixed Word256 Source #
Instance details

Defined in Foundation.Class.Storable

StorableFixed Word128 Source #
Instance details

Defined in Foundation.Class.Storable

StorableFixed IPv6 Source #
Instance details

Defined in Foundation.Network.IPv6

StorableFixed IPv4 Source #
Instance details

Defined in Foundation.Network.IPv4

StorableFixed UUID Source #
Instance details

Defined in Foundation.UUID

StorableFixed ( Ptr a) Source #
Instance details

Defined in Foundation.Class.Storable

StorableFixed ( LE Word16 ) Source #
Instance details

Defined in Foundation.Class.Storable

StorableFixed ( LE Word32 ) Source #
Instance details

Defined in Foundation.Class.Storable

StorableFixed ( LE Word64 ) Source #
Instance details

Defined in Foundation.Class.Storable

StorableFixed ( LE Word256 ) Source #
Instance details

Defined in Foundation.Class.Storable

StorableFixed ( LE Word128 ) Source #
Instance details

Defined in Foundation.Class.Storable

StorableFixed ( BE Word16 ) Source #
Instance details

Defined in Foundation.Class.Storable

StorableFixed ( BE Word32 ) Source #
Instance details

Defined in Foundation.Class.Storable

StorableFixed ( BE Word64 ) Source #
Instance details

Defined in Foundation.Class.Storable

StorableFixed ( BE Word256 ) Source #
Instance details

Defined in Foundation.Class.Storable

StorableFixed ( BE Word128 ) Source #
Instance details

Defined in Foundation.Class.Storable

Ptr

data Ptr a Source #

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 often be an instance of class Storable which provides the marshalling operations. However this is not essential, and you can provide your own operations to access the pointer. For example you might write small foreign functions to get or set the fields of a C struct .

Instances

Instances details
Generic1 ( URec ( Ptr ()) :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( URec ( Ptr ())) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). URec ( Ptr ()) a -> Rep1 ( URec ( Ptr ())) a Source #

to1 :: forall (a :: k0). Rep1 ( URec ( Ptr ())) a -> URec ( Ptr ()) a Source #

Eq ( Ptr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Data a => Data ( Ptr a)

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> Ptr a -> c ( Ptr a) Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c ( Ptr a) Source #

toConstr :: Ptr a -> Constr Source #

dataTypeOf :: Ptr a -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c ( Ptr a)) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c ( Ptr a)) Source #

gmapT :: ( forall b. Data b => b -> b) -> Ptr a -> Ptr a Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> Ptr a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> Ptr a -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> Ptr a -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> Ptr a -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> Ptr a -> m ( Ptr a) Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> Ptr a -> m ( Ptr a) Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> Ptr a -> m ( Ptr a) Source #

Ord ( Ptr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Show ( Ptr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Foldable ( UAddr :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Traversable ( UAddr :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Storable ( Ptr a)

Since: base-2.1

Instance details

Defined in Foreign.Storable

NormalForm ( Ptr a)
Instance details

Defined in Basement.NormalForm

StorableFixed ( Ptr a) Source #
Instance details

Defined in Foundation.Class.Storable

Storable ( Ptr a) Source #
Instance details

Defined in Foundation.Class.Storable

Functor ( URec ( Ptr ()) :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec ( Ptr ()) a -> URec ( Ptr ()) b Source #

(<$) :: a -> URec ( Ptr ()) b -> URec ( Ptr ()) a Source #

Eq ( URec ( Ptr ()) p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( URec ( Ptr ()) p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Generic ( URec ( Ptr ()) p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( URec ( Ptr ()) p) :: Type -> Type Source #

data URec ( Ptr ()) (p :: k)

Used for marking occurrences of Addr#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

data URec ( Ptr ()) (p :: k) = UAddr { }
type Rep1 ( URec ( Ptr ()) :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep ( URec ( Ptr ()) p)
Instance details

Defined in GHC.Generics

castPtr :: Ptr a -> Ptr b Source #

The castPtr function casts a pointer from one type to another.

offset based helper

peekOff :: StorableFixed a => Ptr a -> Offset a -> IO a Source #

like peek but at a given offset.

pokeOff :: StorableFixed a => Ptr a -> Offset a -> a -> IO () Source #

like poke but at a given offset.

Collection