@@ -0,0 +1,53 @@
4+{-| Library for [bitwise operations](http://en.wikipedia.org/wiki/Bitwise_operation).
6+@docs and, or, xor, complement, shiftLeft, shiftRight, shiftRightLogical
11+{-| Performs the AND operation on each pair of bits.
13+and : Int -> Int -> Int
16+{-| Performs the OR operation on each pair of bits.
18+or : Int -> Int -> Int
21+{-| Performs the XOR operation on each pair of bits.
23+xor : Int -> Int -> Int
26+{-| Performs the NOT operation on each bit.
28+complement : Int -> Int
29+complement = Native.Bits.complement
31+{-| Shift bits to the left by a given offset, filling new bits with zeros.
33+shiftLeft : Int -> Int -> Int
34+shiftLeft = Native.Bits.shiftLeft
36+{-| Shift bits to the right by a given offset, filling new bits with
37+whatever is the topmost bit. This is an [arithmatic right
38+shift](http://en.wikipedia.org/wiki/Bitwise_operation#Arithmetic_shift),
39+often written (>>), and sometimes called a “sign-propagating”
40+right shift because it fills empty spots with copies of the highest bit.
42+shiftRight : Int -> Int -> Int
43+shiftRight = Native.Bits.shiftRightArithmatic
45+{-| Shift bits to the right by a given offset, filling new bits with
46+zeros. This is an [logical right
47+shift](http://en.wikipedia.org/wiki/Bitwise_operation#Logical_shift), often written (>>>),
48+and sometimes called a “zero-fill” right shift because it fills empty spots
51+shiftRightLogical : Int -> Int -> Int
52+shiftRightLogical = Native.Bits.shiftRightLogical