-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | nonempty and positive functions -- -- A library containing positive-valued and nonempty functions . Please -- see the README on GitHub at -- https://github.com/gbwey/primus#readme @package primus @version 0.2.0.0 module Primus.Bool -- | create a Maybe using a predicate and a function for the success -- case predicate appears first unlike bool boolMaybe :: (a -> Bool) -> (a -> b) -> a -> Maybe b -- | create a Either using a predicate and functions for the failure -- and success case predicates appear first unlike bool boolEither :: (a -> Bool) -> (a -> e) -> (a -> b) -> a -> Either e b -- | create a These using two predicates and functions for the This -- case and That case False + * == This (a -> e) True + False == That -- (a -> b) True + True == These (a -> e) (a -> b) -- "a" -- effectively appears twice -- -- predicates appear first unlike bool boolThese :: (a -> Bool) -> (a -> Bool) -> (a -> e) -> (a -> b) -> a -> These e b -- | similar to boolThese but allows you to override the -- These case -- -- predicates appear first unlike bool boolThese' :: (a -> Bool) -> (a -> Bool) -> (a -> e) -> (a -> b) -> ((e, b) -> a -> (e, b)) -> a -> These e b -- | monadic version of bool predicate appears first unlike -- bool boolM :: Monad m => m Bool -> m a -> m a -> m a -- | unless but makes the "a" parameter available to the callback unlessMB :: Applicative m => (a -> Bool) -> a -> (a -> m ()) -> m () -- | when but makes the "a" parameter available to the callback whenMB :: Applicative m => (a -> Bool) -> a -> (a -> m ()) -> m () module Primus.Error -- | unsafe force an error if Left forceRight :: HasCallStack => String -> Either String a -> a -- | unsafe force an error if Left forceRightP :: HasCallStack => String -> Either String a -> a -- | unsafe force an error if Left fr :: HasCallStack => Either String a -> a -- | unsafe force an error if Left frp :: HasCallStack => Either String a -> a -- | unsafe conversion from list to a nonempty list fromList1 :: HasCallStack => String -> [a] -> NonEmpty a -- | unsafe conversion from list to a nonempty list fromList1P :: HasCallStack => String -> [a] -> NonEmpty a -- | unsafe conversion from list to a nonempty list ne :: HasCallStack => [a] -> NonEmpty a -- | unsafe conversion from list to a nonempty list nep :: HasCallStack => [a] -> NonEmpty a -- | indicates a programmer error programmError :: HasCallStack => String -> a -- | indicates a user error normalError :: HasCallStack => String -> a -- | indicates a compiler error compileError :: HasCallStack => String -> a -- | prepend an error message lmsg :: String -> Either String a -> Either String a -- | compose a two arg function followed by a one arg function (.@) :: (c -> d) -> (a -> b -> c) -> a -> b -> d infixr 8 .@ module Primus.AsMaybe -- | converts to a Maybe for failure types class AsMaybe x b | x -> b toMaybe :: AsMaybe x b => x -> Maybe b -- | similar to iterate but terminate using AsMaybe iterateT1 :: AsMaybe x a => (a -> x) -> a -> NonEmpty a -- | like unfoldr but terminate using AsMaybe -- --
-- >>> unfoldrT (splitAt 2) [1..8] -- [[1,2],[3,4],[5,6],[7,8]] -- -- vs -- -- >>> unfoldr (s -> if null s then Nothing else Just (splitAt 2 s)) [1..8] -- [[1,2],[3,4],[5,6],[7,8]] --unfoldrT :: AsMaybe t t => (t -> (a, t)) -> t -> [a] -- | run a functions against each side of a tuple and stitch them together -- for use with unfoldrT where "s" is a tuple and you want to stop -- as soon as the either terminates pairsT :: (x -> (a, x)) -> (y -> (b, y)) -> (x, y) -> ((a, b), (x, y)) -- | flexible "e" to use with eg partitionTheseT: Bool is also valid class ApThese e a x b | x e a -> b apThese :: ApThese e a x b => a -> x -> These e b -- | apply a function to a list and convert to a list of These toTheseT :: forall e a x b. ApThese e a x b => (a -> x) -> [a] -> [These e b] -- | like toTheseT with state toTheseTS :: forall e a x b z. ApThese e a x b => (z -> a -> (z, x)) -> z -> [a] -> (z, [These e b]) -- | like toTheseT but use partitionHereThere on the results -- (swapped version of partition) partitionEithersT :: forall e a b x. ApThese e a x b => (a -> x) -> [a] -> ([e], [b]) -- | like toTheseT but use partitionThese on the results partitionTheseT :: forall e a b x. ApThese e a x b => (a -> x) -> [a] -> ([e], [b], [(e, b)]) -- | like partitionEithersT ignoring the second element of the -- result filterT :: forall e a b x. ApThese e a x b => (a -> x) -> [a] -> [b] -- | similar to span using ApThese for failure (support Bool -- and These) spanT :: forall e a x b. ApThese e a x b => (a -> x) -> [a] -> ([b], [a]) -- | like spanT but doesn't continue in the These case spanTAlt :: forall e a x b. ApThese e a x b => (a -> x) -> [a] -> ([b], [a]) -- | like spanT with state spanTS :: forall e a x b z. ApThese e a x b => (z -> a -> (z, x)) -> z -> [a] -> (z, ([b], [a])) -- | like spanT but ignore the second element of the result takeWhileT :: forall e a x b. ApThese e a x b => (a -> x) -> [a] -> [b] -- | like takeWhileT with state takeWhileTS :: forall e a x b z. ApThese e a x b => (z -> a -> (z, x)) -> z -> [a] -> (z, [b]) -- | for use with LRHist using a fixed "e" class ApTheseF e a x b | x e a -> b apTheseF :: ApTheseF e a x b => a -> x -> These e b instance (e GHC.Types.~ e1, b GHC.Types.~ b1) => Primus.AsMaybe.ApTheseF e1 a (Data.These.These e b) b1 instance (e GHC.Types.~ e1, b GHC.Types.~ b1) => Primus.AsMaybe.ApTheseF e1 a (Data.Either.Either e b) b1 instance (GHC.Base.Monoid e, b GHC.Types.~ b1) => Primus.AsMaybe.ApTheseF e a (GHC.Maybe.Maybe b) b1 instance (GHC.Base.Monoid e, b GHC.Types.~ a) => Primus.AsMaybe.ApTheseF e a GHC.Types.Bool b instance (GHC.Base.Monoid e, b1 GHC.Types.~ [b]) => Primus.AsMaybe.ApTheseF e a [b] b1 instance (z GHC.Types.~ Data.Semigroup.Arg b1 y, Primus.AsMaybe.ApTheseF e a x b1) => Primus.AsMaybe.ApTheseF e a (Data.Semigroup.Arg x y) z instance (GHC.Base.Semigroup e, b GHC.Types.~ (b1, b2), Primus.AsMaybe.ApTheseF e a x b1, Primus.AsMaybe.ApTheseF e a y b2) => Primus.AsMaybe.ApTheseF e a (x, y) b instance (GHC.Base.Semigroup e, b GHC.Types.~ (b1, b2, b3), Primus.AsMaybe.ApTheseF e a x b1, Primus.AsMaybe.ApTheseF e a y b2, Primus.AsMaybe.ApTheseF e a z b3) => Primus.AsMaybe.ApTheseF e a (x, y, z) b instance Primus.AsMaybe.ApTheseF e a x z => Primus.AsMaybe.ApTheseF e a (Data.Functor.Identity.Identity x) z instance (e GHC.Types.~ e1, b GHC.Types.~ b1) => Primus.AsMaybe.ApThese e1 a (Data.These.These e b) b1 instance (e GHC.Types.~ e1, b GHC.Types.~ b1) => Primus.AsMaybe.ApThese e1 a (Data.Either.Either e b) b1 instance (e GHC.Types.~ a, b GHC.Types.~ b1) => Primus.AsMaybe.ApThese e a (GHC.Maybe.Maybe b) b1 instance (e GHC.Types.~ a, b GHC.Types.~ a) => Primus.AsMaybe.ApThese e a GHC.Types.Bool b instance (e GHC.Types.~ a, b1 GHC.Types.~ [b]) => Primus.AsMaybe.ApThese e a [b] b1 instance (z GHC.Types.~ Data.Semigroup.Arg b1 y, Primus.AsMaybe.ApThese e a x b1) => Primus.AsMaybe.ApThese e a (Data.Semigroup.Arg x y) z instance (GHC.Base.Semigroup e, b GHC.Types.~ (b1, b2), Primus.AsMaybe.ApThese e a x b1, Primus.AsMaybe.ApThese e a y b2) => Primus.AsMaybe.ApThese e a (x, y) b instance (GHC.Base.Semigroup e, b GHC.Types.~ (b1, b2, b3), Primus.AsMaybe.ApThese e a x b1, Primus.AsMaybe.ApThese e a y b2, Primus.AsMaybe.ApThese e a z b3) => Primus.AsMaybe.ApThese e a (x, y, z) b instance Primus.AsMaybe.ApThese e a x z => Primus.AsMaybe.ApThese e a (Data.Functor.Identity.Identity x) z instance (b GHC.Types.~ b1) => Primus.AsMaybe.AsMaybe (Data.These.These e b) b1 instance (b GHC.Types.~ b1) => Primus.AsMaybe.AsMaybe (Data.Either.Either e b) b1 instance (b GHC.Types.~ b1) => Primus.AsMaybe.AsMaybe (GHC.Maybe.Maybe b) b1 instance (b1 GHC.Types.~ [b]) => Primus.AsMaybe.AsMaybe [b] b1 instance (z GHC.Types.~ Data.Semigroup.Arg b1 y, Primus.AsMaybe.AsMaybe x b1) => Primus.AsMaybe.AsMaybe (Data.Semigroup.Arg x y) z instance (b GHC.Types.~ (b1, b2), Primus.AsMaybe.AsMaybe x b1, Primus.AsMaybe.AsMaybe y b2) => Primus.AsMaybe.AsMaybe (x, y) b instance (b GHC.Types.~ (b1, b2, b3), Primus.AsMaybe.AsMaybe x b1, Primus.AsMaybe.AsMaybe y b2, Primus.AsMaybe.AsMaybe z b3) => Primus.AsMaybe.AsMaybe (x, y, z) b instance Primus.AsMaybe.AsMaybe x z => Primus.AsMaybe.AsMaybe (Data.Functor.Identity.Identity x) z module Primus.Fold -- | fill a traversable with a list and fail if not enough data fillTraversable :: forall t a z. Traversable t => t z -> [a] -> Either String ([a], t a) -- | fill a traversable with a list and fail if there are leftovers: see -- fillTraversable fillTraversableExact :: forall f a z. Traversable f => f z -> [a] -> Either String (f a) -- | traverse a container using StateLR traverseLR :: forall t a b c. Traversable t => (c -> a -> Either String (c, b)) -> c -> t a -> Either String (c, t b) -- | left/right fold over a list giving the caller access state "z" (for -- finite containers only) histMapL :: Traversable t => ([a] -> [a] -> z -> a -> (z, b)) -> z -> t a -> (z, t b) -- | left/right fold over a list giving the caller access state "z" (for -- finite containers only) histMapR :: Traversable t => ([a] -> [a] -> z -> a -> (z, b)) -> z -> t a -> (z, t b) -- | same as histMapL or histMapR but skips state histMapL' :: forall a b t. Traversable t => ([a] -> [a] -> a -> b) -> t a -> t b -- | same as histMapL or histMapR but skips state histMapR' :: forall a b t. Traversable t => ([a] -> [a] -> a -> b) -> t a -> t b -- | run a function against the contents of the Foldable container -- as a list wrapL :: forall (g :: Type -> Type) a b. Traversable g => ([a] -> [b]) -> g a -> Either String (g b) -- | run a function against the contents of the Foldable1 container -- as a nonempty list wrap1 :: forall (g :: Type -> Type) a b. (Traversable g, Foldable1 g) => (NonEmpty a -> NonEmpty b) -> g a -> Either String (g b) -- | left/right fold that gives access to past input (reverse order) and -- future input pFoldR :: forall a b. ([a] -> [a] -> b -> a -> b) -> b -> [a] -> b -- | left/right fold that gives access to past input (reverse order) and -- future input pFoldL :: forall a b. ([a] -> [a] -> b -> a -> b) -> b -> [a] -> b -- | like unfoldr but reverses the order of the list unfoldl :: forall s a. (s -> Maybe (a, s)) -> s -> [a] -- | monadic unfoldr unfoldrM :: forall m s a. Monad m => (s -> m (Maybe (a, s))) -> s -> m [a] -- | monadic unfoldl unfoldlM :: forall m s a. Monad m => (s -> m (Maybe (a, s))) -> s -> m [a] -- | have to call a second time if the left container is bigger than the -- right one zipExtrasT :: forall a b t. Traversable t => t a -> t b -> t (These a b) -- | zip a foldable into a traversable container and return any leftovers zipExtrasRight :: forall a b t. Traversable t => [a] -> t b -> ([a], t (These a b)) -- | splits a container "u" into parts of length "len" and fills container -- "t" zipWithExact :: forall t u a b c. (Traversable t, Foldable u) => (a -> b -> c) -> t a -> u b -> Either String (t c) -- | see zipWithExact zipExact :: forall t u a b. (Traversable t, Foldable u) => t a -> u b -> Either String (t (a, b)) -- | zipWith with an Applicative result zipWithT :: (Applicative f, Traversable t, Applicative t) => (a -> b -> f c) -> t a -> t b -> f (t c) -- | difference between two foldables but quick exit if lhs is larger than -- rhs data CLCount b -- | error CError :: !String -> CLCount b -- | leftovers from rhs: ie lhs is smaller than rhs CLT :: !NonEmpty b -> CLCount b -- | same size CEQ :: CLCount b -- | lhs is larger than rhs CGT :: CLCount b -- | compare length where lhs or rhs can be infinite but not both compareLength :: forall t u a b. (Foldable t, Foldable u) => t a -> u b -> CLCount b -- | compare length where lhs or rhs can be infinite but not both compareLengthBy :: forall t u a b. (Foldable t, Foldable u) => (Int -> a -> b -> Maybe String) -> t a -> u b -> CLCount b -- | compare lengths of foldables compareLengths :: Foldable t => NonEmpty (t a) -> [CLCount a] -- | predicate for CEQ clOrdering :: CLCount b -> Maybe Ordering -- | pad fill "as" to the right or left with values from "zs" padR :: forall t a. Traversable t => t a -> [a] -> Either String (t a) -- | pad fill "as" to the right or left with values from "zs" padL :: forall t a. Traversable t => t a -> [a] -> Either String (t a) -- | fills a container with chunks using a user supplied unfold function chunkN :: forall t s b z. Traversable t => (s -> Either String (s, b)) -> t z -> s -> Either String (s, t b) -- | similar to chunkN but "s" is restricted to a foldable: if there -- is data left then will fail chunkN' :: forall t a u b z. (Traversable t, Foldable u) => (u a -> Either String (u a, b)) -> t z -> u a -> Either String (t b) -- | scanl for a traversable that drops the first value postscanl :: Traversable f => (b -> a -> b) -> b -> f a -> f b -- | scanr for a traversable that drops the last value postscanr :: Traversable f => (a -> b -> b) -> b -> f a -> f b -- | inits for a traversable container initsT :: forall a t. Traversable t => t a -> t (NonEmpty a) -- | tails for a traversable container tailsT :: forall a t. Traversable t => t a -> t (NonEmpty a) -- | reverse for a traversable container reverseT :: forall a t. Traversable t => t a -> t a -- | sortBy for a traversable container sortByT :: forall a t. Traversable t => (a -> a -> Ordering) -> t a -> t a -- | unzip for a functor of pairs unzipF :: Functor f => f (a, b) -> (f a, f b) -- | reverse a foldable reverseF :: Foldable t => t a -> [a] instance Data.Foldable.Foldable Primus.Fold.CLCount instance Data.Traversable.Traversable Primus.Fold.CLCount instance GHC.Base.Functor Primus.Fold.CLCount instance GHC.Classes.Eq b => GHC.Classes.Eq (Primus.Fold.CLCount b) instance GHC.Show.Show b => GHC.Show.Show (Primus.Fold.CLCount b) instance GHC.Classes.Ord b => GHC.Classes.Ord (Primus.Fold.CLCount b) instance GHC.Base.Functor (Primus.Fold.StateLR e s) instance GHC.Base.Applicative (Primus.Fold.StateLR e s) instance GHC.Base.Monad (Primus.Fold.StateLR e s) module Primus.Enum -- | create a nonempty list of all the values for an Enum universe1 :: forall a. (Bounded a, Enum a) => NonEmpty a -- | create a nonempty list of all the values for an Enum in reverse -- order universe1R :: forall a. (Bounded a, Enum a) => NonEmpty a -- | create a nonempty list of values starting at "a" enumFrom1 :: (Bounded a, Enum a) => a -> NonEmpty a -- | create a nonempty list of "a" in reverse order enumFrom1R :: forall a. (Bounded a, Enum a) => a -> NonEmpty a -- | create a nonempty list of values starting at "a" enumTo1 :: (Bounded a, Enum a) => a -> NonEmpty a -- | create a nonempty list of values starting at "a" and skipping "b" enumFromThen1 :: (Bounded a, Enum a) => a -> a -> NonEmpty a -- | create a nonempty list of values starting at "a" and skipping "b" enumFromTo1 :: Enum a => a -> a -> NonEmpty a -- | enumFromThenTo for nonempty lists enumFromThenTo1 :: Enum a => a -> a -> a -> NonEmpty a -- | safe pred for a bounded Enum predSafe :: (Bounded a, Enum a) => a -> Maybe a -- | safe succ for a bounded Enum succSafe :: (Bounded a, Enum a) => a -> Maybe a -- | safe toEnum integerToEnumSafe :: forall a. (Enum a, Bounded a) => Integer -> Either String a -- | concrete safe conversion of Integer to Int integerToIntSafe :: Integer -> Either String Int -- | convert toEnum of "a" into a list containing "a"s zero is the empty -- list: see toEnumList toEnumList :: forall a. (Enum a, Bounded a) => Integer -> Either String [a] -- | convert toEnum of "a" into a nonempty list containing "a"s toEnumList1 :: forall a. (Enum a, Bounded a) => Integer -> Either String (NonEmpty a) -- | generate all the possible enum combinations for the given container in -- ascending order -- -- useful for creating all the valid indices for matrices universeTraversable :: forall f a. (Traversable f, Enum a, Bounded a) => f a -> Either String (NonEmpty (f a)) -- | load a given container with "a"s using the relative position "i" toEnumTraversable :: forall a f z. (Traversable f, Enum a, Bounded a) => f z -> Integer -> Either String (f a) -- | succ for a traversable container succTraversable :: forall a t. (Traversable t, Enum a, Bounded a) => t a -> Either String (t a) -- | pred for a traversable container predTraversable :: forall a t. (Traversable t, Enum a, Bounded a) => t a -> Either String (t a) -- | reverse of toEnumList [can fail if xs is null and toEnum 0 is -- not defined] fromEnumFoldable :: forall a t. (Foldable t, Enum a, Bounded a) => t a -> Either String Integer -- | reverse of toEnumList1 [cant fail] fromEnumFoldable1 :: forall a t. (Foldable1 t, Enum a, Bounded a) => t a -> Integer -- | calculates the minimum and maximum range of enumerations that can be -- stored in a container of the given size capacity :: forall a t z. (Bounded a, Enum a, Foldable t) => t z -> Either String (Integer, Integer) module Primus.Lens -- | lens type synonym type Lens s t a b = forall f. Functor f => (a -> f b) -> s -> f t -- | restricted lens type synonym type Lens' s a = Lens s s a a -- | create a lens lens :: (s -> a) -> (s -> b -> t) -> Lens s t a b -- | isomorphism type synonym type Iso s t a b = forall p f. (Profunctor p, Functor f) => p a (f b) -> p s (f t) -- | create an isomoprhism iso :: (s -> a) -> (b -> t) -> Iso s t a b -- | traversal type synonym type Traversal s t a b = forall f. Applicative f => (a -> f b) -> s -> f t -- | simple lens for accessing the first value in a tuple _Fst :: forall a x a'. Lens (a, x) (a', x) a a' -- | simple lens for accessing the second value in a tuple _Snd :: forall x b b'. Lens (x, b) (x, b') b b' module Primus.List -- | like partitionEithersL' using boolEither partitionEithersL :: Foldable t => (a -> Bool) -> (a -> e) -> (a -> b) -> t a -> ([e], [b]) -- | like partition but allow the user to change the types of "e" -- and "b" using Either partitionEithersL' :: Foldable t => (a -> Either e b) -> t a -> ([e], [b]) -- | like partitionTheseL using boolThese partitionTheseL :: Foldable t => (a -> Bool) -> (a -> Bool) -> (a -> e) -> (a -> b) -> t a -> ([e], [b], [(e, b)]) -- | like partition but allow the user to change the types of "e" -- and "b" using These partitionTheseL' :: Foldable t => (a -> These e b) -> t a -> ([e], [b], [(e, b)]) -- | partition for an applicative partitionM :: Applicative m => (a -> m Bool) -> [a] -> m ([a], [a]) -- | like spanMaybe' using boolMaybe spanMaybe :: (a -> Bool) -> (a -> b) -> [a] -> ([b], [a]) -- | like span but allow the user to change the success type using -- Maybe spanMaybe' :: (a -> Maybe b) -> [a] -> ([b], [a]) -- | compares the length of a potentially infinite list with "n" and -- succeeds if they are the same lengthExact :: Int -> [a] -> Either String [a] -- | creates the longest of the two lists: fills with This or -- That zipWithLongest :: forall a b c. (These a b -> c) -> [a] -> [b] -> [c] -- | zipWithLongest for id zipLongest :: [a] -> [b] -> [These a b] -- | split a list into overlapping pairs plus overflow pairsOf1 :: [a] -> ([(a, a)], Maybe a) -- | split a list into non-overlapping pairs plus overflow pairsOf2 :: [a] -> ([(a, a)], Maybe a) -- | split into pairs skipping given number of values pairsOf' :: forall a. Pos -> [a] -> ([(a, a)], Maybe a) -- | simple utility for chunking data but guarantees we make progress chunksOf :: forall a. Pos -> [a] -> [[a]] -- | split a list but has to have enough elements else fails splitAtLGE :: Int -> [a] -> Either String ([a], [a]) -- | break up a list into all possible pairs of nonempty lists: see -- splits1 splits :: forall a. [a] -> [([a], [a])] -- | represents the status of a split on a list data SplitL a SplitLNeg :: !Pos -> SplitL a SplitLLT :: !Int -> SplitL a SplitLEQ :: SplitL a SplitLGT :: !NonEmpty a -> SplitL a -- | split a list preserving information about the split splitAtL :: forall a. Int -> [a] -> ([a], SplitL a) -- | index into a list atL :: Int -> [a] -> Maybe a -- | unsafe index into a list atNoteL :: HasCallStack => String -> [a] -> Int -> a -- | update a value at a given index in a list updateAtL :: Int -> (a -> a) -> [a] -> Maybe [a] -- | set a value at a given index in a list setAtL :: Int -> a -> [a] -> Maybe [a] -- | checks that the list has all the same values allEqual :: Eq a => [a] -> Either (a, a) () -- | checks that the list has all the same values with a predicate allEqualBy :: (a -> a -> Bool) -> [a] -> Either (a, a) () -- | snoc for a list snocL :: [a] -> a -> [a] -- | unsnoc for a value and a list unsnocL :: a -> [a] -> ([a], a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Primus.List.SplitL a) instance GHC.Show.Show a => GHC.Show.Show (Primus.List.SplitL a) instance GHC.Classes.Ord a => GHC.Classes.Ord (Primus.List.SplitL a) module Primus.NonEmpty -- | represents an optional Either ie Maybe (Either (NonEmpty a) -- (NonEmpty b)) data MLR a b -- | extra values on the left hand side MLRLeft :: !NonEmpty a -> MLR a b -- | both values have the same length MLREqual :: MLR a b -- | extra values on the right hand side MLRRight :: !NonEmpty b -> MLR a b -- | zips two nonempty lists together and puts any leftovers into -- MLR zipWithExtras1 :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> (NonEmpty c, MLR a b) -- | zips two lists together and puts any leftovers into MLR zipWithExtras :: forall a b c. (a -> b -> c) -> [a] -> [b] -> ([c], MLR a b) -- | MLRLeft predicate mlrOrdering :: MLR a b -> Ordering -- | conversion from list to a nonempty list fromList1LR :: [a] -> Either String (NonEmpty a) -- | split a nonempty list into a nonempty list of nonempty chunks chunksOf1 :: Pos -> NonEmpty a -> NonEmpty (NonEmpty a) -- | split a nonempty list into a nonempty list of nonempty chunks given a -- chunk size and how many to skip each iteration can decide the size of -- the chunks and how many elements to skip chunksRange1 :: Pos -> Pos -> NonEmpty a -> NonEmpty (NonEmpty a) -- | fills a container "tz" with chunks of size "len" must fill the -- container exactly chunkNLen :: forall t a u z. (Traversable t, Foldable u) => t z -> Pos -> u a -> Either String (t (NonEmpty a)) -- | creates a nonempty container of length "sz" with chunks of a given -- size: @see chunkNLen must fill the container exactly chunkNLen1 :: forall a u. Foldable u => Pos -> Pos -> u a -> Either String (NonEmpty (NonEmpty a)) -- | represents the status of a split a nonempty list data Split1 a SplitLT :: !Pos -> Split1 a SplitEQ :: Split1 a SplitGT :: !NonEmpty a -> Split1 a -- | comparator for Split1 split1Ordering :: Split1 a -> Ordering -- | splitAt for a nonempty list but doesnt guarantee the number of -- elements splitAt1 :: Pos -> NonEmpty a -> (NonEmpty a, [a]) -- | split a nonempty list preserving information about the split splitAt1' :: forall a. Pos -> NonEmpty a -> (NonEmpty a, Split1 a) -- | split a nonempty list but has to have enough elements else fails splitAt1GE :: Pos -> NonEmpty a -> Either String (NonEmpty a, [a]) -- | repeatedly split a nonempty list splitAts1 :: Pos -> NonEmpty a -> NonEmpty (NonEmpty a) -- | break up a nonempty list into all possible pairs of nonempty lists splits1 :: forall a. NonEmpty a -> [(NonEmpty a, NonEmpty a)] -- | break up a nonempty list into a nonempty list of three parts splits3 :: forall a. NonEmpty a -> NonEmpty ([a], a, [a]) -- | partitionThese for a nonempty list partition1 :: Foldable1 t => (a -> Bool) -> t a -> These (NonEmpty a) (NonEmpty a) -- | like span but applies the predicate to adjacent elements spanAdjacent1 :: (a -> a -> Bool) -> NonEmpty a -> (NonEmpty a, [a]) -- | like break but applies the predicate to adjacent elements breakAdjacent1 :: (a -> a -> Bool) -> NonEmpty a -> (NonEmpty a, [a]) -- | span for a nonempty list span1 :: Foldable1 t => (a -> Bool) -> t a -> These (NonEmpty a) (NonEmpty a) -- | break for a nonempty list break1 :: Foldable1 t => (a -> Bool) -> t a -> These (NonEmpty a) (NonEmpty a) -- | possible results for determining if a nonempty list is in ascending -- order data Seq1 a -- | generated enumerable sequence is shorter than the original list S1Short :: !NonEmpty a -> Seq1 a -- | first mismatch S1Fail :: !(a, a) -> Seq1 a -- | both sequences match S1Ok :: Seq1 a -- | predicate for an ascending nonempty list isSequence1 :: (Foldable1 t, Eq a, Enum a) => t a -> Bool -- | shows the first failure or if the length of the enum is too short isEnumAscending :: forall t a. (Foldable1 t, Eq a, Enum a) => t a -> Seq1 a -- | predicate for S1Short seq1Ordering :: Seq1 a -> Ordering -- | uncons for a nonempty list uncons1 :: forall a. NonEmpty a -> (a, [a]) -- | unsnoc for a nonempty list unsnoc1 :: forall a. NonEmpty a -> ([a], a) -- | cons iso from NonEmpty consNonEmpty :: Iso (NonEmpty a) (NonEmpty b) (a, [a]) (b, [b]) -- | snoc iso from NonEmpty snocNonEmpty :: Iso (NonEmpty a) (NonEmpty b) ([a], a) ([b], b) -- | sum of nonempty list of Pos values sumP :: Foldable1 t => t Pos -> Pos -- | length of nonempty list lengthP :: Foldable1 t => t a -> Pos -- | "foldMapM" for nonempty containers: uses Semigroup instead of Monoid foldMapM1 :: forall b m f a. (Semigroup b, Monad m, Foldable1 f) => (a -> m b) -> f a -> m b -- | unfoldr for a nonempty list -- -- will not terminate if the user keeps returning a larger [s] than -- received unfoldr1NE :: forall s a. (NonEmpty s -> (a, [s])) -> NonEmpty s -> NonEmpty a -- | unfoldM for nonempty results unfoldrM1 :: Monad m => (s -> m (a, Maybe s)) -> s -> m (NonEmpty a) -- | like iterateMaybe1' with boolMaybe iterateMaybe1 :: (a -> Bool) -> (a -> a) -> a -> NonEmpty a -- | like iterate but allows termination using Maybe iterateMaybe1' :: (a -> Maybe a) -> a -> NonEmpty a -- | iterate "n" times iterateN1 :: Pos -> (a -> a) -> a -> NonEmpty a -- | generate a repeated nonempty list of values for a fixed size replicateP :: Pos -> a -> NonEmpty a -- | append a list with a nonempty list appendL1 :: [a] -> NonEmpty a -> NonEmpty a -- | append a nonempty list with a list appendR1 :: NonEmpty a -> [a] -> NonEmpty a -- | snoc for a nonempty list snoc1 :: Foldable t => t a -> a -> NonEmpty a -- | update a value at an index starting at one updateAt1 :: Pos -> (a -> a) -> NonEmpty a -> Maybe (NonEmpty a) -- | get a value at an index starting at one at1 :: Pos -> NonEmpty a -> Maybe a -- | set a value at an index starting at one setAt1 :: Pos -> a -> NonEmpty a -> Maybe (NonEmpty a) -- | generate a nonempty list of units for a fixed size units1 :: Pos -> NonEmpty () -- | generate a nonempty list of units for a given container of the given -- size unitsF :: forall l a. (IsList (l a), Item (l a) ~ ()) => Pos -> l a -- | compares the length of a potentially infinite nonempty list with "n" -- and succeeds if they are the same lengthExact1 :: Pos -> NonEmpty a -> Either String (NonEmpty a) -- | take for a nonempty list take1 :: Pos -> NonEmpty a -> NonEmpty a -- | sum for a nonempty list sum1 :: (Foldable1 t, Num a) => t a -> a -- | groupBy1 but applies the predicate to adjacent elements groupByAdjacent1 :: forall a. (a -> a -> Bool) -> NonEmpty a -> NonEmpty (NonEmpty a) -- | partition duplicates elements together with their positiion findDupsBy :: forall a c. Ord c => (a -> c) -> [a] -> ([NonEmpty (Int, a)], [(Int, a)]) -- | replicate for a nonempty list replicate1 :: Pos -> a -> NonEmpty a -- | replicateM for a nonempty list replicate1M :: Applicative m => Pos -> m a -> m (NonEmpty a) instance (GHC.Classes.Ord a, GHC.Classes.Ord b) => GHC.Classes.Ord (Primus.NonEmpty.MLR a b) instance (GHC.Classes.Eq a, GHC.Classes.Eq b) => GHC.Classes.Eq (Primus.NonEmpty.MLR a b) instance (GHC.Show.Show a, GHC.Show.Show b) => GHC.Show.Show (Primus.NonEmpty.MLR a b) instance GHC.Base.Functor Primus.NonEmpty.Seq1 instance GHC.Classes.Ord a => GHC.Classes.Ord (Primus.NonEmpty.Seq1 a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Primus.NonEmpty.Seq1 a) instance GHC.Show.Show a => GHC.Show.Show (Primus.NonEmpty.Seq1 a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Primus.NonEmpty.Split1 a) instance GHC.Show.Show a => GHC.Show.Show (Primus.NonEmpty.Split1 a) instance GHC.Classes.Ord a => GHC.Classes.Ord (Primus.NonEmpty.Split1 a) module Primus.Num1 -- | lifted version of Num class for handling failure minimal definition -- requires toInteger1 and fromInteger1 unless leveraging -- default signatures class Num1 a -- | required method for converting from "a" to an Integer toInteger1 :: Num1 a => a -> Integer -- | required method for converting from "a" to an Integer toInteger1 :: (Num1 a, Enum a) => a -> Integer -- | required method for trying to convert from an Integer to "a" fromInteger1 :: Num1 a => a -> Integer -> Either String a -- | required method for trying to convert from an Integer to "a" fromInteger1 :: (Num1 a, Bounded a, Enum a) => a -> Integer -> Either String a (.+) :: Num1 a => Either String a -> Either String a -> Either String a (.-) :: Num1 a => Either String a -> Either String a -> Either String a (.*) :: Num1 a => Either String a -> Either String a -> Either String a negate1 :: Num1 a => Either String a -> Either String a abs1 :: Num1 a => Either String a -> Either String a signum1 :: Num1 a => Either String a -> Either String a succ1 :: Num1 a => Either String a -> Either String a pred1 :: Num1 a => Either String a -> Either String a infixl 6 .+ infixl 6 .- infixl 7 .* -- | run a function of one integer against the underlying Num1 type withOp :: Num1 a => (Integer -> Integer) -> a -> Either String a -- | run a function of two integers against the underlying Num1 -- types withOp2 :: Num1 a => (Integer -> Integer -> Integer) -> a -> a -> Either String a -- | run a function of three integers against the underlying Num1 -- types withOp3 :: Num1 a => (Integer -> Integer -> Integer -> Integer) -> a -> a -> a -> Either String a -- | run a function of four integers against the underlying Num1 -- types withOp4 :: Num1 a => (Integer -> Integer -> Integer -> Integer -> Integer) -> a -> a -> a -> a -> Either String a instance Primus.Num1.Num1 GHC.Natural.Natural instance Primus.Num1.Num1 Data.Pos.Pos instance Primus.Num1.Num1 GHC.Word.Word8 instance Primus.Num1.Num1 GHC.Word.Word16 instance Primus.Num1.Num1 GHC.Word.Word32 instance Primus.Num1.Num1 GHC.Word.Word64 instance Primus.Num1.Num1 GHC.Types.Int instance Primus.Num1.Num1 GHC.Int.Int8 instance Primus.Num1.Num1 GHC.Int.Int16 instance Primus.Num1.Num1 GHC.Int.Int32 instance Primus.Num1.Num1 GHC.Int.Int64 -- | handles a tuple of size one. this is a special type that distinguishes -- a singleton value from a ntuple will be replaced by Solo when ghc 9.2 -- is standard and generics-sop is updated to support Solo module Primus.One -- | One holds a single value. To use wprint we need a SOP Generics -- instance newtype One a One :: a -> One a -- | unwrap One unOne :: One a -> a instance Data.Semigroup.Foldable.Class.Foldable1 Primus.One.One instance Control.DeepSeq.NFData1 Primus.One.One instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Primus.One.One a) instance GHC.Base.Monoid a => GHC.Base.Monoid (Primus.One.One a) instance GHC.Base.Semigroup a => GHC.Base.Semigroup (Primus.One.One a) instance Data.Foldable.Foldable Primus.One.One instance GHC.Base.Functor Primus.One.One instance GHC.Read.Read a => GHC.Read.Read (Primus.One.One a) instance Data.Traversable.Traversable Primus.One.One instance GHC.Classes.Ord a => GHC.Classes.Ord (Primus.One.One a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Primus.One.One a) instance GHC.Show.Show a => GHC.Show.Show (Primus.One.One a) instance GHC.Generics.Generic1 Primus.One.One instance GHC.Generics.Generic (Primus.One.One a) instance Data.Data.Data a => Data.Data.Data (Primus.One.One a) instance GHC.Base.Applicative Primus.One.One instance Data.Functor.Bind.Class.Apply Primus.One.One instance GHC.Base.Monad Primus.One.One instance Data.Semigroup.Traversable.Class.Traversable1 Primus.One.One module Primus.Rep -- | builds a representable from the left using past and future inputs buildRepL :: forall f a b. (Traversable f, Representable f) => ([Rep f] -> [Rep f] -> b -> Rep f -> (b, a)) -> b -> (b, f a) -- | same as buildRepL but associates to the right buildRepR :: forall f a b. (Traversable f, Representable f) => ([Rep f] -> [Rep f] -> b -> Rep f -> (b, a)) -> b -> (b, f a) -- | fill a representable container with a foldable fillRep :: forall f a. (Representable f, Traversable f) => [a] -> Either String ([a], f a) -- | load a fixed container with "a"s using the relative position "i" toEnumRep :: forall f a. (Traversable f, Representable f, Enum a, Bounded a) => Integer -> Either String (f a) -- | zipWith with rep index izipWithR :: Representable f => (Rep f -> a -> b -> c) -> f a -> f b -> f c -- | zipWithM with rep index izipWithRF :: (Representable f, Distributive g) => (Rep f -> a -> b -> g c) -> f a -> f b -> g (f c) -- | like scanr passes in the Rep index and removes the first -- element ipostscanr :: (Representable f, Traversable f) => (Rep f -> a -> b -> b) -> b -> f a -> f b -- | like scanl passes in the Rep index and removes the last -- element ipostscanl :: (Representable f, Traversable f) => (Rep f -> b -> a -> b) -> b -> f a -> f b -- | left/right unfold from the right into a Representable unfoldlRep :: (Representable f, Traversable f) => (Rep f -> s -> (s, a)) -> s -> (s, f a) -- | left/right unfold from the right into a Representable unfoldrRep :: (Representable f, Traversable f) => (Rep f -> s -> (s, a)) -> s -> (s, f a) module Primus module Primus.TypeLevel -- | extract an int from a Nat pnat :: forall n. KnownNat n => Int -- | fail with error message if "b" is 'False type family FailUnless b err -- | "fst" at the typelevel type family Fst tp -- | "snd" at the typelevel type family Snd tp -- | "map fst" at the typelevel type family Fsts rs -- | "map snd" at the typelevel type family Snds rs -- | length at the typelevel type family LengthT rs -- | ensure that two types are not equal type family NotEqTC a b -- | cons a type to a nonempty list at the type level type family Cons1T a ys = result | result -> a ys -- | snoc a type list to a type type family SnocT as b -- | get the init of a list type family InitT xs -- | peel off the bottom-most index in the matrix type family LastT ns -- | create a constraint from a type and list of constraints taking a type type family ApplyConstraints1 xs x -- | create a constraint from a list of types and a constraint that take a -- type type family ApplyConstraint c xs -- | create a constraint from a list of types and list of constraints that -- take a type type family ApplyConstraints cs xs -- | unsnoc a type level nonempty list type family UnsnocT ns -- | cons a type to the first element in a tuple type family FirstConsT a b = result | result -> a b -- | convert a flat tuple type to an inductive tuple type family ToITupleT x = result | result -> x -- | convert an inductive tuple to a flat tuple type type family FromITupleT x = result | result -> x -- | conversions to and from an inductive tuple and a flat tuple class ITupleC x toITupleC :: ITupleC x => x -> ToITupleT x fromITupleC :: ITupleC x => ToITupleT x -> x -- | append two type level lists type family (++) xs ys infixr 5 ++ -- | type level boolean implication type family x :=> y instance Primus.TypeLevel.ITupleC (Primus.One.One a1) instance Primus.TypeLevel.ITupleC (a1, a2) instance Primus.TypeLevel.ITupleC (a1, a2, a3) instance Primus.TypeLevel.ITupleC (a1, a2, a3, a4) instance Primus.TypeLevel.ITupleC (a1, a2, a3, a4, a5) instance Primus.TypeLevel.ITupleC (a1, a2, a3, a4, a5, a6) instance Primus.TypeLevel.ITupleC (a1, a2, a3, a4, a5, a6, a7) instance Primus.TypeLevel.ITupleC (a1, a2, a3, a4, a5, a6, a7, a8) instance Primus.TypeLevel.ITupleC (a1, a2, a3, a4, a5, a6, a7, a8, a9) instance Primus.TypeLevel.ITupleC (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) -- | tracks one or more successes and optionally a failure -- -- prefer the smart constructors to enforce correctness or use the apply -- methods module Primus.LRHist -- | like Either but keeps track of history of all successes if -- there is a failure it wraps the previous successes and stops adding -- data to LRHist "e" the error type "as" is the typelevel list in -- reverse order that tracks all previous "a"s "a" is the latest success -- type data LRHist as e a -- | wraps an existing error [LhSkip] :: LRHist as e a' -> LRHist (a' : as) e a -- | wraps previous nested successes with an error [Lh] :: e -> LRHist as e a' -> LRHist (a' : as) e a -- | initial success value [Rhi] :: a -> LRHist '[] e a -- | subsequent success [Rh] :: a -> LRHist as e a' -> LRHist (a' : as) e a -- | smart constructor for Rhi rhi :: forall e a. a -> (Proxy 'True, LRHist '[] e a) -- | smart constructor for Rh rh :: forall e a a' as proxy. a -> (proxy 'True, LRHist as e a') -> (proxy 'True, LRHist (a' : as) e a) -- | smart constructor for Lh lh :: forall a e a' as proxy. e -> (proxy 'True, LRHist as e a') -> (Proxy 'False, LRHist (a' : as) e a) -- | smart constructor for LhSkip lhskip :: forall a e a' as proxy. (proxy 'False, LRHist as e a') -> (proxy 'False, LRHist (a' : as) e a) -- | constructor for Rhi with more convenient type application order rhi' :: forall e a. a -> LRHist '[] e a -- | constructor for Rh with more convenient type application order rh' :: forall e a a' as. a -> LRHist as e a' -> LRHist (a' : as) e a -- | constructor for Lh with more convenient type application order lh' :: forall a e a' as. e -> LRHist as e a' -> LRHist (a' : as) e a -- | constructor for LhSkip with more convenient type application -- order lhskip' :: forall a e a' as. LRHist as e a' -> LRHist (a' : as) e a -- | returns an inductive tuple on success and Either for failure lhToEitherI :: forall e a as. RHistC as => LRHist as e a -> Either e (RHistT a as) -- | convert LRHist to an Either lhToEither :: forall e a as. LRHist as e a -> Either e a -- | returns flattened n-tuple with all the history of successes on success -- and Either for failure lhToEitherTuples :: forall e a as tp. (ITupleC tp, RHistC as, ToITupleT tp ~ RHistT a as) => LRHist as e a -> Either e tp -- | uses a boolean predicate to determine success or failure lhBool :: forall e a a' as. (a ~ a', Monoid e) => (a' -> Bool) -> LRHist as e a' -> LRHist (a' : as) e a -- | uses a maybe function to determine success or failure and also allow -- change of type "a" lhMaybe :: forall e a a' as. Monoid e => (a' -> Maybe a) -> LRHist as e a' -> LRHist (a' : as) e a -- | similar to lhMaybe leveraging boolMaybe lhMaybe' :: forall e a a' as. Monoid e => (a' -> Bool) -> (a' -> a) -> LRHist as e a' -> LRHist (a' : as) e a -- | uses an either function to determine success or failure and also allow -- change of type "a" lhEither :: forall e a a' as. (a' -> Either e a) -> LRHist as e a' -> LRHist (a' : as) e a -- | similar to lhEither leveraging boolEither lhEither' :: forall e a a' as. (a' -> Bool) -> (a' -> e) -> (a' -> a) -> LRHist as e a' -> LRHist (a' : as) e a -- | apply a function to LRHist using ApTheseF appLR :: forall e a a' as x. ApTheseF e a' x a => (a' -> x) -> LRHist as e a' -> LRHist (a' : as) e a -- | similar to appLR with state appLRS :: forall e a' x a as z. ApTheseF e a' x a => (z -> a' -> (z, x)) -> z -> LRHist as e a' -> (z, LRHist (a' : as) e a) -- | apply a function to a LRHist via boolEither appLRB :: forall e a a' as. (a' -> Bool) -> (a' -> e) -> (a' -> a) -> LRHist as e a' -> LRHist (a' : as) e a -- | convenience method to apply appLRB to a container of -- LRHist traverseLRHistB :: forall e a t a' as. Functor t => (a' -> Bool) -> (a' -> e) -> (a' -> a) -> t (LRHist as e a') -> t (LRHist (a' : as) e a) -- | convenience method to apply appLR to a container of -- LRHist with state traverseLRHist :: forall e a t a' as z. Traversable t => (z -> a' -> (z, Either e a)) -> z -> t (LRHist as e a') -> (z, t (LRHist (a' : as) e a)) -- | initialise LRHist with an Either by wrapping a unit eitherToLH :: Either e a -> LRHist '[()] e a -- | initialise LRHist with an Maybe by wrapping a unit maybeToLH :: Monoid e => Maybe a -> LRHist '[()] e a -- | validate that the composition of constructors for LRHist is -- valid validateLRHist :: forall e a as. LRHist as e a -> Either String () instance GHC.Base.Functor (Primus.LRHist.LRHist as e) instance Data.Foldable.Foldable (Primus.LRHist.LRHist as e) instance Data.Traversable.Traversable (Primus.LRHist.LRHist as e) instance (GHC.Show.Show a, GHC.Show.Show e, Primus.TypeLevel.ApplyConstraints '[GHC.Show.Show] as) => GHC.Show.Show (Primus.LRHist.LRHist as e a) instance (Primus.TypeLevel.ApplyConstraints '[GHC.Classes.Eq, GHC.Classes.Ord] as, GHC.Classes.Eq e, GHC.Classes.Ord e, GHC.Classes.Ord a) => GHC.Classes.Ord (Primus.LRHist.LRHist as e a) instance (Primus.TypeLevel.ApplyConstraints '[GHC.Classes.Eq] as, GHC.Classes.Eq e, GHC.Classes.Eq a) => GHC.Classes.Eq (Primus.LRHist.LRHist as e a) instance Primus.LRHist.RHistC '[] instance Primus.LRHist.RHistC as => Primus.LRHist.RHistC (a : as) instance Primus.LRHist.OrgAC '[] a' instance Primus.LRHist.OrgAC as a => Primus.LRHist.OrgAC (a : as) a' instance (GHC.Base.Semigroup e, GHC.Base.Monoid a) => GHC.Base.Monoid (Primus.LRHist.LRHist '[] e a) instance (GHC.Base.Monoid a, GHC.Base.Monoid e, GHC.Base.Monoid a', Primus.TypeLevel.ApplyConstraints '[GHC.Base.Semigroup, GHC.Base.Monoid] as, GHC.Base.Monoid (Primus.LRHist.LRHist as e a')) => GHC.Base.Monoid (Primus.LRHist.LRHist (a' : as) e a) instance (GHC.Base.Semigroup a, GHC.Base.Semigroup e, Primus.TypeLevel.ApplyConstraints '[GHC.Base.Semigroup] as) => GHC.Base.Semigroup (Primus.LRHist.LRHist as e a) instance (GHC.Read.Read a, GHC.Read.Read e) => GHC.Read.Read (Primus.LRHist.LRHist '[] e a) instance (GHC.Read.Read a, GHC.Read.Read e, GHC.Read.Read a', GHC.Read.Read (Primus.LRHist.LRHist as e a'), Primus.TypeLevel.ApplyConstraints '[GHC.Read.Read] as) => GHC.Read.Read (Primus.LRHist.LRHist (a' : as) e a) instance Data.Bifunctor.Bifunctor (Primus.LRHist.LRHist as) instance Data.Bifoldable.Bifoldable (Primus.LRHist.LRHist as) instance Data.Bitraversable.Bitraversable (Primus.LRHist.LRHist as) module Primus.ZipNonEmpty -- | zippable version of NonEmpty newtype ZipNonEmpty a ZipNonEmpty :: NonEmpty a -> ZipNonEmpty a -- | iso for the zipnonempty constructor _Zip1 :: Iso (ZipNonEmpty a) (ZipNonEmpty b) (NonEmpty a) (NonEmpty b) -- | unwrap ZipNonEmpty unZipNonEmpty :: ZipNonEmpty a -> NonEmpty a instance GHC.Base.Functor Primus.ZipNonEmpty.ZipNonEmpty instance Data.Semigroup.Foldable.Class.Foldable1 Primus.ZipNonEmpty.ZipNonEmpty instance Data.Foldable.Foldable Primus.ZipNonEmpty.ZipNonEmpty instance Control.DeepSeq.NFData1 Primus.ZipNonEmpty.ZipNonEmpty instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Primus.ZipNonEmpty.ZipNonEmpty a) instance GHC.Read.Read a => GHC.Read.Read (Primus.ZipNonEmpty.ZipNonEmpty a) instance Data.Traversable.Traversable Primus.ZipNonEmpty.ZipNonEmpty instance GHC.Classes.Ord a => GHC.Classes.Ord (Primus.ZipNonEmpty.ZipNonEmpty a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Primus.ZipNonEmpty.ZipNonEmpty a) instance GHC.Show.Show a => GHC.Show.Show (Primus.ZipNonEmpty.ZipNonEmpty a) instance GHC.Generics.Generic1 Primus.ZipNonEmpty.ZipNonEmpty instance GHC.Generics.Generic (Primus.ZipNonEmpty.ZipNonEmpty a) instance Data.Data.Data a => Data.Data.Data (Primus.ZipNonEmpty.ZipNonEmpty a) instance GHC.Base.Monoid a => GHC.Base.Monoid (Primus.ZipNonEmpty.ZipNonEmpty a) instance GHC.Base.Semigroup a => GHC.Base.Semigroup (Primus.ZipNonEmpty.ZipNonEmpty a) instance GHC.Base.Applicative Primus.ZipNonEmpty.ZipNonEmpty instance Data.Functor.Bind.Class.Apply Primus.ZipNonEmpty.ZipNonEmpty instance Data.Semigroup.Traversable.Class.Traversable1 Primus.ZipNonEmpty.ZipNonEmpty instance GHC.Exts.IsList (Primus.ZipNonEmpty.ZipNonEmpty a)