Copyright | (c) Galois Inc 2011-2016 |
---|---|
License | BSD3 |
Maintainer | Rob Dockins <rdockins@galois.com> |
Stability | provisional |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- newtype Bytes = Bytes {}
- type Addr = Bytes
- type Offset = Bytes
- bytesToBits :: Bytes -> Natural
- bytesToNatural :: Bytes -> Natural
- bytesToInteger :: Bytes -> Integer
- bytesToBV :: NatRepr w -> Bytes -> BV w
- toBytes :: Integral a => a -> Bytes
- bitsToBytes :: Integral a => a -> Bytes
- natBytesMul :: Natural -> Bytes -> Bytes
Bytes
A newtype for expressing numbers of bytes. This newtype is explicitly introduced to avoid confusion between widths expressed as numbers of bits vs numbers of bytes.
bytesToBits :: Bytes -> Natural Source #
bytesToNatural :: Bytes -> Natural Source #
bytesToInteger :: Bytes -> Integer Source #
bitsToBytes :: Integral a => a -> Bytes Source #