binrep-0.8.0: Encode precise binary representations directly in types
Safe HaskellSafe-Inferred
LanguageGHC2021

Binrep.Type.Sized

Description

Constant-size data.

Synopsis

Documentation

data Size (n :: Natural) Source #

Essentially runtime reflection of a BLen type to CBLen.

Instances

Instances details
(BLen a, KnownNat n) => Predicate (Size n :: Type) a Source # 
Instance details

Defined in Binrep.Type.Sized

Methods

validate :: Proxy (Size n) -> a -> Maybe RefineException #

IsCBLen (Sized n a :: Type) Source # 
Instance details

Defined in Binrep.Type.Sized

Associated Types

type CBLen (Sized n a) :: Natural Source #

KnownNat n => BLen (Sized n a) Source # 
Instance details

Defined in Binrep.Type.Sized

Methods

blen :: Sized n a -> Int Source #

(Get a, KnownNat n) => Get (Sized n a) Source # 
Instance details

Defined in Binrep.Type.Sized

Methods

get :: Getter (Sized n a) Source #

Put a => Put (Sized n a) Source # 
Instance details

Defined in Binrep.Type.Sized

Methods

put :: Sized n a -> Putter Source #

PutC a => PutC (Sized n a) Source # 
Instance details

Defined in Binrep.Type.Sized

Methods

putC :: Sized n a -> PutterC Source #

type CBLen (Sized n a :: Type) Source # 
Instance details

Defined in Binrep.Type.Sized

type CBLen (Sized n a :: Type) = n

type Sized n = Refined (Size n) Source #