Hoogle Search

Within LTS Haskell 24.51 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. data Deque (v :: Type -> Type -> Type) s a

    rio RIO.Deque

    A double-ended queue supporting any underlying vector type and any monad. This implements a circular double-ended queue with exponential growth.

  2. type SDeque = Deque MVector

    rio RIO.Deque

    A Deque specialized to storable vectors.

  3. type UDeque = Deque MVector

    rio RIO.Deque

    A Deque specialized to unboxed vectors.

  4. asBDeque :: BDeque s a -> BDeque s a

    rio RIO.Deque

    Helper function to assist with type inference, forcing usage of a boxed vector.

  5. asSDeque :: SDeque s a -> SDeque s a

    rio RIO.Deque

    Helper function to assist with type inference, forcing usage of a storable vector.

  6. asUDeque :: UDeque s a -> UDeque s a

    rio RIO.Deque

    Helper function to assist with type inference, forcing usage of an unboxed vector.

  7. dequeToList :: forall (v :: Type -> Type -> Type) a m . (MVector v a, PrimMonad m) => Deque v (PrimState m) a -> m [a]

    rio RIO.Deque

    Convert a Deque into a list. Does not modify the Deque.

  8. dequeToVector :: forall v' a (v :: Type -> Type -> Type) m . (Vector v' a, MVector v a, PrimMonad m) => Deque v (PrimState m) a -> m (v' a)

    rio RIO.Deque

    Convert to an immutable vector of any type. If resulting pure vector corresponds to the mutable one used by the Deque, it will be more efficient to use freezeDeque instead.

    Example

    >>> :set -XTypeApplications
    
    >>> import qualified RIO.Vector.Unboxed as U
    
    >>> import qualified RIO.Vector.Storable as S
    
    >>> d <- newDeque @U.MVector @Int
    
    >>> mapM_ (pushFrontDeque d) [0..10]
    
    >>> dequeToVector @S.Vector d
    [10,9,8,7,6,5,4,3,2,1,0]
    

  9. foldlDeque :: forall (v :: Type -> Type -> Type) a m acc . (MVector v a, PrimMonad m) => (acc -> a -> m acc) -> acc -> Deque v (PrimState m) a -> m acc

    rio RIO.Deque

    Fold over a Deque, starting at the beginning. Does not modify the Deque.

  10. foldrDeque :: forall (v :: Type -> Type -> Type) a m acc . (MVector v a, PrimMonad m) => (a -> acc -> m acc) -> acc -> Deque v (PrimState m) a -> m acc

    rio RIO.Deque

    Fold over a Deque, starting at the end. Does not modify the Deque.

Page 274 of many | Previous | Next