-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Unaligned access to primitive arrays
--   
--   Unaligned access to primitive arrays. The offsets are given in bytes
--   rather than elements.
@package primitive-unaligned
@version 0.1.1.2

module Data.Primitive.ByteArray.Unaligned

-- | Class of types supporting primitive array operations that are not
--   necessarily aligned. The offsets for all of the typeclass methods are
--   interpreted as bytes, not elements.
class PrimUnaligned a
indexUnalignedByteArray# :: PrimUnaligned a => ByteArray# -> Int# -> a
readUnalignedByteArray# :: PrimUnaligned a => MutableByteArray# s -> Int# -> State# s -> (# State# s, a #)
writeUnalignedByteArray# :: PrimUnaligned a => MutableByteArray# s -> Int# -> a -> State# s -> State# s

-- | Read a primitive value from the byte array. The offset is given in
--   bytes rather than in elements of type a.
indexUnalignedByteArray :: PrimUnaligned a => ByteArray -> Int -> a

-- | Read a primitive value from the byte array. The offset is given in
--   bytes rather than in elements of type a.
readUnalignedByteArray :: (PrimMonad m, PrimUnaligned a) => MutableByteArray (PrimState m) -> Int -> m a

-- | Write a primitive value to the byte array. The offset is given in
--   bytes rather than in elements of type a.
writeUnalignedByteArray :: (PrimMonad m, PrimUnaligned a) => MutableByteArray (PrimState m) -> Int -> a -> m ()
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Internal.Foreign.C.Types.CChar
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Internal.System.Posix.Types.CDev
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Internal.Foreign.C.Types.CDouble
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Internal.System.Posix.Types.CIno
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Internal.Foreign.C.Types.CInt
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Internal.Foreign.C.Types.CLLong
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Internal.Foreign.C.Types.CLong
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Internal.System.Posix.Types.CMode
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Internal.System.Posix.Types.COff
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Internal.System.Posix.Types.CPid
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Internal.Foreign.C.Types.CSChar
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Internal.Foreign.C.Types.CShort
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Internal.System.Posix.Types.CSsize
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Internal.Foreign.C.Types.CUInt
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Internal.Foreign.C.Types.CULLong
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Internal.Foreign.C.Types.CULong
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Types.Char
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Types.Double
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Internal.System.Posix.Types.Fd
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Types.Float
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Types.Int
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Internal.Int.Int16
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Internal.Int.Int32
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Internal.Int.Int64
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Internal.Int.Int8
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned (GHC.Internal.Ptr.Ptr a)
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Types.Word
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Internal.Word.Word16
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Internal.Word.Word32
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Internal.Word.Word64
instance Data.Primitive.ByteArray.Unaligned.PrimUnaligned GHC.Internal.Word.Word8
