-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Sized sequence data-types
--
-- A wrapper to make length-parametrized data-type from functorial
-- data-types.
@package sized
@version 0.7.0.0
module Data.Sized.Flipped
-- | Wrapper for Sized which takes length as its last
-- element, instead of the second.
--
-- Since 0.2.0.0
newtype Flipped f a n
Flipped :: Sized f n a -> Flipped f a n
[runFlipped] :: Flipped f a n -> Sized f n a
instance forall nat (f :: * -> *) a (n :: nat). Data.MonoTraversable.MonoFunctor (f a) => Data.MonoTraversable.MonoFunctor (Data.Sized.Flipped.Flipped f a n)
instance forall nat (f :: * -> *) a (n :: nat). Data.MonoTraversable.MonoFoldable (f a) => Data.MonoTraversable.MonoFoldable (Data.Sized.Flipped.Flipped f a n)
instance forall nat1 nat2 (f1 :: * -> *) a1 (n1 :: nat2) t (f2 :: * -> *) a2 (n2 :: nat1). (Data.Sized.Flipped.Flipped f1 a1 n1 Data.Type.Equality.~ t) => Control.Lens.Wrapped.Rewrapped (Data.Sized.Flipped.Flipped f2 a2 n2) t
instance forall nat (f :: * -> *) a (n :: nat). Control.Lens.Wrapped.Wrapped (Data.Sized.Flipped.Flipped f a n)
instance forall nat (f :: * -> *) a (n :: nat). Data.MonoTraversable.MonoTraversable (f a) => Data.MonoTraversable.MonoTraversable (Data.Sized.Flipped.Flipped f a n)
instance forall nat (f :: * -> *) a (n :: nat). (GHC.Real.Integral (Control.Lens.At.Index (f a)), Control.Lens.At.Ixed (f a), Data.Type.Ordinal.HasOrdinal nat) => Control.Lens.At.Ixed (Data.Sized.Flipped.Flipped f a n)
instance forall (f :: * -> *) a nat (n :: nat). Data.Hashable.Class.Hashable (f a) => Data.Hashable.Class.Hashable (Data.Sized.Flipped.Flipped f a n)
instance forall (f :: * -> *) a nat (n :: nat). Control.DeepSeq.NFData (f a) => Control.DeepSeq.NFData (Data.Sized.Flipped.Flipped f a n)
instance forall (f :: * -> *) a nat (n :: nat). GHC.Classes.Ord (f a) => GHC.Classes.Ord (Data.Sized.Flipped.Flipped f a n)
instance forall (f :: * -> *) a nat (n :: nat). GHC.Classes.Eq (f a) => GHC.Classes.Eq (Data.Sized.Flipped.Flipped f a n)
instance forall (f :: * -> *) a nat (n :: nat). GHC.Show.Show (f a) => GHC.Show.Show (Data.Sized.Flipped.Flipped f a n)
-- | This module provides the functionality to make length-parametrized
-- types from existing CFreeMonoid sequential types.
--
-- Most of the complexity of operations for Sized f n a are the
-- same as original operations for f. For example, !! is
-- O(1) for Sized Vector n a but O(i) for Sized [] n a.
--
-- This module also provides powerful view types and pattern synonyms to
-- inspect the sized sequence. See Views and Patterns for more
-- detail.
module Data.Sized
-- | Sized wraps a sequential type f and makes
-- length-parametrized version.
--
-- Here, f must be the instance of CFreeMonoid (f a)
-- a for all a@.
--
-- Since 0.2.0.0
data Sized (f :: Type -> Type) (n :: nat) a
-- | Sized vector with the length is existentially quantified. This
-- type is used mostly when the return type's length cannot be statically
-- determined beforehand.
--
-- SomeSized' sn xs :: SomeSized' f a stands for the
-- Sized sequence xs of element type a and
-- length sn.
--
-- Since 0.7.0.0
data SomeSized' f nat a
[SomeSized'] :: Sing n -> Sized f (n :: nat) a -> SomeSized' f nat a
class Dom f a => DomC f a
-- | Returns the length of wrapped containers. If you use
-- unsafeFromList or similar unsafe functions, this function may
-- return different value from type-parameterized length.
--
-- Since 0.7.0.0
length :: forall nat f (n :: nat) a. (IsPeano nat, CFoldable f, Dom f a, SingI n) => Sized f n a -> Int
-- | Sing version of length.
--
-- Since 0.7.0.0 (type changed)
sLength :: forall nat f (n :: nat) a. (HasOrdinal nat, CFoldable f, Dom f a) => Sized f n a -> Sing n
-- | Test if the sequence is empty or not.
--
-- Since 0.7.0.0
null :: forall nat f (n :: nat) a. (CFoldable f, Dom f a) => Sized f n a -> Bool
-- | (Unsafe) indexing with Ints. If you want to check boundary
-- statically, use %!! or sIndex.
--
-- Since 0.7.0.0
(!!) :: forall nat f (m :: nat) a. (CFoldable f, Dom f a, (One nat <= m) ~ 'True) => Sized f m a -> Int -> a
-- | Safe indexing with Ordinals.
--
-- Since 0.7.0.0
(%!!) :: forall nat f (n :: nat) c. (HasOrdinal nat, CFoldable f, Dom f c) => Sized f n c -> Ordinal n -> c
-- | Flipped version of !!.
--
-- Since 0.7.0.0
index :: forall nat f (m :: nat) a. (CFoldable f, Dom f a, (One nat <= m) ~ 'True) => Int -> Sized f m a -> a
-- | Flipped version of %!!.
--
-- Since 0.7.0.0
sIndex :: forall nat f (n :: nat) c. (HasOrdinal nat, CFoldable f, Dom f c) => Ordinal n -> Sized f n c -> c
-- | Take the first element of non-empty sequence. If you want to make
-- case-analysis for general sequence, see Views and Patterns
-- section.
--
-- Since 0.7.0.0
head :: forall nat f (n :: nat) a. (HasOrdinal nat, CFoldable f, Dom f a, (Zero nat < n) ~ 'True) => Sized f n a -> a
-- | Take the last element of non-empty sequence. If you want to make
-- case-analysis for general sequence, see Views and Patterns
-- section.
--
-- Since 0.7.0.0
last :: forall nat f (n :: nat) a. (HasOrdinal nat, (Zero nat < n) ~ 'True, CFoldable f, Dom f a) => Sized f n a -> a
-- | Take the head and tail of non-empty sequence. If you
-- want to make case-analysis for general sequence, see Views and
-- Patterns section.
--
-- Since 0.7.0.0
uncons :: forall nat f (n :: nat) a. (PeanoOrder nat, SingI n, CFreeMonoid f, Dom f a, (Zero nat < n) ~ 'True) => Sized f n a -> Uncons f n a
uncons' :: forall nat f (n :: nat) a proxy. (HasOrdinal nat, SingI n, CFreeMonoid f, Dom f a) => proxy n -> Sized f (Succ n) a -> Uncons f (Succ n) a
data Uncons f (n :: nat) a
[Uncons] :: forall nat f (n :: nat) a. SingI n => a -> Sized f n a -> Uncons f (Succ n) a
-- | Take the init and last of non-empty sequence. If you
-- want to make case-analysis for general sequence, see Views and
-- Patterns section.
--
-- Since 0.7.0.0
unsnoc :: forall nat f (n :: nat) a. (HasOrdinal nat, SingI n, CFreeMonoid f, Dom f a, (Zero nat < n) ~ 'True) => Sized f n a -> Unsnoc f n a
unsnoc' :: forall nat f (n :: nat) a proxy. (HasOrdinal nat, SingI n, CFreeMonoid f, Dom f a) => proxy n -> Sized f (Succ n) a -> Unsnoc f (Succ n) a
data Unsnoc f n a
[Unsnoc] :: forall nat f n a. Sized f (n :: nat) a -> a -> Unsnoc f (Succ n) a
-- | Take the tail of non-empty sequence. If you want to make case-analysis
-- for general sequence, see Views and Patterns section.
--
-- Since 0.7.0.0
tail :: forall nat f (n :: nat) a. (HasOrdinal nat, CFreeMonoid f, Dom f a) => Sized f (One nat + n) a -> Sized f n a
-- | Take the initial segment of non-empty sequence. If you want to make
-- case-analysis for general sequence, see Views and Patterns
-- section.
--
-- Since 0.7.0.0
init :: forall nat f (n :: nat) a. (HasOrdinal nat, CFreeMonoid f, Dom f a) => Sized f (n + One nat) a -> Sized f n a
-- | take k xs takes first k element of xs where
-- the length of xs should be larger than k.
--
-- Since 0.7.0.0
take :: forall nat (n :: nat) f (m :: nat) a. (CFreeMonoid f, Dom f a, (n <= m) ~ 'True, HasOrdinal nat) => Sing n -> Sized f m a -> Sized f n a
-- | take k xs takes first k element of xs at
-- most.
--
-- Since 0.7.0.0
takeAtMost :: forall nat (n :: nat) f m a. (CFreeMonoid f, Dom f a, HasOrdinal nat) => Sing n -> Sized f m a -> Sized f (Min n m) a
-- | drop k xs drops first k element of xs and
-- returns the rest of sequence, where the length of xs should
-- be larger than k.
--
-- Since 0.7.0.0
drop :: forall nat (n :: nat) f (m :: nat) a. (HasOrdinal nat, CFreeMonoid f, Dom f a, (n <= m) ~ 'True) => Sing n -> Sized f m a -> Sized f (m - n) a
-- | splitAt k xs split xs at k, where the
-- length of xs should be less than or equal to k.
--
-- Since 0.7.0.0
splitAt :: forall nat (n :: nat) f m a. (CFreeMonoid f, Dom f a, (n <= m) ~ 'True, HasOrdinal nat) => Sing n -> Sized f m a -> (Sized f n a, Sized f (m -. n) a)
-- | splitAtMost k xs split xs at k. If
-- k exceeds the length of xs, then the second result
-- value become empty.
--
-- Since 0.7.0.0
splitAtMost :: forall nat (n :: nat) f (m :: nat) a. (HasOrdinal nat, CFreeMonoid f, Dom f a) => Sing n -> Sized f m a -> (Sized f (Min n m) a, Sized f (m -. n) a)
-- | Empty sequence.
--
-- Since 0.7.0.0 (type changed)
empty :: forall nat f a. (Monoid (f a), HasOrdinal nat, Dom f a) => Sized f (Zero nat) a
-- | Sequence with one element.
--
-- Since 0.7.0.0
singleton :: forall nat f a. (CPointed f, Dom f a) => a -> Sized f (One nat) a
-- | Consruct the Sized sequence from base type, but the length
-- parameter is dynamically determined and existentially quantified; see
-- also SomeSized'.
--
-- Since 0.7.0.0
toSomeSized :: forall nat f a. (HasOrdinal nat, Dom f a, CFoldable f) => f a -> SomeSized' f nat a
-- | Replicates the same value.
--
-- Since 0.7.0.0
replicate :: forall nat f (n :: nat) a. (HasOrdinal nat, CFreeMonoid f, Dom f a) => Sing n -> a -> Sized f n a
-- | replicate with the length inferred.
--
-- Since 0.7.0.0
replicate' :: forall nat f (n :: nat) a. (HasOrdinal nat, SingI (n :: nat), CFreeMonoid f, Dom f a) => a -> Sized f n a
-- | Since 0.7.0.0
generate :: forall (nat :: Type) f (n :: nat) (a :: Type). (CFreeMonoid f, Dom f a, HasOrdinal nat) => Sing n -> (Ordinal n -> a) -> Sized f n a
-- | Append an element to the head of sequence.
--
-- Since 0.7.0.0
cons :: forall nat f (n :: nat) a. (CFreeMonoid f, Dom f a) => a -> Sized f n a -> Sized f (Succ n) a
-- | Infix version of cons.
--
-- Since 0.7.0.0
(<|) :: forall nat f (n :: nat) a. (CFreeMonoid f, Dom f a) => a -> Sized f n a -> Sized f (Succ n) a
infixr 5 <|
-- | Append an element to the tail of sequence.
--
-- Since 0.7.0.0
snoc :: forall nat f (n :: nat) a. (CFreeMonoid f, Dom f a) => Sized f n a -> a -> Sized f (n + One nat) a
-- | Infix version of snoc.
--
-- Since 0.7.0.0
(|>) :: forall nat f (n :: nat) a. (CFreeMonoid f, Dom f a) => Sized f n a -> a -> Sized f (n + One nat) a
infixl 5 |>
-- | Append two lists.
--
-- Since 0.7.0.0
append :: forall nat f (n :: nat) (m :: nat) a. (CFreeMonoid f, Dom f a) => Sized f n a -> Sized f m a -> Sized f (n + m) a
-- | Infix version of append.
--
-- Since 0.7.0.0
(++) :: forall nat f (n :: nat) (m :: nat) a. (CFreeMonoid f, Dom f a) => Sized f n a -> Sized f m a -> Sized f (n + m) a
infixr 5 ++
-- | Concatenates multiple sequences into one.
--
-- Since 0.7.0.0
concat :: forall nat f' (m :: nat) f (n :: nat) a. (CFreeMonoid f, CFunctor f', CFoldable f', Dom f a, Dom f' (f a), Dom f' (Sized f n a)) => Sized f' m (Sized f n a) -> Sized f (m * n) a
-- | Zipping two sequences. Length is adjusted to shorter one.
--
-- Since 0.7.0.0
zip :: forall nat f (n :: nat) a (m :: nat) b. (Dom f a, CZip f, Dom f b, Dom f (a, b)) => Sized f n a -> Sized f m b -> Sized f (Min n m) (a, b)
-- | zip for the sequences of the same length.
--
-- Since 0.7.0.0
zipSame :: forall nat f (n :: nat) a b. (Dom f a, CZip f, Dom f b, Dom f (a, b)) => Sized f n a -> Sized f n b -> Sized f n (a, b)
-- | Zipping two sequences with funtion. Length is adjusted to shorter one.
--
-- Since 0.7.0.0
zipWith :: forall nat f (n :: nat) a (m :: nat) b c. (Dom f a, CZip f, Dom f b, CFreeMonoid f, Dom f c) => (a -> b -> c) -> Sized f n a -> Sized f m b -> Sized f (Min n m) c
-- | zipWith for the sequences of the same length.
--
-- Since 0.7.0.0
zipWithSame :: forall nat f (n :: nat) a b c. (Dom f a, CZip f, Dom f b, CFreeMonoid f, Dom f c) => (a -> b -> c) -> Sized f n a -> Sized f n b -> Sized f n c
-- | Unzipping the sequence of tuples.
--
-- Since 0.7.0.0
unzip :: forall nat f (n :: nat) a b. (CUnzip f, Dom f a, Dom f b, Dom f (a, b)) => Sized f n (a, b) -> (Sized f n a, Sized f n b)
-- | Unzipping the sequence of tuples.
--
-- Since 0.7.0.0
unzipWith :: forall nat f (n :: nat) a b c. (CUnzip f, Dom f a, Dom f b, Dom f c) => (a -> (b, c)) -> Sized f n a -> (Sized f n b, Sized f n c)
-- | Map function.
--
-- Since 0.7.0.0
map :: forall nat f (n :: nat) a b. (CFreeMonoid f, Dom f a, Dom f b) => (a -> b) -> Sized f n a -> Sized f n b
-- | Reverse function.
--
-- Since 0.7.0.0
reverse :: forall nat f (n :: nat) a. (Dom f a, CFreeMonoid f) => Sized f n a -> Sized f n a
-- | Intersperces.
--
-- Since 0.7.0.0
intersperse :: forall nat f (n :: nat) a. (CFreeMonoid f, Dom f a) => a -> Sized f n a -> Sized f ((FromInteger 2 * n) -. One nat) a
-- | Remove all duplicates.
--
-- Since 0.7.0.0
nub :: forall nat f (n :: nat) a. (HasOrdinal nat, Dom f a, Eq a, CFreeMonoid f) => Sized f n a -> SomeSized' f nat a
-- | Sorting sequence by ascending order.
--
-- Since 0.7.0.0
sort :: forall nat f (n :: nat) a. (CFreeMonoid f, Dom f a, Ord a) => Sized f n a -> Sized f n a
-- | Generalized version of sort.
--
-- Since 0.7.0.0
sortBy :: forall nat f (n :: nat) a. (CFreeMonoid f, Dom f a) => (a -> a -> Ordering) -> Sized f n a -> Sized f n a
-- | Insert new element into the presorted sequence.
--
-- Since 0.7.0.0
insert :: forall nat f (n :: nat) a. (CFreeMonoid f, Dom f a, Ord a) => a -> Sized f n a -> Sized f (Succ n) a
-- | Generalized version of insert.
--
-- Since 0.7.0.0
insertBy :: forall nat f (n :: nat) a. (CFreeMonoid f, Dom f a) => (a -> a -> Ordering) -> a -> Sized f n a -> Sized f (Succ n) a
-- | Convert to list.
--
-- Since 0.7.0.0
toList :: forall nat f (n :: nat) a. (CFoldable f, Dom f a) => Sized f n a -> [a]
-- | If the given list is shorter than n, then returns
-- Nothing Otherwise returns Sized f n a consisting of
-- initial n element of given list.
--
-- Since 0.7.0.0 (type changed)
fromList :: forall nat f (n :: nat) a. (HasOrdinal nat, CFreeMonoid f, Dom f a) => Sing n -> [a] -> Maybe (Sized f n a)
-- | fromList with the result length inferred.
--
-- Since 0.7.0.0
fromList' :: forall nat f (n :: nat) a. (PeanoOrder nat, Dom f a, CFreeMonoid f, SingI n) => [a] -> Maybe (Sized f n a)
-- | Unsafe version of fromList. If the length of the given list
-- does not equal to n, then something unusual happens.
--
-- Since 0.7.0.0
unsafeFromList :: forall (nat :: Type) f (n :: nat) a. (CFreeMonoid f, Dom f a) => Sing n -> [a] -> Sized f n a
-- | unsafeFromList with the result length inferred.
--
-- Since 0.7.0.0
unsafeFromList' :: forall nat f (n :: nat) a. (SingI n, CFreeMonoid f, Dom f a) => [a] -> Sized f n a
-- | Construct a Sized f n a by padding default value if the given
-- list is short.
--
-- Since 0.5.0.0 (type changed)
fromListWithDefault :: forall nat f (n :: nat) a. (HasOrdinal nat, Dom f a, CFreeMonoid f) => Sing n -> a -> [a] -> Sized f n a
-- | fromListWithDefault with the result length inferred.
--
-- Since 0.7.0.0
fromListWithDefault' :: forall nat f (n :: nat) a. (PeanoOrder nat, SingI n, CFreeMonoid f, Dom f a) => a -> [a] -> Sized f n a
-- | Forget the length and obtain the wrapped base container.
--
-- Since 0.7.0.0
unsized :: forall nat f (n :: nat) a. Sized f n a -> f a
-- | If the length of the input is shorter than n, then returns
-- Nothing. Otherwise returns Sized f n a consisting of
-- initial n element of the input.
--
-- Since 0.7.0.0
toSized :: forall nat f (n :: nat) a. (HasOrdinal nat, CFreeMonoid f, Dom f a) => Sing (n :: nat) -> f a -> Maybe (Sized f n a)
-- | toSized with the result length inferred.
--
-- Since 0.7.0.0
toSized' :: forall nat f (n :: nat) a. (PeanoOrder nat, Dom f a, CFreeMonoid f, SingI n) => f a -> Maybe (Sized f n a)
-- | Unsafe version of toSized. If the length of the given list does
-- not equal to n, then something unusual happens.
--
-- Since 0.7.0.0
unsafeToSized :: forall nat f (n :: nat) a. Sing n -> f a -> Sized f n a
-- | unsafeToSized with the result length inferred.
--
-- Since 0.7.0.0
unsafeToSized' :: forall nat f (n :: nat) a. (SingI n, Dom f a) => f a -> Sized f n a
-- | Construct a Sized f n a by padding default value if the given
-- list is short.
--
-- Since 0.7.0.0
toSizedWithDefault :: forall nat f (n :: nat) a. (HasOrdinal nat, CFreeMonoid f, Dom f a) => Sing (n :: nat) -> a -> f a -> Sized f n a
-- | toSizedWithDefault with the result length inferred.
--
-- Since 0.7.0.0
toSizedWithDefault' :: forall nat f (n :: nat) a. (PeanoOrder nat, SingI n, CFreeMonoid f, Dom f a) => a -> f a -> Sized f n a
-- | The type Partitioned f n a represents partitioned sequence of
-- length n. Value Partitioned lenL ls lenR rs stands
-- for:
--
--
-- - Entire sequence is divided into ls and rs, and
-- their length are lenL and lenR resp.
-- lenL + lenR = n
--
--
-- Since 0.7.0.0
data Partitioned f n a
[Partitioned] :: Dom f a => Sing n -> Sized f n a -> Sing m -> Sized f m a -> Partitioned f (n + m) a
-- | Take the initial segment as long as elements satisfys the predicate.
--
-- Since 0.7.0.0
takeWhile :: forall nat f (n :: nat) a. (HasOrdinal nat, Dom f a, CFreeMonoid f) => (a -> Bool) -> Sized f n a -> SomeSized' f nat a
-- | Drop the initial segment as long as elements satisfys the predicate.
--
-- Since 0.7.0.0
dropWhile :: forall nat f (n :: nat) a. (HasOrdinal nat, CFreeMonoid f, Dom f a) => (a -> Bool) -> Sized f n a -> SomeSized' f nat a
-- | Since 0.7.0.0
span :: forall nat f (n :: nat) a. (HasOrdinal nat, CFreeMonoid f, Dom f a) => (a -> Bool) -> Sized f n a -> Partitioned f n a
-- | Since 0.7.0.0
break :: forall nat f (n :: nat) a. (HasOrdinal nat, CFreeMonoid f, Dom f a) => (a -> Bool) -> Sized f n a -> Partitioned f n a
-- | Since 0.7.0.0
partition :: forall nat f (n :: nat) a. (HasOrdinal nat, CFreeMonoid f, Dom f a) => (a -> Bool) -> Sized f n a -> Partitioned f n a
-- | Membership test; see also notElem.
--
-- Since 0.7.0.0
elem :: forall nat f (n :: nat) a. (CFoldable f, Dom f a, Eq a) => a -> Sized f n a -> Bool
-- | Negation of elem.
--
-- Since 0.7.0.0
notElem :: forall nat f (n :: nat) a. (CFoldable f, Dom f a, Eq a) => a -> Sized f n a -> Bool
-- | Find the element satisfying the predicate.
--
-- Since 0.7.0.0
find :: forall nat f (n :: nat) a. (CFoldable f, Dom f a) => (a -> Bool) -> Sized f n a -> Maybe a
-- | findIndex p xs find the element satisfying p
-- and returns its index if exists.
--
-- Since 0.7.0.0
findIndex :: forall nat f (n :: nat) a. (CFoldable f, Dom f a) => (a -> Bool) -> Sized f n a -> Maybe Int
-- | Ordinal version of findIndex.
--
-- Since 0.7.0.0
sFindIndex :: forall nat f (n :: nat) a. (SingI (n :: nat), CFoldable f, Dom f a, HasOrdinal nat) => (a -> Bool) -> Sized f n a -> Maybe (Ordinal n)
-- | findIndices p xs find all elements satisfying
-- p and returns their indices.
--
-- Since 0.7.0.0
findIndices :: forall nat f (n :: nat) a. (CFoldable f, Dom f a) => (a -> Bool) -> Sized f n a -> [Int]
-- | Ordinal version of findIndices.
--
-- Since 0.7.0.0
sFindIndices :: forall nat f (n :: nat) a. (HasOrdinal nat, CFoldable f, Dom f a, SingI (n :: nat)) => (a -> Bool) -> Sized f n a -> [Ordinal n]
-- | Returns the index of the given element in the list, if exists.
--
-- Since 0.7.0.0
elemIndex :: forall nat f (n :: nat) a. (CFoldable f, Eq a, Dom f a) => a -> Sized f n a -> Maybe Int
-- | Ordinal version of elemIndex. Since 0.7.0.0, we no longer do
-- boundary check inside the definition.
--
-- Since 0.7.0.0
sElemIndex :: forall nat f (n :: nat) a. (SingI n, CFoldable f, Dom f a, Eq a, HasOrdinal nat) => a -> Sized f n a -> Maybe (Ordinal n)
-- | Since 0.5.0.0 (type changed)
--
-- Ordinal version of elemIndex. Since 0.7.0.0, we no longer do
-- boundary check inside the definition.
--
-- Since 0.7.0.0
-- | Deprecated: No difference with sElemIndex; use sElemIndex
-- instead.
sUnsafeElemIndex :: forall nat f (n :: nat) a. (SingI n, CFoldable f, Dom f a, Eq a, HasOrdinal nat) => a -> Sized f n a -> Maybe (Ordinal n)
-- | Returns all indices of the given element in the list.
--
-- Since 0.7.0.0
elemIndices :: forall nat f (n :: nat) a. (CFoldable f, Dom f a, Eq a) => a -> Sized f n a -> [Int]
-- | Ordinal version of elemIndices
--
-- Since 0.7.0.0
sElemIndices :: forall nat f (n :: nat) a. (CFoldable f, HasOrdinal nat, SingI (n :: nat), Dom f a, Eq a) => a -> Sized f n a -> [Ordinal n]
-- | Case analysis for the cons-side of sequence.
--
-- Since 0.5.0.0 (type changed)
viewCons :: forall nat f (n :: nat) a. (HasOrdinal nat, SingI n, CFreeMonoid f, Dom f a) => Sized f n a -> ConsView f n a
-- | View of the left end of sequence (cons-side).
--
-- Since 0.7.0.0
data ConsView f n a
[NilCV] :: ConsView f (Zero nat) a
[:-] :: SingI n => a -> Sized f n a -> ConsView f (Succ n) a
infixr 5 :-
-- | Case analysis for the snoc-side of sequence.
--
-- Since 0.5.0.0 (type changed)
viewSnoc :: forall nat f (n :: nat) a. (HasOrdinal nat, SingI n, CFreeMonoid f, Dom f a) => Sized f n a -> SnocView f n a
-- | View of the left end of sequence (snoc-side).
--
-- Since 0.7.0.0
data SnocView f n a
[NilSV] :: SnocView f (Zero nat) a
[:-::] :: SingI (n :: nat) => Sized f n a -> a -> SnocView f (n + One nat) a
infixl 5 :-::
-- | Pattern synonym for cons-side uncons.
pattern (:<) :: forall nat (f :: Type -> Type) a (n :: nat). (Dom f a, PeanoOrder nat, SingI n, CFreeMonoid f) => forall (n1 :: nat). (n ~ Succ n1, SingI n1) => a -> Sized f n1 a -> Sized f n a
infixr 5 :<
pattern NilL :: forall nat f (n :: nat) a. (SingI n, CFreeMonoid f, Dom f a, HasOrdinal nat) => n ~ Zero nat => Sized f n a
pattern (:>) :: forall nat (f :: Type -> Type) a (n :: nat). (Dom f a, PeanoOrder nat, SingI n, CFreeMonoid f) => forall (n1 :: nat). (n ~ (n1 + One nat), SingI n1) => Sized f n1 a -> a -> Sized f n a
infixl 5 :>
pattern NilR :: forall nat f (n :: nat) a. (SingI n, CFreeMonoid f, Dom f a, HasOrdinal nat) => n ~ Zero nat => Sized f n a
instance Control.Subcategory.Functor.Dom f a => Data.Sized.DomC f a
instance forall nat (f :: * -> *) (n :: nat). (GHC.Base.Functor f, Control.Subcategory.Foldable.CFreeMonoid f, Control.Subcategory.Zip.CZip f, Data.Type.Ordinal.HasOrdinal nat, Data.Singletons.Internal.SingI n, forall a. Data.Sized.DomC f a) => GHC.Base.Applicative (Data.Sized.Internal.Sized f n)
instance GHC.Show.Show (f a) => GHC.Show.Show (Data.Sized.SomeSized' f nat a)
instance GHC.Classes.Eq (f a) => GHC.Classes.Eq (Data.Sized.SomeSized' f nat a)
instance forall nat (f :: * -> *) (n :: nat). (Control.Subcategory.Foldable.CFreeMonoid f, Data.Type.Natural.Class.Order.PeanoOrder nat, Data.Singletons.Internal.SingI n) => Control.Subcategory.Pointed.CPointed (Data.Sized.Internal.Sized f n)
instance forall nat (f :: * -> *) (n :: nat). (Control.Subcategory.Foldable.CFreeMonoid f, Control.Subcategory.Zip.CZip f) => Control.Subcategory.Applicative.Class.CApplicative (Data.Sized.Internal.Sized f n)
instance forall nat (f :: * -> *) (n :: nat). (Control.Subcategory.Zip.CZip f, Control.Subcategory.Foldable.CFreeMonoid f) => Control.Subcategory.Semialign.CSemialign (Data.Sized.Internal.Sized f n)
instance forall nat (f :: * -> *) (n :: nat). (Control.Subcategory.Zip.CZip f, Control.Subcategory.Foldable.CFreeMonoid f) => Control.Subcategory.Zip.CZip (Data.Sized.Internal.Sized f n)
instance forall nat (n :: nat) (f :: * -> *). (Data.Type.Natural.Class.Order.PeanoOrder nat, Data.Singletons.Internal.SingI n, Control.Subcategory.Zip.CZip f, Control.Subcategory.Foldable.CFreeMonoid f) => Control.Subcategory.Zip.CRepeat (Data.Sized.Internal.Sized f n)
instance forall nat (f :: * -> *) (n :: nat). Control.Subcategory.Foldable.CTraversable f => Control.Subcategory.Foldable.CTraversable (Data.Sized.Internal.Sized f n)
-- | This module exports Sized type and functions
-- specialized to GHC's built-in type numeral Nat.
module Data.Sized.Builtin
type Sized = (Sized :: (Type -> Type) -> Nat -> Type -> Type)
type SomeSized f a = SomeSized' f Nat a
pattern SomeSized :: forall (f :: Type -> Type) a. () => forall (n :: Nat). SNat n -> Sized f n a -> SomeSized f a
type Ordinal = (Ordinal :: Nat -> Type)
class Dom f a => DomC f a
length :: (Dom f a, CFoldable f, KnownNat n) => Sized f n a -> Int
sLength :: (Dom f a, CFoldable f) => Sized f n a -> SNat n
null :: (Dom f a, CFoldable f) => Sized f n a -> Bool
(!!) :: (Dom f a, CFoldable f, (1 <= m) ~ 'True) => Sized f m a -> Int -> a
(%!!) :: (Dom f c, CFoldable f) => Sized f n c -> Ordinal n -> c
index :: (Dom f a, CFoldable f, (1 <= m) ~ 'True) => Int -> Sized f m a -> a
sIndex :: (Dom f c, CFoldable f) => Ordinal n -> Sized f n c -> c
head :: (Dom f a, CFoldable f, (0 < n) ~ 'True) => Sized f n a -> a
last :: (Dom f a, CFoldable f, (0 < n) ~ 'True) => Sized f n a -> a
uncons :: (Dom f a, KnownNat n, CFreeMonoid f, (0 < n) ~ 'True) => Sized f n a -> Uncons f n a
uncons' :: (Dom f a, KnownNat n, CFreeMonoid f, (0 < n) ~ 'True) => Sized f n a -> Uncons f n a
type Uncons f (n :: Nat) a = Uncons f n a
pattern Uncons :: forall (f :: Type -> Type) (n :: Nat) a. () => forall (n1 :: Nat). (n ~ Succ n1, SingI n1) => a -> Sized f n1 a -> Uncons f n a
unsnoc :: (Dom f a, KnownNat n, CFreeMonoid f, (0 < n) ~ 'True) => Sized f n a -> Unsnoc f n a
unsnoc' :: (Dom f a, KnownNat n, CFreeMonoid f) => proxy n -> Sized f (n + 1) a -> Unsnoc f (n + 1) a
type Unsnoc f (n :: Nat) a = Unsnoc f n a
pattern Unsnoc :: forall (f :: Type -> Type) (n :: Nat) a. () => forall (n1 :: Nat). n ~ Succ n1 => Sized f n1 a -> a -> Unsnoc f n a
tail :: (Dom f a, CFreeMonoid f) => Sized f (1 + n) a -> Sized f n a
init :: (Dom f a, CFreeMonoid f) => Sized f (n + 1) a -> Sized f n a
take :: (Dom f a, CFreeMonoid f, (n <= m) ~ 'True) => SNat n -> Sized f m a -> Sized f n a
takeAtMost :: (Dom f a, CFreeMonoid f) => SNat n -> Sized f m a -> Sized f (Min n m) a
drop :: (Dom f a, CFreeMonoid f, (n <= m) ~ 'True) => SNat n -> Sized f m a -> Sized f (m - n) a
splitAt :: (Dom f a, CFreeMonoid f, (n <= m) ~ 'True) => SNat n -> Sized f m a -> (Sized f n a, Sized f (m - n) a)
splitAtMost :: (Dom f a, CFreeMonoid f) => SNat n -> Sized f m a -> (Sized f (Min n m) a, Sized f (m -. n) a)
empty :: (Dom f a, Monoid (f a)) => Sized f 0 a
singleton :: (Dom f a, CFreeMonoid f) => a -> Sized f 1 a
toSomeSized :: (Dom f a, CFoldable f) => f a -> SomeSized f a
replicate :: (Dom f a, CFreeMonoid f) => SNat n -> a -> Sized f n a
replicate' :: (Dom f a, KnownNat n, CFreeMonoid f) => a -> Sized f n a
generate :: (Dom f a, CFreeMonoid f) => SNat n -> (Ordinal n -> a) -> Sized f n a
cons :: (Dom f a, CFreeMonoid f) => a -> Sized f n a -> Sized f (n + 1) a
(<|) :: (Dom f a, CFreeMonoid f) => a -> Sized f n a -> Sized f (n + 1) a
snoc :: (Dom f a, CFreeMonoid f) => Sized f n a -> a -> Sized f (n + 1) a
(|>) :: (Dom f a, CFreeMonoid f) => Sized f n a -> a -> Sized f (n + 1) a
append :: (Dom f a, CFreeMonoid f) => Sized f n a -> Sized f m a -> Sized f (n + m) a
(++) :: (Dom f a, CFreeMonoid f) => Sized f n a -> Sized f m a -> Sized f (n + m) a
concat :: (Dom f a, Dom f' (f a), Dom f' (Sized f n a), CFreeMonoid f, CFunctor f', CFoldable f') => Sized f' m (Sized f n a) -> Sized f (m * n) a
zip :: (Dom f a, Dom f b, Dom f (a, b), CZip f) => Sized f n a -> Sized f m b -> Sized f (Min n m) (a, b)
zipSame :: (Dom f a, Dom f b, Dom f (a, b), CZip f) => Sized f n a -> Sized f n b -> Sized f n (a, b)
zipWith :: (Dom f a, Dom f b, Dom f c, CZip f, CFreeMonoid f) => (a -> b -> c) -> Sized f n a -> Sized f m b -> Sized f (Min n m) c
zipWithSame :: (Dom f a, Dom f b, Dom f c, CZip f, CFreeMonoid f) => (a -> b -> c) -> Sized f n a -> Sized f n b -> Sized f n c
unzip :: (Dom f a, Dom f b, Dom f (a, b), CUnzip f) => Sized f n (a, b) -> (Sized f n a, Sized f n b)
unzipWith :: (Dom f a, Dom f b, Dom f c, CUnzip f) => (a -> (b, c)) -> Sized f n a -> (Sized f n b, Sized f n c)
map :: (Dom f a, Dom f b, CFreeMonoid f) => (a -> b) -> Sized f n a -> Sized f n b
reverse :: (Dom f a, CFreeMonoid f) => Sized f n a -> Sized f n a
intersperse :: (Dom f a, CFreeMonoid f) => a -> Sized f n a -> Sized f ((2 * n) -. 1) a
nub :: (Dom f a, Eq a, CFreeMonoid f) => Sized f n a -> SomeSized f a
sort :: (Dom f a, CFreeMonoid f, Ord a) => Sized f n a -> Sized f n a
sortBy :: (Dom f a, CFreeMonoid f) => (a -> a -> Ordering) -> Sized f n a -> Sized f n a
insert :: (Dom f a, CFreeMonoid f, Ord a) => a -> Sized f n a -> Sized f (n + 1) a
insertBy :: (Dom f a, CFreeMonoid f) => (a -> a -> Ordering) -> a -> Sized f n a -> Sized f (n + 1) a
toList :: (Dom f a, CFoldable f) => Sized f n a -> [a]
fromList :: (Dom f a, CFreeMonoid f) => SNat n -> [a] -> Maybe (Sized f n a)
fromList' :: (Dom f a, CFreeMonoid f, KnownNat n) => [a] -> Maybe (Sized f n a)
unsafeFromList :: (Dom f a, CFreeMonoid f) => SNat n -> [a] -> Sized f n a
unsafeFromList' :: (Dom f a, KnownNat n, CFreeMonoid f) => [a] -> Sized f n a
fromListWithDefault :: (Dom f a, CFreeMonoid f) => SNat n -> a -> [a] -> Sized f n a
fromListWithDefault' :: (Dom f a, KnownNat n, CFreeMonoid f) => a -> [a] -> Sized f n a
unsized :: Sized f n a -> f a
toSized :: (Dom f a, CFreeMonoid f) => SNat n -> f a -> Maybe (Sized f n a)
toSized' :: (Dom f a, CFreeMonoid f, KnownNat n) => f a -> Maybe (Sized f n a)
unsafeToSized :: SNat n -> f a -> Sized f n a
unsafeToSized' :: (Dom f a, KnownNat n) => f a -> Sized f n a
toSizedWithDefault :: (Dom f a, CFreeMonoid f) => SNat n -> a -> f a -> Sized f n a
toSizedWithDefault' :: (Dom f a, KnownNat n, CFreeMonoid f) => a -> f a -> Sized f n a
type Partitioned f (n :: Nat) a = Partitioned f n a
pattern Partitioned :: forall (f :: Type -> Type) (n :: Nat) a. () => forall (n1 :: Nat) (m :: Nat). (n ~ (n1 + m), Dom f a) => SNat n1 -> Sized f n1 a -> SNat m -> Sized f m a -> Partitioned f n a
takeWhile :: (Dom f a, CFreeMonoid f) => (a -> Bool) -> Sized f n a -> SomeSized f a
dropWhile :: (Dom f a, CFreeMonoid f) => (a -> Bool) -> Sized f n a -> SomeSized f a
span :: (Dom f a, CFreeMonoid f) => (a -> Bool) -> Sized f n a -> Partitioned f n a
break :: (Dom f a, CFreeMonoid f) => (a -> Bool) -> Sized f n a -> Partitioned f n a
partition :: (Dom f a, CFreeMonoid f) => (a -> Bool) -> Sized f n a -> Partitioned f n a
elem :: (Dom f a, CFoldable f, Eq a) => a -> Sized f n a -> Bool
notElem :: (Dom f a, CFoldable f, Eq a) => a -> Sized f n a -> Bool
find :: (Dom f a, CFoldable f) => (a -> Bool) -> Sized f n a -> Maybe a
findIndex :: (Dom f a, CFoldable f) => (a -> Bool) -> Sized f n a -> Maybe Int
sFindIndex :: (Dom f a, KnownNat n, CFoldable f) => (a -> Bool) -> Sized f n a -> Maybe (Ordinal n)
findIndices :: (Dom f a, CFoldable f) => (a -> Bool) -> Sized f n a -> [Int]
sFindIndices :: (Dom f a, CFoldable f, KnownNat n) => (a -> Bool) -> Sized f n a -> [Ordinal n]
elemIndex :: (Dom f a, CFoldable f) => (a -> Bool) -> Sized f n a -> Maybe Int
sElemIndex :: (Dom f a, KnownNat n, CFoldable f) => (a -> Bool) -> Sized f n a -> Maybe (Ordinal n)
-- | Deprecated: Use sElemIndex instead
sUnsafeElemIndex :: (Dom f a, KnownNat n, CFoldable f, Eq a) => a -> Sized f n a -> Maybe (Ordinal n)
elemIndices :: (Dom f a, CFoldable f) => (a -> Bool) -> Sized f n a -> [Int]
sElemIndices :: (Dom f a, CFoldable f, KnownNat n) => (a -> Bool) -> Sized f n a -> [Ordinal n]
viewCons :: (Dom f a, KnownNat n, CFreeMonoid f) => Sized f n a -> ConsView f n a
type ConsView f (n :: Nat) a = ConsView f n a
pattern (:-) :: () => a -> Sized f n a -> ConsView f (Succ n) a
infixr 5 :-
pattern NilCV :: () => ConsView f (Zero nat) a
viewSnoc :: (Dom f a, KnownNat n, CFreeMonoid f) => Sized f n a -> ConsView f n a
type SnocView f (n :: Nat) a = SnocView f n a
pattern (:-::) :: () => Sized f n a -> a -> SnocView f (n + One nat) a
infixl 5 :-::
pattern NilSV :: () => SnocView f (Zero nat) a
pattern (:<) :: forall (f :: Type -> Type) a (n :: Nat). (Dom f a, SingI n, CFreeMonoid f) => forall (n1 :: Nat). (n ~ Succ n1, SingI n1) => a -> Sized f n1 a -> Sized f n a
infixr 5 :<
pattern NilL :: forall f (n :: Nat) a. (KnownNat n, CFreeMonoid f, Dom f a) => n ~ 0 => Sized f n a
pattern (:>) :: forall (f :: Type -> Type) a (n :: Nat). (Dom f a, SingI n, CFreeMonoid f) => forall (n1 :: Nat). (n ~ (n1 + 1), SingI n1) => Sized f n1 a -> a -> Sized f n a
infixl 5 :>
pattern NilR :: forall f (n :: Nat) a. (CFreeMonoid f, Dom f a, SingI n) => n ~ 0 => Sized f n a
-- | This module exports Sized type specialized to
-- type-level Peano numeral Nat.
module Data.Sized.Peano
type Sized = (Sized :: (Type -> Type) -> Nat -> Type -> Type)
type SomeSized f a = SomeSized' f Nat a
pattern SomeSized :: forall (f :: Type -> Type) a. () => forall (n :: Nat). SNat n -> Sized f n a -> SomeSized f a
type Ordinal = (Ordinal :: Nat -> Type)
class Dom f a => DomC f a
length :: (Dom f a, CFoldable f, SingI n) => Sized f n a -> Int
sLength :: (Dom f a, CFoldable f) => Sized f n a -> SNat n
null :: (Dom f a, CFoldable f) => Sized f n a -> Bool
(!!) :: (Dom f a, CFoldable f, (One <= m) ~ 'True) => Sized f m a -> Int -> a
(%!!) :: (Dom f c, CFoldable f) => Sized f n c -> Ordinal n -> c
index :: (Dom f a, CFoldable f, (One <= m) ~ 'True) => Int -> Sized f m a -> a
sIndex :: (Dom f c, CFoldable f) => Ordinal n -> Sized f n c -> c
head :: (Dom f a, CFoldable f, ( 'Z < n) ~ 'True) => Sized f n a -> a
last :: (Dom f a, CFoldable f, ( 'Z < n) ~ 'True) => Sized f n a -> a
uncons :: (Dom f a, SingI n, CFreeMonoid f, ( 'Z < n) ~ 'True) => Sized f n a -> Uncons f n a
uncons' :: (Dom f a, SingI n, CFreeMonoid f, ( 'Z < n) ~ 'True) => Sized f n a -> Uncons f n a
type Uncons f (n :: Nat) a = Uncons f n a
pattern Uncons :: forall (f :: Type -> Type) (n :: Nat) a. () => forall (n1 :: Nat). (n ~ Succ n1, SingI n1) => a -> Sized f n1 a -> Uncons f n a
unsnoc :: (Dom f a, SingI n, CFreeMonoid f, ( 'Z < n) ~ 'True) => Sized f n a -> Unsnoc f n a
unsnoc' :: (Dom f a, SingI n, CFreeMonoid f) => proxy n -> Sized f ( 'S n) a -> Unsnoc f ( 'S n) a
type Unsnoc f (n :: Nat) a = Unsnoc f n a
pattern Unsnoc :: forall (f :: Type -> Type) (n :: Nat) a. () => forall (n1 :: Nat). n ~ Succ n1 => Sized f n1 a -> a -> Unsnoc f n a
tail :: (Dom f a, CFreeMonoid f) => Sized f (One + n) a -> Sized f n a
init :: (Dom f a, CFreeMonoid f) => Sized f (n + One) a -> Sized f n a
take :: (Dom f a, CFreeMonoid f, (n <= m) ~ 'True) => SNat n -> Sized f m a -> Sized f n a
takeAtMost :: (Dom f a, CFreeMonoid f) => SNat n -> Sized f m a -> Sized f (Min n m) a
drop :: (Dom f a, CFreeMonoid f, (n <= m) ~ 'True) => SNat n -> Sized f m a -> Sized f (m - n) a
splitAt :: (Dom f a, CFreeMonoid f, (n <= m) ~ 'True) => SNat n -> Sized f m a -> (Sized f n a, Sized f (m - n) a)
splitAtMost :: (Dom f a, CFreeMonoid f) => SNat n -> Sized f m a -> (Sized f (Min n m) a, Sized f (m -. n) a)
empty :: (Dom f a, Monoid (f a)) => Sized f 'Z a
singleton :: (Dom f a, CFreeMonoid f) => a -> Sized f One a
toSomeSized :: (Dom f a, CFoldable f) => f a -> SomeSized f a
replicate :: (Dom f a, CFreeMonoid f) => SNat n -> a -> Sized f n a
replicate' :: (Dom f a, CFreeMonoid f, SingI n) => a -> Sized f n a
generate :: (Dom f a, CFreeMonoid f) => SNat n -> (Ordinal n -> a) -> Sized f n a
cons :: (Dom f a, CFreeMonoid f) => a -> Sized f n a -> Sized f ( 'S n) a
(<|) :: (Dom f a, CFreeMonoid f) => a -> Sized f n a -> Sized f ( 'S n) a
snoc :: (Dom f a, CFreeMonoid f) => Sized f n a -> a -> Sized f (n + One) a
(|>) :: (Dom f a, CFreeMonoid f) => Sized f n a -> a -> Sized f (n + One) a
append :: (Dom f a, CFreeMonoid f) => Sized f n a -> Sized f m a -> Sized f (n + m) a
(++) :: (Dom f a, CFreeMonoid f) => Sized f n a -> Sized f m a -> Sized f (n + m) a
concat :: (Dom f a, Dom f' (f a), Dom f' (Sized f n a), CFreeMonoid f, CFunctor f', CFoldable f') => Sized f' m (Sized f n a) -> Sized f (m * n) a
zip :: (Dom f a, Dom f b, Dom f (a, b), CZip f) => Sized f n a -> Sized f m b -> Sized f (Min n m) (a, b)
zipSame :: (Dom f a, Dom f b, Dom f (a, b), CZip f) => Sized f n a -> Sized f n b -> Sized f n (a, b)
zipWith :: (Dom f a, Dom f b, Dom f c, CZip f, CFreeMonoid f) => (a -> b -> c) -> Sized f n a -> Sized f m b -> Sized f (Min n m) c
zipWithSame :: (Dom f a, Dom f b, Dom f c, CZip f, CFreeMonoid f) => (a -> b -> c) -> Sized f n a -> Sized f n b -> Sized f n c
unzip :: (Dom f a, Dom f b, Dom f (a, b), CUnzip f) => Sized f n (a, b) -> (Sized f n a, Sized f n b)
unzipWith :: (Dom f a, Dom f b, Dom f c, CUnzip f) => (a -> (b, c)) -> Sized f n a -> (Sized f n b, Sized f n c)
map :: (Dom f a, Dom f b, CFreeMonoid f) => (a -> b) -> Sized f n a -> Sized f n b
reverse :: (Dom f a, CFreeMonoid f) => Sized f n a -> Sized f n a
intersperse :: (Dom f a, CFreeMonoid f) => a -> Sized f n a -> Sized f ((Two * n) -. One) a
nub :: (Dom f a, Eq a, CFreeMonoid f) => Sized f n a -> SomeSized f a
sort :: (Dom f a, CFreeMonoid f, Ord a) => Sized f n a -> Sized f n a
sortBy :: (Dom f a, CFreeMonoid f) => (a -> a -> Ordering) -> Sized f n a -> Sized f n a
insert :: (Dom f a, CFreeMonoid f, Ord a) => a -> Sized f n a -> Sized f ( 'S n) a
insertBy :: (Dom f a, CFreeMonoid f) => (a -> a -> Ordering) -> a -> Sized f n a -> Sized f ( 'S n) a
toList :: (Dom f a, CFoldable f) => Sized f n a -> [a]
fromList :: (Dom f a, CFreeMonoid f) => SNat n -> [a] -> Maybe (Sized f n a)
fromList' :: (Dom f a, CFreeMonoid f, SingI n) => [a] -> Maybe (Sized f n a)
unsafeFromList :: (Dom f a, CFreeMonoid f) => SNat n -> [a] -> Sized f n a
unsafeFromList' :: (Dom f a, SingI n, CFreeMonoid f) => [a] -> Sized f n a
fromListWithDefault :: (Dom f a, CFreeMonoid f) => SNat n -> a -> [a] -> Sized f n a
fromListWithDefault' :: (Dom f a, SingI n, CFreeMonoid f) => a -> [a] -> Sized f n a
unsized :: Sized f n a -> f a
toSized :: (Dom f a, CFreeMonoid f) => SNat n -> f a -> Maybe (Sized f n a)
toSized' :: (Dom f a, CFreeMonoid f, SingI n) => f a -> Maybe (Sized f n a)
unsafeToSized :: SNat n -> f a -> Sized f n a
unsafeToSized' :: (Dom f a, SingI n) => f a -> Sized f n a
toSizedWithDefault :: (Dom f a, CFreeMonoid f) => SNat n -> a -> f a -> Sized f n a
toSizedWithDefault' :: (Dom f a, SingI n, CFreeMonoid f) => a -> f a -> Sized f n a
type Partitioned f (n :: Nat) a = Partitioned f n a
pattern Partitioned :: forall (f :: Type -> Type) (n :: Nat) a. () => forall (n1 :: Nat) (m :: Nat). (n ~ (n1 + m), Dom f a) => SNat n1 -> Sized f n1 a -> SNat m -> Sized f m a -> Partitioned f n a
takeWhile :: (Dom f a, CFreeMonoid f) => (a -> Bool) -> Sized f n a -> SomeSized f a
dropWhile :: (Dom f a, CFreeMonoid f) => (a -> Bool) -> Sized f n a -> SomeSized f a
span :: (Dom f a, CFreeMonoid f) => (a -> Bool) -> Sized f n a -> Partitioned f n a
break :: (Dom f a, CFreeMonoid f) => (a -> Bool) -> Sized f n a -> Partitioned f n a
partition :: (Dom f a, CFreeMonoid f) => (a -> Bool) -> Sized f n a -> Partitioned f n a
elem :: (Dom f a, CFoldable f, Eq a) => a -> Sized f n a -> Bool
notElem :: (Dom f a, CFoldable f, Eq a) => a -> Sized f n a -> Bool
find :: (Dom f a, CFoldable f) => (a -> Bool) -> Sized f n a -> Maybe a
findIndex :: (Dom f a, CFoldable f) => (a -> Bool) -> Sized f n a -> Maybe Int
sFindIndex :: (Dom f a, SingI n, CFoldable f) => (a -> Bool) -> Sized f n a -> Maybe (Ordinal n)
findIndices :: (Dom f a, CFoldable f) => (a -> Bool) -> Sized f n a -> [Int]
sFindIndices :: (Dom f a, CFoldable f, SingI n) => (a -> Bool) -> Sized f n a -> [Ordinal n]
elemIndex :: (Dom f a, CFoldable f) => (a -> Bool) -> Sized f n a -> Maybe Int
sElemIndex :: (Dom f a, SingI n, CFoldable f) => (a -> Bool) -> Sized f n a -> Maybe (Ordinal n)
-- | Deprecated: Use sElemIndex instead
sUnsafeElemIndex :: (Dom f a, SingI n, CFoldable f, Eq a) => a -> Sized f n a -> Maybe (Ordinal n)
elemIndices :: (Dom f a, CFoldable f) => (a -> Bool) -> Sized f n a -> [Int]
sElemIndices :: (Dom f a, CFoldable f, SingI n) => (a -> Bool) -> Sized f n a -> [Ordinal n]
viewCons :: (Dom f a, SingI n, CFreeMonoid f) => Sized f n a -> ConsView f n a
type ConsView f (n :: Nat) a = ConsView f n a
pattern (:-) :: () => a -> Sized f n a -> ConsView f (Succ n) a
infixr 5 :-
pattern NilCV :: () => ConsView f (Zero nat) a
viewSnoc :: (Dom f a, SingI n, CFreeMonoid f) => Sized f n a -> ConsView f n a
type SnocView f (n :: Nat) a = SnocView f n a
pattern (:-::) :: () => Sized f n a -> a -> SnocView f (n + One nat) a
infixl 5 :-::
pattern NilSV :: () => SnocView f (Zero nat) a
pattern (:<) :: forall (f :: Type -> Type) a (n :: Nat). (Dom f a, SingI n, CFreeMonoid f) => forall (n1 :: Nat). (n ~ Succ n1, SingI n1) => a -> Sized f n1 a -> Sized f n a
infixr 5 :<
pattern NilL :: forall f (n :: Nat) a. (SingI n, CFreeMonoid f, Dom f a) => n ~ 'Z => Sized f n a
pattern (:>) :: forall (f :: Type -> Type) a (n :: Nat). (Dom f a, SingI n, CFreeMonoid f) => forall (n1 :: Nat). (n ~ (n1 + One), SingI n1) => Sized f n1 a -> a -> Sized f n a
infixl 5 :>
pattern NilR :: forall f (n :: Nat) a. (CFreeMonoid f, Dom f a, SingI n) => n ~ 'Z => Sized f n a