{-# OPTIONS_GHC -Wno-orphans #-}
{-|
Module      : Parsley.Internal.Common.RewindQueue
Description : RewindQueue operations.
License     : BSD-3-Clause
Maintainer  : Jamie Willis
Stability   : experimental

Exposes the instance of `QueueLike` for `RewindQueue`.

@since 1.5.0.0
-}
module Parsley.Internal.Common.RewindQueue (module RewindQueue) where

import Parsley.Internal.Common.RewindQueue.Impl as RewindQueue (
    RewindQueue, empty, enqueue, dequeue, rewind, null, size, foldr, enqueueAll
  )
import Parsley.Internal.Common.QueueLike  (QueueLike(empty, null, size, enqueue, dequeue, enqueueAll))

instance QueueLike RewindQueue where
  empty :: RewindQueue a
empty      = RewindQueue a
forall a. RewindQueue a
RewindQueue.empty
  null :: RewindQueue a -> Bool
null       = RewindQueue a -> Bool
forall a. RewindQueue a -> Bool
RewindQueue.null
  size :: RewindQueue a -> Int
size       = RewindQueue a -> Int
forall a. RewindQueue a -> Int
RewindQueue.size
  enqueue :: a -> RewindQueue a -> RewindQueue a
enqueue    = a -> RewindQueue a -> RewindQueue a
forall a. a -> RewindQueue a -> RewindQueue a
RewindQueue.enqueue
  dequeue :: RewindQueue a -> (a, RewindQueue a)
dequeue    = RewindQueue a -> (a, RewindQueue a)
forall a. RewindQueue a -> (a, RewindQueue a)
RewindQueue.dequeue
  enqueueAll :: [a] -> RewindQueue a -> RewindQueue a
enqueueAll = [a] -> RewindQueue a -> RewindQueue a
forall a. [a] -> RewindQueue a -> RewindQueue a
RewindQueue.enqueueAll