Copyright | Copyright (C) 2004-2011 John Goerzen |
---|---|
License | BSD3 |
Maintainer | John Goerzen <jgoerzen@complete.org> |
Stability | provisional |
Portability | portable to platforms with rawSystem |
Safe Haskell | None |
Language | Haskell98 |
Bit-related utilities
Written by John Goerzen, jgoerzen@complete.org
Documentation
getBytes :: (Integral a, Bounded a, Bits a) => a -> [a] Source
Returns a list representing the bytes that comprise a data type.
Example:
getBytes (0x12345678::Int) -> [0x12, 0x34, 0x56, 0x78]