lens-4.18.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
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.

# Documentation

data Ptr a #

#### Instances

Instances details

NFData1 Ptr |
Instance details Defined in Control.DeepSeq Methods liftRnf :: (a -> ()) -> Ptr a -> ()
IArray UArray (Ptr a) |

Instance details

Defined in Data.Array.Base

Methods

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

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) |
Instance details Defined in GHC.Generics Associated Types type Rep1 (URec (Ptr ())) :: k -> Type Methods from1 :: forall (a :: k0). URec (Ptr ()) a -> Rep1 (URec (Ptr ())) a to1 :: forall (a :: k0). Rep1 (URec (Ptr ())) a -> URec (Ptr ()) a
Eq (Ptr a) |
Instance details Defined in GHC.Ptr Methods (==) :: Ptr a -> Ptr a -> Bool (/=) :: Ptr a -> Ptr a -> Bool
Data a => Data (Ptr a) |

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)

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

toConstr :: Ptr a -> Constr

dataTypeOf :: Ptr a -> DataType

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

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

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

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

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

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

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

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

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

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

Ord (Ptr a) |
Instance details Defined in GHC.Ptr Methods compare :: Ptr a -> Ptr a -> Ordering (<) :: Ptr a -> Ptr a -> Bool (<=) :: Ptr a -> Ptr a -> Bool (>) :: Ptr a -> Ptr a -> Bool (>=) :: Ptr a -> Ptr a -> Bool max :: Ptr a -> Ptr a -> Ptr a min :: Ptr a -> Ptr a -> Ptr a
Show (Ptr a) |
Instance details Defined in GHC.Ptr Methods showsPrec :: Int -> Ptr a -> ShowS show :: Ptr a -> String showList :: [Ptr a] -> ShowS
Storable (Ptr a) |
Instance details Defined in Foreign.Storable Methods sizeOf :: Ptr a -> Int alignment :: Ptr a -> Int peekElemOff :: Ptr (Ptr a) -> Int -> IO (Ptr a) pokeElemOff :: Ptr (Ptr a) -> Int -> Ptr a -> IO () peekByteOff :: Ptr b -> Int -> IO (Ptr a) pokeByteOff :: Ptr b -> Int -> Ptr a -> IO () peek :: Ptr (Ptr a) -> IO (Ptr a) poke :: Ptr (Ptr a) -> Ptr a -> IO ()
Hashable (Ptr a) |
Instance details Defined in Data.Hashable.Class Methods hashWithSalt :: Int -> Ptr a -> Int Source # hash :: Ptr a -> Int Source #
NFData (Ptr a) |
Instance details Defined in Control.DeepSeq Methods rnf :: Ptr a -> ()
Prim (Ptr a) |

Instance details

Defined in Data.Primitive.Types

Methods

sizeOf# :: Ptr a -> Int#

alignment# :: Ptr a -> Int#

indexByteArray# :: ByteArray# -> Int# -> Ptr a

readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, Ptr a #)

writeByteArray# :: MutableByteArray# s -> Int# -> Ptr a -> State# s -> State# s

setByteArray# :: MutableByteArray# s -> Int# -> Int# -> Ptr a -> State# s -> State# s

indexOffAddr# :: Addr# -> Int# -> Ptr a

readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, Ptr a #)

writeOffAddr# :: Addr# -> Int# -> Ptr a -> State# s -> State# s

setOffAddr# :: Addr# -> Int# -> Int# -> Ptr a -> State# s -> State# s

MArray (STUArray s) (Ptr a) (ST s) |

Instance details

Defined in Data.Array.Base

Methods

getBounds :: Ix i => STUArray s i (Ptr a) -> ST s (i, i)

getNumElements :: Ix i => STUArray s i (Ptr a) -> ST s Int

newArray :: Ix i => (i, i) -> Ptr a -> ST s (STUArray s i (Ptr a))

newArray_ :: Ix i => (i, i) -> ST s (STUArray s i (Ptr a))

unsafeNewArray_ :: Ix i => (i, i) -> ST s (STUArray s i (Ptr a))

unsafeRead :: Ix i => STUArray s i (Ptr a) -> Int -> ST s (Ptr a)

unsafeWrite :: Ix i => STUArray s i (Ptr a) -> Int -> Ptr a -> ST s ()

Functor (URec (Ptr ()) :: Type -> Type) |
Instance details Defined in GHC.Generics Methods fmap :: (a -> b) -> URec (Ptr ()) a -> URec (Ptr ()) b # (<$) :: a -> URec (Ptr ()) b -> URec (Ptr ()) a #
Foldable (URec (Ptr ()) :: Type -> Type) |

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => URec (Ptr ()) m -> m

foldMap :: Monoid m => (a -> m) -> URec (Ptr ()) a -> m

foldMap' :: Monoid m => (a -> m) -> URec (Ptr ()) a -> m

foldr :: (a -> b -> b) -> b -> URec (Ptr ()) a -> b

foldr' :: (a -> b -> b) -> b -> URec (Ptr ()) a -> b

foldl :: (b -> a -> b) -> b -> URec (Ptr ()) a -> b

foldl' :: (b -> a -> b) -> b -> URec (Ptr ()) a -> b

foldr1 :: (a -> a -> a) -> URec (Ptr ()) a -> a

foldl1 :: (a -> a -> a) -> URec (Ptr ()) a -> a

toList :: URec (Ptr ()) a -> [a]

null :: URec (Ptr ()) a -> Bool

length :: URec (Ptr ()) a -> Int

elem :: Eq a => a -> URec (Ptr ()) a -> Bool

maximum :: Ord a => URec (Ptr ()) a -> a

minimum :: Ord a => URec (Ptr ()) a -> a

sum :: Num a => URec (Ptr ()) a -> a

product :: Num a => URec (Ptr ()) a -> a

Traversable (URec (Ptr ()) :: Type -> Type) |
Instance details Defined in Data.Traversable Methods traverse :: Applicative f => (a -> f b) -> URec (Ptr ()) a -> f (URec (Ptr ()) b) # sequenceA :: Applicative f => URec (Ptr ()) (f a) -> f (URec (Ptr ()) a) mapM :: Monad m => (a -> m b) -> URec (Ptr ()) a -> m (URec (Ptr ()) b) sequence :: Monad m => URec (Ptr ()) (m a) -> m (URec (Ptr ()) a)
Eq (URec (Ptr ()) p) |
Instance details Defined in GHC.Generics Methods (==) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool (/=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool
Ord (URec (Ptr ()) p) |

Instance details

Defined in GHC.Generics

Methods

compare :: URec (Ptr ()) p -> URec (Ptr ()) p -> Ordering

(<) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool

(<=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool

(>) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool

(>=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool

max :: URec (Ptr ()) p -> URec (Ptr ()) p -> URec (Ptr ()) p

min :: URec (Ptr ()) p -> URec (Ptr ()) p -> URec (Ptr ()) p

Generic (URec (Ptr ()) p) |
Instance details Defined in GHC.Generics Associated Types type Rep (URec (Ptr ()) p) :: Type -> Type Methods from :: URec (Ptr ()) p -> Rep (URec (Ptr ()) p) x to :: Rep (URec (Ptr ()) p) x -> URec (Ptr ()) p
data URec (Ptr ()) (p :: k) |

Instance details

Defined in GHC.Generics

data URec (Ptr ()) (p :: k) = UAddr {

- uAddr# :: Addr#

}

type Rep1 (URec (Ptr ()) :: k -> Type) |
Instance details Defined in GHC.Generics type Rep1 (URec (Ptr ()) :: k -> Type) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UAddr" 'PrefixI 'True) (S1 ('MetaSel ('Just "uAddr#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UAddr :: k -> Type)))
type Rep (URec (Ptr ()) p) |
Instance details Defined in GHC.Generics type Rep (URec (Ptr ()) p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UAddr" 'PrefixI 'True) (S1 ('MetaSel ('Just "uAddr#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UAddr :: Type -> Type)))