Module

Data.Binary.UnsignedInt

Package
purescript-binary
Repository
Unisay/purescript-binary

#UnsignedInt Source

newtype UnsignedInt b

Instances

#magnitude Source

magnitude :: forall b. UnsignedInt b -> b

#takeUnsignedInt Source

takeUnsignedInt :: forall b. Pos b => Bits -> UnsignedInt b

#fromInt Source

fromInt :: forall b. Pos b => GtEq b D31 => b -> Int -> UnsignedInt b

Converts Int value to UnsignedInt b for b >= 31 Behavior for negative Int values is unspecified.

#toInt Source

toInt :: forall b. Pos b => Lt b D32 => UnsignedInt b -> Int

#asBits Source

asBits :: forall b a. Pos a => Pos b => Lt a b => UnsignedInt a -> UnsignedInt b

#tryAsBits Source

tryAsBits :: forall b a. Pos a => Pos b => Gt a b => UnsignedInt a -> Maybe (UnsignedInt b)

#divModUnsigned Source