Safe Haskell | None |
---|---|
Language | Haskell2010 |
Pantry.Internal.StaticBytes
Description
This is an unstable API, exposed only for testing. Relying on this may break your code! Caveat emptor.
This module can (and perhaps should) be separate into its own package, it's generally useful.
Documentation
Instances
Eq Bytes8 Source # | |
Data Bytes8 Source # | |
Defined in Pantry.Internal.StaticBytes Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Bytes8 -> c Bytes8 Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Bytes8 Source # toConstr :: Bytes8 -> Constr Source # dataTypeOf :: Bytes8 -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Bytes8) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Bytes8) Source # gmapT :: (forall b. Data b => b -> b) -> Bytes8 -> Bytes8 Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Bytes8 -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Bytes8 -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Bytes8 -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Bytes8 -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Bytes8 -> m Bytes8 Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Bytes8 -> m Bytes8 Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Bytes8 -> m Bytes8 Source # | |
Ord Bytes8 Source # | |
Show Bytes8 Source # | |
Generic Bytes8 Source # | |
NFData Bytes8 Source # | |
Defined in Pantry.Internal.StaticBytes | |
Hashable Bytes8 Source # | |
Defined in Pantry.Internal.StaticBytes | |
ByteArrayAccess Bytes8 Source # | |
StaticBytes Bytes8 Source # | |
type Rep Bytes8 Source # | |
Defined in Pantry.Internal.StaticBytes |
Instances
Instances
Instances
Instances
class DynamicBytes dbytes Source #
Minimal complete definition
lengthD, withPeekD, fromWordsD
Instances
DynamicBytes ByteString Source # | |
Defined in Pantry.Internal.StaticBytes Methods lengthD :: ByteString -> Int withPeekD :: ByteString -> ((Int -> IO Word64) -> IO a) -> IO a fromWordsD :: Int -> [Word64] -> ByteString | |
word8 ~ Word8 => DynamicBytes (Vector word8) Source # | |
word8 ~ Word8 => DynamicBytes (Vector word8) Source # | |
word8 ~ Word8 => DynamicBytes (Vector word8) Source # | |
class StaticBytes sbytes Source #
Minimal complete definition
lengthS, toWordsS, usePeekS
data StaticBytesException Source #
Constructors
NotEnoughBytes | |
TooManyBytes |
Instances
Eq StaticBytesException Source # | |
Defined in Pantry.Internal.StaticBytes Methods (==) :: StaticBytesException -> StaticBytesException -> Bool Source # (/=) :: StaticBytesException -> StaticBytesException -> Bool Source # | |
Show StaticBytesException Source # | |
Defined in Pantry.Internal.StaticBytes | |
Exception StaticBytesException Source # | |
Defined in Pantry.Internal.StaticBytes |
toStaticExact :: forall dbytes sbytes. (DynamicBytes dbytes, StaticBytes sbytes) => dbytes -> Either StaticBytesException sbytes Source #
toStaticPad :: forall dbytes sbytes. (DynamicBytes dbytes, StaticBytes sbytes) => dbytes -> Either StaticBytesException sbytes Source #
toStaticTruncate :: forall dbytes sbytes. (DynamicBytes dbytes, StaticBytes sbytes) => dbytes -> Either StaticBytesException sbytes Source #
toStaticPadTruncate :: (DynamicBytes dbytes, StaticBytes sbytes) => dbytes -> sbytes Source #
fromStatic :: forall dbytes sbytes. (DynamicBytes dbytes, StaticBytes sbytes) => sbytes -> dbytes Source #