A family of Deques implementations. A concrete Deque implementation is selected based on the (phantom) type parameters, which encode several choices.
For example, a work stealing deque is threadsafe only on one end and supports push/pop on one end (and pop-only) on the other:
> (Deque NT T D S Grow elt)Note, however, that the above example is overconstraining in many situations. It demands an implementation which is NOT threadsafe on one end and does NOT support push on one end, whereas both these features would not hurt, if present.
Thus when accepting a queue as input to a function you probably never want to overconstrain by demanding a less-featureful option.
For example, rather than (Deque NT D T S Grow elt)
You would probably want: (Deque nt D T s Grow elt)
Instances1Deque
type Deque lt rt l r bnd safe elt = SimpleDeque eltDefined in abstract-deque-0.3 · Data.Concurrent.Deque.Reference.DequeInstance · orphanThe reference implementation is a fully general Deque. It can thus cover the full configuration space.