-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Non-empty sequence
--   
--   Please see README.md
@package non-empty-sequence
@version 0.2.0.2


-- | A <a>Seq</a> that must contain at least one item.
module Data.Sequence.NonEmpty

-- | Conceptually this is a <a>Seq</a> that always contains at least one
--   item.
data NonEmptySeq a
NonEmptySeq :: a -> Seq a -> NonEmptySeq a
[_fore] :: NonEmptySeq a -> a
[_aft] :: NonEmptySeq a -> Seq a

-- | van Laarhoven lens for the first element
fore :: Functor f => (a -> f a) -> NonEmptySeq a -> f (NonEmptySeq a)

-- | van Laarhoven lens for the remaining elements
aft :: Functor f => (Seq a -> f (Seq a)) -> NonEmptySeq a -> f (NonEmptySeq a)

-- | Flattens a <a>NonEmptySeq</a> to a <a>Seq</a>.
nonEmptySeqToSeq :: NonEmptySeq a -> Seq a

-- | If the <a>Seq</a> has at least one item, create a <a>NonEmptySeq</a>.
seqToNonEmptySeq :: Seq a -> Maybe (NonEmptySeq a)

-- | Prepends a <a>Seq</a> to a <a>NonEmptySeq</a>.
prependSeq :: Seq a -> NonEmptySeq a -> NonEmptySeq a

-- | Appends a <a>Seq</a> to a <a>NonEmptySeq</a>.
appendSeq :: NonEmptySeq a -> Seq a -> NonEmptySeq a

-- | Place a single item at the head of the <a>NonEmptySeq</a>.
singleton :: a -> NonEmptySeq a
instance Data.Traversable.Traversable Data.Sequence.NonEmpty.NonEmptySeq
instance Data.Foldable.Foldable Data.Sequence.NonEmpty.NonEmptySeq
instance GHC.Base.Functor Data.Sequence.NonEmpty.NonEmptySeq
instance Data.Data.Data a => Data.Data.Data (Data.Sequence.NonEmpty.NonEmptySeq a)
instance GHC.Show.Show a => GHC.Show.Show (Data.Sequence.NonEmpty.NonEmptySeq a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (Data.Sequence.NonEmpty.NonEmptySeq a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Data.Sequence.NonEmpty.NonEmptySeq a)
instance GHC.Base.Semigroup (Data.Sequence.NonEmpty.NonEmptySeq a)
instance GHC.Base.Monad Data.Sequence.NonEmpty.NonEmptySeq
instance GHC.Base.Applicative Data.Sequence.NonEmpty.NonEmptySeq
