Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Bits functions.
Synopsis
- bit_pp :: Bool -> Char
- bits_pp :: [Bool] -> String
- gen_bitseq :: FiniteBits b => Int -> b -> [Bool]
- pack_bitseq :: Bits i => [Bool] -> i
- gen_bitseq_pp :: FiniteBits b => Int -> b -> String
Documentation
gen_bitseq :: FiniteBits b => Int -> b -> [Bool] Source #
Generate n place bit sequence for x.
pack_bitseq :: Bits i => [Bool] -> i Source #
Given bit sequence (most to least significant) generate Bits
value.
:set -XBinaryLiterals pack_bitseq [True,False,True,False] == 0b1010 pack_bitseq [True,False,False,True,False,False] == 0b100100 0b100100 == 36
gen_bitseq_pp :: FiniteBits b => Int -> b -> String Source #
bits_pp
of gen_bitseq
.
:set -XBinaryLiterals 0xF0 == 0b11110000 gen_bitseq_pp 8 (0xF0::Int) == "11110000"