-- 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.4 -- | A Seq that must contain at least one item. module Data.Sequence.NonEmpty -- | Conceptually this is a Seq 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 NonEmptySeq to a Seq. nonEmptySeqToSeq :: NonEmptySeq a -> Seq a -- | If the Seq has at least one item, create a NonEmptySeq. seqToNonEmptySeq :: Seq a -> Maybe (NonEmptySeq a) -- | Prepends a Seq to a NonEmptySeq. prependSeq :: Seq a -> NonEmptySeq a -> NonEmptySeq a -- | Appends a Seq to a NonEmptySeq. appendSeq :: NonEmptySeq a -> Seq a -> NonEmptySeq a -- | Place a single item at the head of the NonEmptySeq. 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