@@ -1,5 +1,5 @@
2−module Bits where
2+module Bitwise where
4{-| Library for [bitwise operations](http://en.wikipedia.org/wiki/Bitwise_operation).
4{-| Library for [bitwise operations](http://en.wikipedia.org/wiki/Bitwise_operation).
@@ -12,27 +12,27 @@ module Bits where
12@docs shiftLeft, shiftRight, shiftRightLogical
12@docs shiftLeft, shiftRight, shiftRightLogical
15−import Native.Bits
15+import Native.Bitwise
17{-| Bitwise “and”
17{-| Bitwise “and”
19and : Int -> Int -> Int
19and : Int -> Int -> Int
20−and = Native.Bits.and
20+and = Native.Bitwise.and
22{-| Bitwise “or”
22{-| Bitwise “or”
24or : Int -> Int -> Int
24or : Int -> Int -> Int
25−or = Native.Bits.or
25+or = Native.Bitwise.or
27{-| Bitwise “xor”
27{-| Bitwise “xor”
29xor : Int -> Int -> Int
29xor : Int -> Int -> Int
30−xor = Native.Bits.xor
30+xor = Native.Bitwise.xor
32{-| Flip each bit individually, often called “bitwise not”
32{-| Flip each bit individually, often called “bitwise not”
34complement : Int -> Int
34complement : Int -> Int
35−complement = Native.Bits.complement
35+complement = Native.Bitwise.complement
37{-| Shift bits to the left by a given offset, filling new bits with zeros.
37{-| Shift bits to the left by a given offset, filling new bits with zeros.
38This can be used to multiply numbers by powers of two.
38This can be used to multiply numbers by powers of two.
@@ -41,7 +41,7 @@ This can be used to multiply numbers by powers of two.
41 8 `shiftLeft` 2 == 32
41 8 `shiftLeft` 2 == 32
43shiftLeft : Int -> Int -> Int
43shiftLeft : Int -> Int -> Int
44−shiftLeft = Native.Bits.shiftLeft
44+shiftLeft = Native.Bitwise.shiftLeft
46{-| Shift bits to the right by a given offset, filling new bits with
46{-| Shift bits to the right by a given offset, filling new bits with
47whatever is the topmost bit. This can be used to divide numbers by powers of two.
47whatever is the topmost bit. This can be used to divide numbers by powers of two.
@@ -56,7 +56,7 @@ often written (>>), and sometimes called a “sign-propagating”
56right shift because it fills empty spots with copies of the highest bit.
56right shift because it fills empty spots with copies of the highest bit.
58shiftRight : Int -> Int -> Int
58shiftRight : Int -> Int -> Int
59−shiftRight = Native.Bits.shiftRightArithmatic
59+shiftRight = Native.Bitwise.shiftRightArithmatic
61{-| Shift bits to the right by a given offset, filling new bits with
61{-| Shift bits to the right by a given offset, filling new bits with
@@ -71,5 +71,5 @@ and sometimes called a “zero-fill” right shift because it fills empt
71with zeros.
71with zeros.
73shiftRightLogical : Int -> Int -> Int
73shiftRightLogical : Int -> Int -> Int
74−shiftRightLogical = Native.Bits.shiftRightLogical
74+shiftRightLogical = Native.Bitwise.shiftRightLogical