This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qualified Data.Vector.Unboxed as V | |
import Data.Bits(setBit) | |
import Data.Word(Word8) | |
main :: IO () | |
main = do | |
assertEqual 0x8c $ byte (bitsLE "0011" V.++ bitsLE "0001") | |
putStrLn "passed" | |
-- Create a bit-vector from a little-endian string of 1's and 0's |