compact-sequences- Stacks, queues, and deques with compact representations.

Safe HaskellSafe



Array sizes with phantom types. We use a very primitive arrangement because that's all we need for now: the base type is Sz1, Sz2, etc., and it's doubled as many times as necessary by applying the Twice constructor. The base value is sz1, sz2, etc., and it's doubled by applying the twice function.


data Twice a Source #

data Sz1 Source #

data Sz2 Source #

data Sz3 Source #

data Sz4 Source #

data Sz5 Source #

data Sz6 Source #

data Sz7 Source #

data Sz8 Source #

data Sz9 Source #

newtype Size n Source #


Size Int 

twice :: Size n -> Size (Twice n) Source #

half :: Size (Twice m) -> Size m Source #