stdio-0.2.0.0: A simple and high performance IO toolkit for Haskell

Copyright(c) Dong Han 2019
LicenseBSD
Maintainerwinterland1989@gmail.com
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Std.Data.LEON

Description

LEON (Little Endian first Object Notation) is an efficiently serialization using simple binary encoding. As suggested by its name, default instances use little endian encoding, i.e. "Intel convention". We do provide instances for BE type which explicitly write wrapped value in big endian though. encoded data should be portable across machine endianness, word size, or compiler version within one major version. For example, data encoded using the LEON class could be written on any machine, and read back on any another using stdio packages with the same major version.

Synopsis

Documentation

class LEON a where Source #

LEON, Little Endian Object Notation.

Minimal complete definition

Nothing

Methods

encode :: a -> Builder () Source #

decode :: Parser a Source #

encode :: (Generic a, GLEONEncode (Rep a)) => a -> Builder () Source #

decode :: (Generic a, GLEONDecode (Rep a)) => Parser a Source #

Instances
LEON Bool Source # 
Instance details

Defined in Std.Data.LEON

LEON Char Source # 
Instance details

Defined in Std.Data.LEON

LEON Double Source # 
Instance details

Defined in Std.Data.LEON

LEON Float Source # 
Instance details

Defined in Std.Data.LEON

LEON Int Source # 
Instance details

Defined in Std.Data.LEON

LEON Int8 Source # 
Instance details

Defined in Std.Data.LEON

LEON Int16 Source # 
Instance details

Defined in Std.Data.LEON

LEON Int32 Source # 
Instance details

Defined in Std.Data.LEON

LEON Int64 Source # 
Instance details

Defined in Std.Data.LEON

LEON Integer Source # 
Instance details

Defined in Std.Data.LEON

LEON Natural Source # 
Instance details

Defined in Std.Data.LEON

LEON Ordering Source # 
Instance details

Defined in Std.Data.LEON

LEON Word Source # 
Instance details

Defined in Std.Data.LEON

LEON Word8 Source # 
Instance details

Defined in Std.Data.LEON

LEON Word16 Source # 
Instance details

Defined in Std.Data.LEON

LEON Word32 Source # 
Instance details

Defined in Std.Data.LEON

LEON Word64 Source # 
Instance details

Defined in Std.Data.LEON

LEON () Source # 
Instance details

Defined in Std.Data.LEON

Methods

encode :: () -> Builder () Source #

decode :: Parser () Source #

LEON Version Source #

Since: 0.8.0.0

Instance details

Defined in Std.Data.LEON

LEON All Source # 
Instance details

Defined in Std.Data.LEON

LEON Any Source # 
Instance details

Defined in Std.Data.LEON

LEON Fingerprint Source #

Since: 0.7.6.0

Instance details

Defined in Std.Data.LEON

LEON Text Source # 
Instance details

Defined in Std.Data.LEON

LEON CBytes Source # 
Instance details

Defined in Std.Data.LEON

LEON a => LEON [a] Source # 
Instance details

Defined in Std.Data.LEON

Methods

encode :: [a] -> Builder () Source #

decode :: Parser [a] Source #

LEON a => LEON (Maybe a) Source # 
Instance details

Defined in Std.Data.LEON

Methods

encode :: Maybe a -> Builder () Source #

decode :: Parser (Maybe a) Source #

LEON a => LEON (Min a) Source # 
Instance details

Defined in Std.Data.LEON

Methods

encode :: Min a -> Builder () Source #

decode :: Parser (Min a) Source #

LEON a => LEON (Max a) Source # 
Instance details

Defined in Std.Data.LEON

Methods

encode :: Max a -> Builder () Source #

decode :: Parser (Max a) Source #

LEON a => LEON (First a) Source # 
Instance details

Defined in Std.Data.LEON

Methods

encode :: First a -> Builder () Source #

decode :: Parser (First a) Source #

LEON a => LEON (Last a) Source # 
Instance details

Defined in Std.Data.LEON

Methods

encode :: Last a -> Builder () Source #

decode :: Parser (Last a) Source #

LEON m => LEON (WrappedMonoid m) Source # 
Instance details

Defined in Std.Data.LEON

LEON a => LEON (Option a) Source # 
Instance details

Defined in Std.Data.LEON

LEON a => LEON (Identity a) Source # 
Instance details

Defined in Std.Data.LEON

LEON a => LEON (First a) Source # 
Instance details

Defined in Std.Data.LEON

Methods

encode :: First a -> Builder () Source #

decode :: Parser (First a) Source #

LEON a => LEON (Last a) Source # 
Instance details

Defined in Std.Data.LEON

Methods

encode :: Last a -> Builder () Source #

decode :: Parser (Last a) Source #

LEON a => LEON (Dual a) Source #

Since: 0.8.4.0

Instance details

Defined in Std.Data.LEON

Methods

encode :: Dual a -> Builder () Source #

decode :: Parser (Dual a) Source #

LEON a => LEON (Sum a) Source # 
Instance details

Defined in Std.Data.LEON

Methods

encode :: Sum a -> Builder () Source #

decode :: Parser (Sum a) Source #

LEON a => LEON (Product a) Source # 
Instance details

Defined in Std.Data.LEON

LEON a => LEON (NonEmpty a) Source # 
Instance details

Defined in Std.Data.LEON

LEON (BE Char) Source # 
Instance details

Defined in Std.Data.LEON

LEON (BE Double) Source # 
Instance details

Defined in Std.Data.LEON

LEON (BE Float) Source # 
Instance details

Defined in Std.Data.LEON

LEON (BE Int) Source # 
Instance details

Defined in Std.Data.LEON

LEON (BE Int16) Source # 
Instance details

Defined in Std.Data.LEON

LEON (BE Int32) Source # 
Instance details

Defined in Std.Data.LEON

LEON (BE Int64) Source # 
Instance details

Defined in Std.Data.LEON

LEON (BE Word) Source # 
Instance details

Defined in Std.Data.LEON

LEON (BE Word16) Source # 
Instance details

Defined in Std.Data.LEON

LEON (BE Word32) Source # 
Instance details

Defined in Std.Data.LEON

LEON (BE Word64) Source # 
Instance details

Defined in Std.Data.LEON

(Prim a, LEON a) => LEON (PrimVector a) Source # 
Instance details

Defined in Std.Data.LEON

LEON a => LEON (Vector a) Source # 
Instance details

Defined in Std.Data.LEON

(LEON a, LEON b) => LEON (Either a b) Source # 
Instance details

Defined in Std.Data.LEON

Methods

encode :: Either a b -> Builder () Source #

decode :: Parser (Either a b) Source #

(LEON a, LEON b) => LEON (a, b) Source # 
Instance details

Defined in Std.Data.LEON

Methods

encode :: (a, b) -> Builder () Source #

decode :: Parser (a, b) Source #

(LEON a, LEON b) => LEON (Arg a b) Source # 
Instance details

Defined in Std.Data.LEON

Methods

encode :: Arg a b -> Builder () Source #

decode :: Parser (Arg a b) Source #

(LEON a, LEON b, LEON c) => LEON (a, b, c) Source # 
Instance details

Defined in Std.Data.LEON

Methods

encode :: (a, b, c) -> Builder () Source #

decode :: Parser (a, b, c) Source #

LEON (f a) => LEON (Alt f a) Source # 
Instance details

Defined in Std.Data.LEON

Methods

encode :: Alt f a -> Builder () Source #

decode :: Parser (Alt f a) Source #

(LEON a, LEON b, LEON c, LEON d) => LEON (a, b, c, d) Source # 
Instance details

Defined in Std.Data.LEON

Methods

encode :: (a, b, c, d) -> Builder () Source #

decode :: Parser (a, b, c, d) Source #

(LEON a, LEON b, LEON c, LEON d, LEON e) => LEON (a, b, c, d, e) Source # 
Instance details

Defined in Std.Data.LEON

Methods

encode :: (a, b, c, d, e) -> Builder () Source #

decode :: Parser (a, b, c, d, e) Source #

(LEON a, LEON b, LEON c, LEON d, LEON e, LEON f) => LEON (a, b, c, d, e, f) Source # 
Instance details

Defined in Std.Data.LEON

Methods

encode :: (a, b, c, d, e, f) -> Builder () Source #

decode :: Parser (a, b, c, d, e, f) Source #

(LEON a, LEON b, LEON c, LEON d, LEON e, LEON f, LEON g) => LEON (a, b, c, d, e, f, g) Source # 
Instance details

Defined in Std.Data.LEON

Methods

encode :: (a, b, c, d, e, f, g) -> Builder () Source #

decode :: Parser (a, b, c, d, e, f, g) Source #

(LEON a, LEON b, LEON c, LEON d, LEON e, LEON f, LEON g, LEON h) => LEON (a, b, c, d, e, f, g, h) Source # 
Instance details

Defined in Std.Data.LEON

Methods

encode :: (a, b, c, d, e, f, g, h) -> Builder () Source #

decode :: Parser (a, b, c, d, e, f, g, h) Source #

(LEON a, LEON b, LEON c, LEON d, LEON e, LEON f, LEON g, LEON h, LEON i) => LEON (a, b, c, d, e, f, g, h, i) Source # 
Instance details

Defined in Std.Data.LEON

Methods

encode :: (a, b, c, d, e, f, g, h, i) -> Builder () Source #

decode :: Parser (a, b, c, d, e, f, g, h, i) Source #

(LEON a, LEON b, LEON c, LEON d, LEON e, LEON f, LEON g, LEON h, LEON i, LEON j) => LEON (a, b, c, d, e, f, g, h, i, j) Source # 
Instance details

Defined in Std.Data.LEON

Methods

encode :: (a, b, c, d, e, f, g, h, i, j) -> Builder () Source #

decode :: Parser (a, b, c, d, e, f, g, h, i, j) Source #

newtype BE a Source #

big endianess wrapper

Constructors

BE 

Fields

Instances
Eq a => Eq (BE a) Source # 
Instance details

Defined in Std.Data.PrimArray.UnalignedAccess

Methods

(==) :: BE a -> BE a -> Bool #

(/=) :: BE a -> BE a -> Bool #

Show a => Show (BE a) Source # 
Instance details

Defined in Std.Data.PrimArray.UnalignedAccess

Methods

showsPrec :: Int -> BE a -> ShowS #

show :: BE a -> String #

showList :: [BE a] -> ShowS #

UnalignedAccess (BE Char) Source # 
Instance details

Defined in Std.Data.PrimArray.UnalignedAccess

UnalignedAccess (BE Double) Source # 
Instance details

Defined in Std.Data.PrimArray.UnalignedAccess

UnalignedAccess (BE Float) Source # 
Instance details

Defined in Std.Data.PrimArray.UnalignedAccess

UnalignedAccess (BE Int) Source # 
Instance details

Defined in Std.Data.PrimArray.UnalignedAccess

UnalignedAccess (BE Int16) Source # 
Instance details

Defined in Std.Data.PrimArray.UnalignedAccess

UnalignedAccess (BE Int32) Source # 
Instance details

Defined in Std.Data.PrimArray.UnalignedAccess

UnalignedAccess (BE Int64) Source # 
Instance details

Defined in Std.Data.PrimArray.UnalignedAccess

UnalignedAccess (BE Word) Source # 
Instance details

Defined in Std.Data.PrimArray.UnalignedAccess

UnalignedAccess (BE Word16) Source # 
Instance details

Defined in Std.Data.PrimArray.UnalignedAccess

UnalignedAccess (BE Word32) Source # 
Instance details

Defined in Std.Data.PrimArray.UnalignedAccess

UnalignedAccess (BE Word64) Source # 
Instance details

Defined in Std.Data.PrimArray.UnalignedAccess

LEON (BE Char) Source # 
Instance details

Defined in Std.Data.LEON

LEON (BE Double) Source # 
Instance details

Defined in Std.Data.LEON

LEON (BE Float) Source # 
Instance details

Defined in Std.Data.LEON

LEON (BE Int) Source # 
Instance details

Defined in Std.Data.LEON

LEON (BE Int16) Source # 
Instance details

Defined in Std.Data.LEON

LEON (BE Int32) Source # 
Instance details

Defined in Std.Data.LEON

LEON (BE Int64) Source # 
Instance details

Defined in Std.Data.LEON

LEON (BE Word) Source # 
Instance details

Defined in Std.Data.LEON

LEON (BE Word16) Source # 
Instance details

Defined in Std.Data.LEON

LEON (BE Word32) Source # 
Instance details

Defined in Std.Data.LEON

LEON (BE Word64) Source # 
Instance details

Defined in Std.Data.LEON