| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
ZM.BLOB
- data BLOB encoding = BLOB {
- encoding :: encoding
- content :: ByteString
- blob :: AsByteString a => encoding -> a -> BLOB encoding
- unblob :: BLOB t -> ByteString
- data TypedBLOB = TypedBLOB AbsType (BLOB FlatEncoding)
- typedBLOB :: forall a. (Model a, Flat a) => a -> TypedBLOB
- typedBLOB_ :: Flat a => AbsType -> a -> TypedBLOB
- untypedBLOB :: forall a. (Flat a, Model a) => Decoded TypedBLOB -> TypedDecoded a
- data TypedValue a = TypedValue AbsType a
- typedValue :: forall a. Model a => a -> TypedValue a
- untypedValue :: Model a => Decoded (TypedValue a) -> TypedDecoded a
- typeErr :: AbsType -> AbsType -> TypedDecoded a
Documentation
A BLOB is binary value encoded according to a specified encoding (e.g. UTF8)
Constructors
| BLOB | |
Fields
| |
Instances
| Eq encoding => Eq (BLOB encoding) Source # | |
| Ord encoding => Ord (BLOB encoding) Source # | |
| Show encoding => Show (BLOB encoding) Source # | |
| Generic (BLOB encoding) Source # | |
| NFData encoding => NFData (BLOB encoding) Source # | |
| Flat encoding => Flat (BLOB encoding) Source # | |
| Model encoding => Model (BLOB encoding) Source # | |
| type Rep (BLOB encoding) Source # | |
blob :: AsByteString a => encoding -> a -> BLOB encoding Source #
Build a BLOB from an encoding and a ByteString-like value
unblob :: BLOB t -> ByteString Source #
Extract the binary content of a BLOB
A typed value, a Flat encoded value and its absolute type
Constructors
| TypedBLOB AbsType (BLOB FlatEncoding) |
typedBLOB_ :: Flat a => AbsType -> a -> TypedBLOB Source #
Build a TypedBLOB out of a type and a value
untypedBLOB :: forall a. (Flat a, Model a) => Decoded TypedBLOB -> TypedDecoded a Source #
Type-checked extraction of a value of a known type from a decoded TypedBLOB
data TypedValue a Source #
A typed value, a value and its absolute type
Constructors
| TypedValue AbsType a |
Instances
| Functor TypedValue Source # | |
| Eq a => Eq (TypedValue a) Source # | |
| Ord a => Ord (TypedValue a) Source # | |
| Show a => Show (TypedValue a) Source # | |
| Generic (TypedValue a) Source # | |
| NFData a => NFData (TypedValue a) Source # | |
| Flat a => Flat (TypedValue a) Source # | |
| type Rep (TypedValue a) Source # | |
typedValue :: forall a. Model a => a -> TypedValue a Source #
Build a TypedValue out of a value
untypedValue :: Model a => Decoded (TypedValue a) -> TypedDecoded a Source #
Type-checked extraction of a value of a known type from a decoded TypedValue