{-# 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, poke
  )
import Parsley.Internal.Common.QueueLike  (QueueLike(empty, null, size, enqueue, dequeue, enqueueAll, poke))

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