-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | An imperative integer set written in Haskell.
--   
--   An imperative integer set written in Haskell.
--   
--   Read
--   <a>https://deliquus.com/posts/2018-07-30-imperative-programming-in-haskell.html</a>
--   for more information.
@package intset-imperative
@version 0.1.0.0


-- | An imperative integer set written in Haskell.
--   
--   See "<i>Making Haskell as fast as C: Imperative programming in
--   Haskell</i>" for a more detailed discussion,
--   <a>https://deliquus.com/posts/2018-07-30-imperative-programming-in-haskell.html</a>.
module Data.IntSet.Bounded.Imperative

-- | A strict bounded integer set.
--   
--   The set is very efficient when accessing elements within the bounds of
--   the set. It uses a regular list to hold numbers outside of this range.
--   
--   The type parameter <tt>s</tt> is determined by the monad the data
--   structure lives in.
data IntSet s

-- | An <a>IntSet</a> inside the <a>IO</a> monad.
type IOIntSet = IntSet (PrimState IO)

-- | Get the minimum efficient bound of the integer set.
intSetMinBound :: IntSet s -> Word64

-- | Get the maximum efficient bound of the integer set.
intSetMaxBound :: IntSet s -> Word64

-- | Construct an empty integer set.
empty :: PrimMonad m => Word64 -> Word64 -> m (IntSet (PrimState m))

-- | Insert the integer in a set.
insert :: PrimMonad m => IntSet (PrimState m) -> Word64 -> m ()

-- | Is the integer in the set?
member :: PrimMonad m => IntSet (PrimState m) -> Word64 -> m Bool

-- | Is the integer not in the set?
notMember :: PrimMonad m => IntSet (PrimState m) -> Word64 -> m Bool

-- | Delete the integer from the set.
delete :: PrimMonad m => IntSet (PrimState m) -> Word64 -> m ()
