columbia-0.1.3: Enhanced serialization for media that support seeking.

Safe HaskellTrustworthy
LanguageHaskell98

Data.Columbia.Types

Synopsis

Documentation

data SeekableStream m c Source #

Constructors

SeekableStream 

Fields

Instances

Functor m => Functor (SeekableStream m) Source # 

Methods

fmap :: (a -> b) -> SeekableStream m a -> SeekableStream m b #

(<$) :: a -> SeekableStream m b -> SeekableStream m a #

data SeekableWriter m c Source #

Constructors

SeekableWriter 

Fields

class Typeable t => RW t where Source #

The RW class describes operations that can locate entities in a stream by seeking, and also read and write primitive types.

Instances

(Typeable * k, Typeable * v) => RW (Pair k v) Source # 

data RWCtx a Source #

Constructors

RW a => RWCtx 

type PolyTraversal ctx m d = Proxy ctx -> (forall a. Data ctx a => ReaderT (SeekableStream m Word8) m a) -> ReaderT (SeekableStream m Word8) m d Source #

A PolyTraversal is a reader method over a data type, parameterized over a method to read components. It can be seen as a curried form of the gmapM operator from Data.Data, in like manner as the Traversal is a curried form of traverse.

type PolyTraversalW ctx m d = Proxy ctx -> (forall a. Data ctx a => a -> ReaderT (SeekableWriter m Word8) m ()) -> d -> ReaderT (SeekableWriter m Word8) m () Source #

This is a variant of PolyTraversal purposed for writing. By convention, strategies with this type require the stream to be seeked at an *address*, which the strategy will then dereference to access the corresponding data.

data LazyFix f Source #

The standard Fix constructor is too strict for some things this library has to do, hence the alias.

Constructors

LazyFix (Rep f (LazyFix f)) 

data LazyMap k v Source #

This type alias exposes an alternate view of the data constructors of a dictionary type. Why break abstraction????because I need the structure sharing.

Instances

(Eq v, Eq k) => Eq (LazyMap k v) Source # 

Methods

(==) :: LazyMap k v -> LazyMap k v -> Bool #

(/=) :: LazyMap k v -> LazyMap k v -> Bool #

(Ord v, Ord k) => Ord (LazyMap k v) Source # 

Methods

compare :: LazyMap k v -> LazyMap k v -> Ordering #

(<) :: LazyMap k v -> LazyMap k v -> Bool #

(<=) :: LazyMap k v -> LazyMap k v -> Bool #

(>) :: LazyMap k v -> LazyMap k v -> Bool #

(>=) :: LazyMap k v -> LazyMap k v -> Bool #

max :: LazyMap k v -> LazyMap k v -> LazyMap k v #

min :: LazyMap k v -> LazyMap k v -> LazyMap k v #

(Show v, Show k) => Show (LazyMap k v) Source # 

Methods

showsPrec :: Int -> LazyMap k v -> ShowS #

show :: LazyMap k v -> String #

showList :: [LazyMap k v] -> ShowS #

class KeyComparable t where Source #

isKeyed may always return false, but if it returns true ever, keyCompare must be well-defined and a valid equivalence relation on values for which isKeyed returns true (i.e. where all values concerned have isKeyed x=true). The default is to have isKeyed return false on all values.

Methods

isKeyed :: t -> Bool Source #

keyCompare :: t -> t -> Ordering Source #

Instances

Ord k => KeyComparable (Pair k v) Source # 

Methods

isKeyed :: Pair k v -> Bool Source #

keyCompare :: Pair k v -> Pair k v -> Ordering Source #

data KeyCtx t Source #

Constructors

KeyComparable t => KeyCtx 

data WithAddress t Source #

Data type for a piece of data that may or may not have an explicit address associated with it. This is nice because I can play with these in pure code to manipulate data, while still remembering all of the explicit term structure.

Constructors

WithAddress Pointer t 

data Header Source #

Constructors

Header !Word8 !ConIndex !Int