halves-0.1.0.1: Split or combine data structures to and from halves, quarters, eighths

Safe HaskellSafe
LanguageHaskell2010

Data.Halves

Documentation

class Halves a b | a -> b, b -> a where Source #

Minimal complete definition

halves

Methods

halves :: Iso' a (b, b) Source #

Instances
Halves Int16 Int8 Source # 
Instance details

Defined in Data.Halves

Halves Int32 Int16 Source # 
Instance details

Defined in Data.Halves

Halves Int64 Int32 Source # 
Instance details

Defined in Data.Halves

Halves Word16 Word8 Source # 
Instance details

Defined in Data.Halves

Halves Word32 Word16 Source # 
Instance details

Defined in Data.Halves

Halves Word64 Word32 Source # 
Instance details

Defined in Data.Halves

quarters :: (Halves a b, Halves b c) => Iso' a (c, c, c, c) Source #

eighths :: (Halves a b, Halves b c, Halves c d) => Iso' a (d, d, d, d, d, d, d, d) Source #

upperHalf :: Halves a b => Lens' a b Source #

lowerHalf :: Halves a b => Lens' a b Source #

chunkHalves :: Halves a b => Iso' [b] ([a], [b]) Source #

chunkQuarters :: (Halves a b, Halves b c) => Iso' [c] ([a], [c]) Source #

chunkEighths :: (Halves a b, Halves b c, Halves c d) => Iso' [d] ([a], [d]) Source #

collectHalves :: Halves a b => Lens' [b] [a] Source #

collectQuarters :: (Halves a b, Halves b c) => Lens' [c] [a] Source #

collectEighths :: (Halves a b, Halves b c, Halves c d) => Lens' [d] [a] Source #

finiteBitHalves :: forall a b c. (Integral a, Integral b, Integral c, Bits a, AsFiniteBits b c) => Iso' a (b, b) Source #