----------------------------------------------------------------------------- -- | -- Module : Data.Bits -- Copyright : (c) 2020-2021 EMQ Technologies Co., Ltd. -- License : BSD-style (see the LICENSE file) -- -- Maintainer : Feng Lee, feng@emqx.io -- Yang M, yangm@emqx.io -- Stability : experimental -- Portability : portable -- -- Bitwise Operators: -- -- | BitOp | Name | -- | ----- | --------------- | -- | band | Bit and | -- | bor | Bit or | -- | bnot | Bit not | -- | bxor | Bit xor | -- | bsl | Bit shift left | -- | bsr | Bit shift right | -- ----------------------------------------------------------------------------- module Data.Bits where -- | Bitwise `and` operator. foreign import band :: Integer -> Integer -> Integer -- | Bitwise `or` operator. foreign import bor :: Integer -> Integer -> Integer -- | Bitwise `xor` operator. foreign import bxor :: Integer -> Integer -> Integer -- | Bitwise negation operator. foreign import bnot :: Integer -> Integer -- | Bit shift left. foreign import bsl :: Integer -> Integer -> Integer -- | Bit shift right. foreign import bsr :: Integer -> Integer -> Integer