large-hashable-0.1.1.0: Efficiently hash (large) Haskell values
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.LargeHashable.LargeWord

Description

Efficient representation for small bytearrays with 128 or 256 bits.

Synopsis

Documentation

data Word128 Source #

Constructors

Word128 

Instances

Instances details
Data Word128 Source # 
Instance details

Defined in Data.LargeHashable.LargeWord

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word128 -> c Word128 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word128 #

toConstr :: Word128 -> Constr #

dataTypeOf :: Word128 -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word128) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word128) #

gmapT :: (forall b. Data b => b -> b) -> Word128 -> Word128 #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word128 -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word128 -> r #

gmapQ :: (forall d. Data d => d -> u) -> Word128 -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Word128 -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word128 -> m Word128 #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word128 -> m Word128 #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word128 -> m Word128 #

Generic Word128 Source # 
Instance details

Defined in Data.LargeHashable.LargeWord

Associated Types

type Rep Word128 :: Type -> Type #

Methods

from :: Word128 -> Rep Word128 x #

to :: Rep Word128 x -> Word128 #

Read Word128 Source # 
Instance details

Defined in Data.LargeHashable.LargeWord

Show Word128 Source # 
Instance details

Defined in Data.LargeHashable.LargeWord

Eq Word128 Source # 
Instance details

Defined in Data.LargeHashable.LargeWord

Methods

(==) :: Word128 -> Word128 -> Bool #

(/=) :: Word128 -> Word128 -> Bool #

Ord Word128 Source # 
Instance details

Defined in Data.LargeHashable.LargeWord

type Rep Word128 Source # 
Instance details

Defined in Data.LargeHashable.LargeWord

type Rep Word128 = D1 ('MetaData "Word128" "Data.LargeHashable.LargeWord" "large-hashable-0.1.1.0-FnYsWabf22GKIEaudEP0If" 'False) (C1 ('MetaCons "Word128" 'PrefixI 'True) (S1 ('MetaSel ('Just "w128_first") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64) :*: S1 ('MetaSel ('Just "w128_second") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64)))

data Word256 Source #

Constructors

Word256 

Instances

Instances details
Data Word256 Source # 
Instance details

Defined in Data.LargeHashable.LargeWord

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word256 -> c Word256 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word256 #

toConstr :: Word256 -> Constr #

dataTypeOf :: Word256 -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word256) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word256) #

gmapT :: (forall b. Data b => b -> b) -> Word256 -> Word256 #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word256 -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word256 -> r #

gmapQ :: (forall d. Data d => d -> u) -> Word256 -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Word256 -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word256 -> m Word256 #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word256 -> m Word256 #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word256 -> m Word256 #

Generic Word256 Source # 
Instance details

Defined in Data.LargeHashable.LargeWord

Associated Types

type Rep Word256 :: Type -> Type #

Methods

from :: Word256 -> Rep Word256 x #

to :: Rep Word256 x -> Word256 #

Read Word256 Source # 
Instance details

Defined in Data.LargeHashable.LargeWord

Show Word256 Source # 
Instance details

Defined in Data.LargeHashable.LargeWord

Eq Word256 Source # 
Instance details

Defined in Data.LargeHashable.LargeWord

Methods

(==) :: Word256 -> Word256 -> Bool #

(/=) :: Word256 -> Word256 -> Bool #

Ord Word256 Source # 
Instance details

Defined in Data.LargeHashable.LargeWord

type Rep Word256 Source # 
Instance details

Defined in Data.LargeHashable.LargeWord

type Rep Word256 = D1 ('MetaData "Word256" "Data.LargeHashable.LargeWord" "large-hashable-0.1.1.0-FnYsWabf22GKIEaudEP0If" 'False) (C1 ('MetaCons "Word256" 'PrefixI 'True) (S1 ('MetaSel ('Just "w256_first") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word128) :*: S1 ('MetaSel ('Just "w256_second") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word128)))

bsToW128 :: ByteString -> Word128 Source #

Converts a ByteString into a Word128. Only the first 16 bytes are taken into account, the rest is ignored.

bsToW256 :: ByteString -> Word256 Source #

Converts a ByteString into a Word256. Only the first 32 bytes are taken into account, the rest is ignored.