lens-5.0.1: Lenses, Folds and Traversals
Copyright (C) 2012-2016 Edward Kmett (C) 2017 Ryan Scott
License BSD-style (see the file LICENSE)
Maintainer Edward Kmett <ekmett@gmail.com>
Stability experimental
Portability non-portable
Safe Haskell Safe-Inferred
Language Haskell2010

Control.Lens.Internal.CTypes

Description

In Control.Lens.Wrapped , we need to muck around with the internals of the newtypes in Foreign.C.Types . Unfortunately, the exact types used varies wildly from platform to platform, so trying to manage the imports necessary to bring these types in scope can be unwieldy.

To make things easier, we use this module as a way to import everything carte blanche that might be used internally in Foreign.C.Types . For now, this consists of all the exports from the Data.Int and Data.Word modules, as well as the Ptr type.

Synopsis

Documentation

module Data.Int

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
NFData1 Ptr

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Ptr a -> () Source #

IArray UArray ( Ptr a)
Instance details

Defined in Data.Array.Base

Methods

bounds :: Ix i => UArray i ( Ptr a) -> (i, i) Source #

numElements :: Ix i => UArray i ( Ptr a) -> Int

unsafeArray :: Ix i => (i, i) -> [( Int , Ptr a)] -> UArray i ( Ptr a)

unsafeAt :: Ix i => UArray i ( Ptr a) -> Int -> Ptr a

unsafeReplace :: Ix i => UArray i ( Ptr a) -> [( Int , Ptr a)] -> UArray i ( Ptr a)

unsafeAccum :: Ix i => ( Ptr a -> e' -> Ptr a) -> UArray i ( Ptr a) -> [( Int , e')] -> UArray i ( Ptr a)

unsafeAccumArray :: Ix i => ( Ptr a -> e' -> Ptr a) -> Ptr a -> (i, i) -> [( Int , e')] -> UArray i ( Ptr a)

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

NFData ( Ptr a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Ptr a -> () Source #

Hashable ( Ptr a)
Instance details

Defined in Data.Hashable.Class

Prim ( Ptr a)
Instance details

Defined in Data.Primitive.Types

MArray ( STUArray s) ( Ptr a) ( ST s)
Instance details

Defined in Data.Array.Base

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