| Safe Haskell | Trustworthy |
|---|---|
| Language | Haskell2010 |
Control.Monad.Logic.Sequence.Internal.Queue
Description
Based on the LogicT improvements in the paper, Reflection without Remorse. Code is based on the code provided in: https://github.com/atzeus/reflectionwithoutremorse
Note: that code is provided under an MIT license, so we use that as well.
Synopsis
- data Queue a
Documentation
A peculiarly lazy catenable queue. Note that appending multiple
empty queues to a non-empty queue can break the amortized constant
bound for viewl in the persistent case.
Contextual note: We could actually make these *non-empty* catenable
queues, in which case the wonkiness around appending empty would go
away. In SeqT, SeqT Empty is
really just an optimized representation of
SeqT (singleton (pure Empty))
where the Empty in the latter is an empty ViewT.
Instances
| Foldable Queue Source # | |
Defined in Control.Monad.Logic.Sequence.Internal.Queue Methods fold :: Monoid m => Queue m -> m # foldMap :: Monoid m => (a -> m) -> Queue a -> m # foldMap' :: Monoid m => (a -> m) -> Queue a -> m # foldr :: (a -> b -> b) -> b -> Queue a -> b # foldr' :: (a -> b -> b) -> b -> Queue a -> b # foldl :: (b -> a -> b) -> b -> Queue a -> b # foldl' :: (b -> a -> b) -> b -> Queue a -> b # foldr1 :: (a -> a -> a) -> Queue a -> a # foldl1 :: (a -> a -> a) -> Queue a -> a # elem :: Eq a => a -> Queue a -> Bool # maximum :: Ord a => Queue a -> a # minimum :: Ord a => Queue a -> a # | |
| Traversable Queue Source # | |
| Functor Queue Source # | |
| Sequence Queue Source # | |
Defined in Control.Monad.Logic.Sequence.Internal.Queue | |
| Monoid (Queue a) Source # | |
| Semigroup (Queue a) Source # | |