lambdabot-utils-4.2.1: Utility libraries for the advanced IRC bot, Lambdabot

Lambdabot.Serial

Description

Serialisation

Synopsis

Documentation

data Serial s Source

Constructors

Serial 

stdSerial :: (Show s, Read s) => Serial sSource

Default `instance' for a Serial

mapSerial :: (Ord k, Show k, Show v, Read k, Read v) => Serial (Map k v)Source

Serializes a Map type if both the key and the value are instances of Read and Show. The serialization is done by converting the map to and from lists. Results are saved line-wise, for better editing and revison control.

listSerial :: (Read a, Show a) => Serial [a]Source

Serialize a list of as. As for the mapSerializer, its output is line-wise.

readM :: (Monad m, Read a) => String -> m aSource

readM behaves like read, but catches failure in a monad. this allocates a 20-30 M on startup...

class Packable t whereSource

Instances

Packable [(ByteString, ByteString)] 
Packable (Map ByteString [ByteString])

An instance for Map Packed [Packed] uses gzip compression

Packable (Map ByteString (Bool, [(String, Int)])) 
Packable (Map ByteString ByteString)