binary-generic-combinators-0.4.0.0: Combinators and utilities to make Generic-based deriving of Binary easier and more expressive
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Binary.Combinators

Documentation

newtype Many a Source #

Constructors

Many 

Fields

Instances

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

Defined in Data.Binary.Combinators

Methods

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

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

Ord a => Ord (Many a) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

compare :: Many a -> Many a -> Ordering #

(<) :: Many a -> Many a -> Bool #

(<=) :: Many a -> Many a -> Bool #

(>) :: Many a -> Many a -> Bool #

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

max :: Many a -> Many a -> Many a #

min :: Many a -> Many a -> Many a #

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

Defined in Data.Binary.Combinators

Methods

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

show :: Many a -> String #

showList :: [Many a] -> ShowS #

Arbitrary a => Arbitrary (Many a) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

arbitrary :: Gen (Many a) #

shrink :: Many a -> [Many a] #

Binary a => Binary (Many a) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

put :: Many a -> Put #

get :: Get (Many a) #

putList :: [Many a] -> Put #

newtype Some a Source #

Constructors

Some 

Fields

Instances

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

Defined in Data.Binary.Combinators

Methods

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

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

Ord a => Ord (Some a) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

compare :: Some a -> Some a -> Ordering #

(<) :: Some a -> Some a -> Bool #

(<=) :: Some a -> Some a -> Bool #

(>) :: Some a -> Some a -> Bool #

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

max :: Some a -> Some a -> Some a #

min :: Some a -> Some a -> Some a #

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

Defined in Data.Binary.Combinators

Methods

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

show :: Some a -> String #

showList :: [Some a] -> ShowS #

Arbitrary a => Arbitrary (Some a) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

arbitrary :: Gen (Some a) #

shrink :: Some a -> [Some a] #

Binary a => Binary (Some a) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

put :: Some a -> Put #

get :: Get (Some a) #

putList :: [Some a] -> Put #

newtype CountedBy ty a Source #

Constructors

CountedBy 

Fields

Instances

Instances details
Eq a => Eq (CountedBy ty a) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

(==) :: CountedBy ty a -> CountedBy ty a -> Bool #

(/=) :: CountedBy ty a -> CountedBy ty a -> Bool #

Ord a => Ord (CountedBy ty a) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

compare :: CountedBy ty a -> CountedBy ty a -> Ordering #

(<) :: CountedBy ty a -> CountedBy ty a -> Bool #

(<=) :: CountedBy ty a -> CountedBy ty a -> Bool #

(>) :: CountedBy ty a -> CountedBy ty a -> Bool #

(>=) :: CountedBy ty a -> CountedBy ty a -> Bool #

max :: CountedBy ty a -> CountedBy ty a -> CountedBy ty a #

min :: CountedBy ty a -> CountedBy ty a -> CountedBy ty a #

Show a => Show (CountedBy ty a) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

showsPrec :: Int -> CountedBy ty a -> ShowS #

show :: CountedBy ty a -> String #

showList :: [CountedBy ty a] -> ShowS #

Arbitrary a => Arbitrary (CountedBy ty a) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

arbitrary :: Gen (CountedBy ty a) #

shrink :: CountedBy ty a -> [CountedBy ty a] #

(Integral ty, Binary ty, Binary a) => Binary (CountedBy ty a) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

put :: CountedBy ty a -> Put #

get :: Get (CountedBy ty a) #

putList :: [CountedBy ty a] -> Put #

data SkipCount ty (n :: Nat) Source #

Constructors

SkipCount 

Instances

Instances details
Eq (SkipCount ty n) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

(==) :: SkipCount ty n -> SkipCount ty n -> Bool #

(/=) :: SkipCount ty n -> SkipCount ty n -> Bool #

Ord (SkipCount ty n) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

compare :: SkipCount ty n -> SkipCount ty n -> Ordering #

(<) :: SkipCount ty n -> SkipCount ty n -> Bool #

(<=) :: SkipCount ty n -> SkipCount ty n -> Bool #

(>) :: SkipCount ty n -> SkipCount ty n -> Bool #

(>=) :: SkipCount ty n -> SkipCount ty n -> Bool #

max :: SkipCount ty n -> SkipCount ty n -> SkipCount ty n #

min :: SkipCount ty n -> SkipCount ty n -> SkipCount ty n #

Show (SkipCount ty n) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

showsPrec :: Int -> SkipCount ty n -> ShowS #

show :: SkipCount ty n -> String #

showList :: [SkipCount ty n] -> ShowS #

Arbitrary (SkipCount ty n) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

arbitrary :: Gen (SkipCount ty n) #

shrink :: SkipCount ty n -> [SkipCount ty n] #

(Num ty, Binary ty, KnownNat n) => Binary (SkipCount ty n) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

put :: SkipCount ty n -> Put #

get :: Get (SkipCount ty n) #

putList :: [SkipCount ty n] -> Put #

data SkipByte (n :: Nat) Source #

Constructors

SkipByte 

Instances

Instances details
Eq (SkipByte n) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

(==) :: SkipByte n -> SkipByte n -> Bool #

(/=) :: SkipByte n -> SkipByte n -> Bool #

Ord (SkipByte n) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

compare :: SkipByte n -> SkipByte n -> Ordering #

(<) :: SkipByte n -> SkipByte n -> Bool #

(<=) :: SkipByte n -> SkipByte n -> Bool #

(>) :: SkipByte n -> SkipByte n -> Bool #

(>=) :: SkipByte n -> SkipByte n -> Bool #

max :: SkipByte n -> SkipByte n -> SkipByte n #

min :: SkipByte n -> SkipByte n -> SkipByte n #

Show (SkipByte n) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

showsPrec :: Int -> SkipByte n -> ShowS #

show :: SkipByte n -> String #

showList :: [SkipByte n] -> ShowS #

Arbitrary (SkipByte n) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

arbitrary :: Gen (SkipByte n) #

shrink :: SkipByte n -> [SkipByte n] #

KnownNat n => Binary (SkipByte n) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

put :: SkipByte n -> Put #

get :: Get (SkipByte n) #

putList :: [SkipByte n] -> Put #

data MatchBytes :: Symbol -> [Nat] -> Type Source #

Instances

Instances details
Eq (MatchBytes s ns) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

(==) :: MatchBytes s ns -> MatchBytes s ns -> Bool #

(/=) :: MatchBytes s ns -> MatchBytes s ns -> Bool #

Ord (MatchBytes s ns) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

compare :: MatchBytes s ns -> MatchBytes s ns -> Ordering #

(<) :: MatchBytes s ns -> MatchBytes s ns -> Bool #

(<=) :: MatchBytes s ns -> MatchBytes s ns -> Bool #

(>) :: MatchBytes s ns -> MatchBytes s ns -> Bool #

(>=) :: MatchBytes s ns -> MatchBytes s ns -> Bool #

max :: MatchBytes s ns -> MatchBytes s ns -> MatchBytes s ns #

min :: MatchBytes s ns -> MatchBytes s ns -> MatchBytes s ns #

Show (MatchBytes ctx ns) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

showsPrec :: Int -> MatchBytes ctx ns -> ShowS #

show :: MatchBytes ctx ns -> String #

showList :: [MatchBytes ctx ns] -> ShowS #

MatchBytesSing ctx ns => Arbitrary (MatchBytes ctx ns) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

arbitrary :: Gen (MatchBytes ctx ns) #

shrink :: MatchBytes ctx ns -> [MatchBytes ctx ns] #

(KnownSymbol ctx, KnownNat n, Binary (MatchBytes ctx ns)) => Binary (MatchBytes ctx (n ': ns)) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

put :: MatchBytes ctx (n ': ns) -> Put #

get :: Get (MatchBytes ctx (n ': ns)) #

putList :: [MatchBytes ctx (n ': ns)] -> Put #

Binary (MatchBytes ctx ('[] :: [Nat])) Source # 
Instance details

Defined in Data.Binary.Combinators

Methods

put :: MatchBytes ctx '[] -> Put #

get :: Get (MatchBytes ctx '[]) #

putList :: [MatchBytes ctx '[]] -> Put #

matchBytes :: MatchBytesSing ctx ns => MatchBytes ctx ns Source #