module Data.EnumBitSet.Utility where

import qualified Data.Bits as B
import Data.Bits (Bits, bit, xor, (.&.), )


-- fixity like .&.
infixl 7 .-.

(.-.) :: (Bits w) => w -> w -> w
w
x .-. :: w -> w -> w
.-. w
y = w
x w -> w -> w
forall a. Bits a => a -> a -> a
.&. w -> w
forall a. Bits a => a -> a
B.complement w
y

empty :: (Bits w) => w
empty :: w
empty = w -> w -> w
forall a. Bits a => a -> a -> a
xor (Int -> w
forall a. Bits a => Int -> a
bit Int
0) (Int -> w
forall a. Bits a => Int -> a
bit Int
0)