-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | List-like structures with static restrictions on the number of elements -- -- We provide the data type NonEmpty that allows to store a -- list-like structure with at least or exactly n elements, -- where n is fixed in the type in a kind of Peano encoding and -- is usually small. The datatype is intended to increase safety by -- making functions total that are partial on plain lists. E.g. on a -- non-empty list, head and tail are always defined. -- -- There are more such data types like Optional and -- Empty. Together with NonEmpty you can define a list -- type for every finite set of admissible list lengths. -- -- The datatype can be combined with Lists, Sequences and Sets (from the -- containers package). -- -- The package needs only Haskell 98. -- -- Similar packages: -- --
-- fmap f xs -- = zipWith (\x _ -> f x) xs xs -- = zipWith (\_ x -> f x) xs xs --class Functor f => Zip f zipWith :: Zip f => (a -> b -> c) -> f a -> f b -> f c zipWith3 :: Zip f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d zipWith4 :: Zip f => (a -> b -> c -> d -> e) -> f a -> f b -> f c -> f d -> f e zip :: Zip f => f a -> f b -> f (a, b) zip3 :: Zip f => f a -> f b -> f c -> f (a, b, c) zip4 :: Zip f => f a -> f b -> f c -> f d -> f (a, b, c, d) class Repeat f -- | Create a container with as many copies as possible of a given value. -- That is, for a container with fixed size n, the call -- repeat x will generate a container with n copies of -- x. repeat :: Repeat f => a -> f a class Repeat f => Iterate f iterate :: Iterate f => (a -> a) -> a -> f a -- | We need to distinguish between Sort and SortBy, since -- there is an instance Sort Set but there cannot be an -- instance SortBy Set. class Sort f sort :: (Sort f, Ord a) => f a -> f a -- | Default implementation for sort based on sortBy. sortDefault :: (Ord a, SortBy f) => f a -> f a class Sort f => SortBy f sortBy :: SortBy f => (a -> a -> Ordering) -> f a -> f a class Sort f => SortKey f sortKey :: (SortKey f, Ord b) => (a -> b) -> f a -> f a sortKeyGen :: (SortBy f, Functor f, Ord b) => (a -> b) -> f a -> f a class Reverse f reverse :: Reverse f => f a -> f a class Show f showsPrec :: (Show f, Show a) => Int -> f a -> ShowS class Arbitrary f arbitrary :: (Arbitrary f, Arbitrary a) => Gen (f a) shrink :: (Arbitrary f, Arbitrary a) => f a -> [f a] class (Arbitrary f) => Gen f genOf :: Gen f => Gen a -> Gen (f a) class NFData f rnf :: (NFData f, NFData a) => f a -> () class Ix f range :: (Ix f, Ix i) => (f i, f i) -> [f i] index :: (Ix f, Ix i) => (f i, f i) -> f i -> Int inRange :: (Ix f, Ix i) => (f i, f i) -> f i -> Bool rangeSize :: (Ix f, Ix i) => (f i, f i) -> Int -- | The default implementation causes quadratic runtime on nested index -- tuple types. This affects the index function, too. rangeSizeIndex :: (Ix f, Ix i) => (f i, f i) -> (Int, f i -> Int) -- | A custom implementation of this function allows for an even more -- efficient implementation of index on nested NonEmpty -- constructors. indexHorner :: (Ix f, Ix i) => (f i, f i) -> Int -> f i -> Int instance Data.NonEmpty.Class.NFData GHC.Maybe.Maybe instance Data.NonEmpty.Class.NFData [] instance Data.NonEmpty.Class.NFData Data.Set.Internal.Set instance Control.DeepSeq.NFData k => Data.NonEmpty.Class.NFData (Data.Map.Internal.Map k) instance Data.NonEmpty.Class.Gen [] instance Data.NonEmpty.Class.Gen Data.Sequence.Internal.Seq instance Data.NonEmpty.Class.Gen GHC.Maybe.Maybe instance (Test.QuickCheck.Arbitrary.Arbitrary k, GHC.Classes.Ord k) => Data.NonEmpty.Class.Gen (Data.Map.Internal.Map k) instance Data.NonEmpty.Class.Arbitrary [] instance Data.NonEmpty.Class.Arbitrary Data.Sequence.Internal.Seq instance Data.NonEmpty.Class.Arbitrary GHC.Maybe.Maybe instance (Test.QuickCheck.Arbitrary.Arbitrary k, GHC.Classes.Ord k) => Data.NonEmpty.Class.Arbitrary (Data.Map.Internal.Map k) instance Data.NonEmpty.Class.Show [] instance Data.NonEmpty.Class.Show GHC.Maybe.Maybe instance Data.NonEmpty.Class.Show Data.Sequence.Internal.Seq instance Data.NonEmpty.Class.Show Data.Set.Internal.Set instance Data.NonEmpty.Class.Reverse [] instance Data.NonEmpty.Class.Reverse GHC.Maybe.Maybe instance Data.NonEmpty.Class.Reverse Data.Sequence.Internal.Seq instance Data.NonEmpty.Class.SortKey [] instance Data.NonEmpty.Class.SortKey GHC.Maybe.Maybe instance Data.NonEmpty.Class.SortKey Data.Sequence.Internal.Seq instance Data.NonEmpty.Class.SortBy [] instance Data.NonEmpty.Class.SortBy GHC.Maybe.Maybe instance Data.NonEmpty.Class.SortBy Data.Sequence.Internal.Seq instance Data.NonEmpty.Class.Sort [] instance Data.NonEmpty.Class.Sort GHC.Maybe.Maybe instance Data.NonEmpty.Class.Sort Data.Sequence.Internal.Seq instance Data.NonEmpty.Class.Sort Data.Set.Internal.Set instance Data.NonEmpty.Class.Iterate [] instance Data.NonEmpty.Class.Iterate GHC.Maybe.Maybe instance Data.NonEmpty.Class.Repeat [] instance Data.NonEmpty.Class.Repeat GHC.Maybe.Maybe instance Data.NonEmpty.Class.Zip [] instance Data.NonEmpty.Class.Zip GHC.Maybe.Maybe instance Data.NonEmpty.Class.Zip Data.Sequence.Internal.Seq instance Data.NonEmpty.Class.Append [] instance Data.NonEmpty.Class.Append Data.Sequence.Internal.Seq instance Data.NonEmpty.Class.Singleton [] instance Data.NonEmpty.Class.Singleton GHC.Maybe.Maybe instance Data.NonEmpty.Class.Singleton Data.Set.Internal.Set instance Data.NonEmpty.Class.Singleton Data.Sequence.Internal.Seq instance Data.NonEmpty.Class.View [] instance Data.NonEmpty.Class.View GHC.Maybe.Maybe instance Data.NonEmpty.Class.View Data.Set.Internal.Set instance Data.NonEmpty.Class.View Data.Sequence.Internal.Seq instance Data.NonEmpty.Class.ViewR [] instance Data.NonEmpty.Class.ViewR GHC.Maybe.Maybe instance Data.NonEmpty.Class.ViewR Data.Set.Internal.Set instance Data.NonEmpty.Class.ViewR Data.Sequence.Internal.Seq instance Data.NonEmpty.Class.ViewL [] instance Data.NonEmpty.Class.ViewL GHC.Maybe.Maybe instance Data.NonEmpty.Class.ViewL Data.Set.Internal.Set instance Data.NonEmpty.Class.ViewL Data.Sequence.Internal.Seq instance Data.NonEmpty.Class.Snoc [] instance Data.NonEmpty.Class.Snoc Data.Sequence.Internal.Seq instance Data.NonEmpty.Class.Cons [] instance Data.NonEmpty.Class.Cons Data.Sequence.Internal.Seq instance Data.NonEmpty.Class.Empty [] instance Data.NonEmpty.Class.Empty GHC.Maybe.Maybe instance Data.NonEmpty.Class.Empty Data.Set.Internal.Set instance Data.NonEmpty.Class.Empty (Data.Map.Internal.Map k) instance Data.NonEmpty.Class.Empty Data.Sequence.Internal.Seq module Data.Empty data T a Cons :: T a switch :: b -> T a -> b instance GHC.Classes.Ord (Data.Empty.T a) instance GHC.Classes.Eq (Data.Empty.T a) instance GHC.Show.Show (Data.Empty.T a) instance Data.NonEmpty.Class.Show Data.Empty.T instance GHC.Base.Functor Data.Empty.T instance Data.Foldable.Foldable Data.Empty.T instance Data.Traversable.Traversable Data.Empty.T instance Data.NonEmpty.Class.ViewL Data.Empty.T instance Data.NonEmpty.Class.ViewR Data.Empty.T instance Data.NonEmpty.Class.View Data.Empty.T instance Test.QuickCheck.Arbitrary.Arbitrary (Data.Empty.T a) instance Data.NonEmpty.Class.Arbitrary Data.Empty.T instance Data.NonEmpty.Class.Gen Data.Empty.T instance Data.NonEmpty.Class.Empty Data.Empty.T instance Data.NonEmpty.Class.Zip Data.Empty.T instance Data.NonEmpty.Class.Reverse Data.Empty.T instance Data.NonEmpty.Class.Sort Data.Empty.T instance Data.NonEmpty.Class.SortBy Data.Empty.T instance Data.NonEmpty.Class.Repeat Data.Empty.T instance Data.NonEmpty.Class.Iterate Data.Empty.T instance Data.NonEmpty.Class.NFData Data.Empty.T instance Control.DeepSeq.NFData (Data.Empty.T a) instance Data.NonEmpty.Class.Ix Data.Empty.T instance GHC.Ix.Ix i => GHC.Ix.Ix (Data.Empty.T i) module Data.Append data T f g a Cons :: f a -> g a -> T f g a [fst] :: T f g a -> f a [snd] :: T f g a -> g a instance (GHC.Base.Functor f, GHC.Base.Functor g) => GHC.Base.Functor (Data.Append.T f g) instance (Data.Foldable.Foldable f, Data.Foldable.Foldable g) => Data.Foldable.Foldable (Data.Append.T f g) instance (Data.Traversable.Traversable f, Data.Traversable.Traversable g) => Data.Traversable.Traversable (Data.Append.T f g) instance (Data.NonEmpty.Class.NFData f, Data.NonEmpty.Class.NFData g) => Data.NonEmpty.Class.NFData (Data.Append.T f g) instance (Data.NonEmpty.Class.NFData f, Data.NonEmpty.Class.NFData g, Control.DeepSeq.NFData a) => Control.DeepSeq.NFData (Data.Append.T f g a) -- | Generalized version of utility-ht:Data.List.Match. module Data.NonEmpty.Match -- | Make a list as long as another one take :: Zip f => f b -> f a -> f a -- | the same as ($>) replicate :: Functor f => f a -> b -> f b module Data.NonEmpty -- | The type T can be used for many kinds of list-like structures -- with restrictions on the size. -- --
-- foldl1Map f g = foldl1 f . fmap g ---- -- but foldl1Map does not need a Functor instance. foldl1Map :: Foldable f => (b -> b -> b) -> (a -> b) -> T f a -> b -- | Fold a non-empty list in a balanced way. Balanced means that -- each element has approximately the same depth in the operator tree. -- Approximately the same depth means that the difference between -- maximum and minimum depth is at most 1. The accumulation operation -- must be associative and commutative in order to get the same result as -- foldl1 or foldr1. foldBalanced :: (a -> a -> a) -> T [] a -> a foldBalancedStrict :: (a -> a -> a) -> T [] a -> a -- | maximum is a total function maximum :: (Ord a, Foldable f) => T f a -> a -- | maximumBy is a total function maximumBy :: Foldable f => (a -> a -> Ordering) -> T f a -> a -- | maximumKey is a total function maximumKey :: (Ord b, Foldable f) => (a -> b) -> T f a -> a -- | minimum is a total function minimum :: (Ord a, Foldable f) => T f a -> a -- | minimumBy is a total function minimumBy :: Foldable f => (a -> a -> Ordering) -> T f a -> a -- | minimumKey is a total function minimumKey :: (Ord b, Foldable f) => (a -> b) -> T f a -> a -- | sum does not need a zero for initialization sum :: (Num a, Foldable f) => T f a -> a -- | product does not need a one for initialization product :: (Num a, Foldable f) => T f a -> a chop :: (a -> Bool) -> [a] -> T [] [a] append :: (Append f, Traversable f) => T f a -> T f a -> T (T f) a infixr 5 `append` appendLeft :: (Append f, Traversable f) => f a -> T f a -> T f a infixr 5 `appendLeft` appendRight :: Append f => T f a -> f a -> T f a infixr 5 `appendRight` -- | generic variants: cycle or better Semigroup.cycle cycle :: (Cons f, Append f) => T f a -> T f a zipWith :: Zip f => (a -> b -> c) -> T f a -> T f b -> T f c mapAdjacent :: Traversable f => (a -> a -> b) -> T f a -> f b class Insert f -- | Insert an element into an ordered list while preserving the order. insert :: (Insert f, Ord a) => a -> f a -> T f a -- | Default implementation for insert based on insertBy. insertDefault :: (Ord a, InsertBy f, SortBy f) => a -> f a -> T f a class Insert f => InsertBy f insertBy :: InsertBy f => (a -> a -> Ordering) -> a -> f a -> T f a scanl :: Traversable f => (b -> a -> b) -> b -> f a -> T f b scanr :: Traversable f => (a -> b -> b) -> b -> f a -> T f b tails :: (Traversable f, Cons g, Empty g) => f a -> T f (g a) -- | Only advised for structures with efficient appending of single -- elements like Sequence. Alternatively you may consider -- initsRev. inits :: (Traversable f, Snoc g, Empty g) => f a -> T f (g a) initsRev :: (Traversable f, Cons g, Empty g, Reverse g) => f a -> T f (g a) removeEach :: Traversable f => T f a -> T f (a, f a) -- |
-- \xs -> mapMaybe EitherHT.maybeLeft (NonEmpty.flatten xs) == either NonEmpty.flatten fst (NonEmpty.partitionEithersLeft (xs::NonEmpty.T[](Either Char Int))) ---- --
-- \xs -> mapMaybe EitherHT.maybeRight (NonEmpty.flatten xs) == either (const []) (NonEmpty.flatten . snd) (NonEmpty.partitionEithersLeft (xs::NonEmpty.T[](Either Char Int))) ---- --
-- \xs -> NonEmpty.partitionEithersRight (fmap EitherHT.swap xs) == EitherHT.mapLeft swap (EitherHT.swap (NonEmpty.partitionEithersLeft (xs::NonEmpty.T[](Either Char Int)))) --partitionEithersLeft :: T [] (Either a b) -> Either (T [] a) ([a], T [] b) -- |
-- \xs -> NonEmpty.partitionEithersLeft (fmap EitherHT.swap xs) == EitherHT.mapRight swap (EitherHT.swap (NonEmpty.partitionEithersRight (xs::NonEmpty.T[](Either Char Int)))) --partitionEithersRight :: T [] (Either a b) -> Either (T [] a, [b]) (T [] b) module Data.NonEmpty.Set data T a -- | We cannot have a reasonable instance Insert Set, since the -- instance Insert (NonEmpty Set) would preserve duplicate -- leading elements, whereas Set does not. -- -- However, the instance Insert NonEmpty is not the problem. A -- general type like -- --
-- insertSet :: (Insert f, Ord a) => a -> f a -> NonEmpty f a ---- -- cannot work, since it can be instantiated to -- --
-- insertSet :: (Ord a) => a -> NonEmpty Set a -> NonEmpty (NonEmpty Set) a ---- -- and this is obviously wrong: insertSet x (singleton x) has -- only one element, not two. insert :: Ord a => a -> Set a -> T a singleton :: a -> T a member :: Ord a => a -> T a -> Bool size :: T a -> Int fromList :: Ord a => T [] a -> T a fromAscList :: Ord a => T [] a -> T a toAscList :: T a -> T [] a fetch :: Ord a => Set a -> Maybe (T a) flatten :: Ord a => T a -> Set a union :: Ord a => T a -> T a -> T a unionLeft :: Ord a => Set a -> T a -> T a unionRight :: Ord a => T a -> Set a -> T a findMin :: T a -> a findMax :: T a -> a delete :: Ord k => k -> T k -> Set k deleteMin :: T a -> Set a deleteMax :: Ord a => T a -> Set a deleteFindMin :: T a -> (a, Set a) deleteFindMax :: Ord a => T a -> (a, Set a) minView :: T a -> (a, Set a) maxView :: Ord a => T a -> (a, Set a) instance GHC.Classes.Ord a => GHC.Classes.Ord (Data.NonEmpty.Set.T a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Data.NonEmpty.Set.T a) instance GHC.Show.Show a => GHC.Show.Show (Data.NonEmpty.Set.T a) instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Data.NonEmpty.Set.T a) instance Data.NonEmpty.Class.NFData Data.NonEmpty.Set.T instance (Test.QuickCheck.Arbitrary.Arbitrary a, GHC.Classes.Ord a) => Test.QuickCheck.Arbitrary.Arbitrary (Data.NonEmpty.Set.T a) -- | Functions that cope both with plain and non-empty structures. -- -- If there are two versions of a function, where one works on -- fixed-length lists, then place the fixed-length list variant in -- NonEmpty and the other one here. module Data.NonEmpty.Mixed groupBy :: Foldable f => (a -> a -> Bool) -> f a -> [T [] a] groupPairs :: (Foldable f, Eq a) => f (a, b) -> [(a, T [] b)] groupKey :: (Foldable f, Eq a) => (b -> a) -> f b -> [(a, T [] b)] groupEithers :: Foldable f => f (Either a b) -> [Either (T [] a) (T [] b)] segmentAfter :: Foldable f => (a -> Bool) -> f a -> ([T [] a], [a]) segmentBefore :: Foldable f => (a -> Bool) -> f a -> ([a], [T [] a]) filterToInfixes :: Foldable f => (a -> Bool) -> f a -> [T [] a] mapAdjacent :: (Cons f, Zip f) => (a -> a -> b) -> T f a -> f b take :: (View g, Repeat f, Traversable f) => g a -> Maybe (f a) splitAt :: (View g, Repeat f, Traversable f) => g a -> (Maybe (f a), g a) sliceVertical :: (View g, Repeat f, Traversable f) => g a -> ([f a], g a) -- | This implementation is more efficient for Sequence than viewR. viewR :: (ViewR f, Empty f, Cons f) => T f a -> (f a, a) init :: (ViewR f, Empty f, Cons f) => T f a -> f a last :: ViewR f => T f a -> a tails :: (ViewL f, Empty f) => f a -> T [] (f a) inits :: (ViewL f, Cons f, Empty f) => f a -> T [] (f a) appendLeft :: Cons f => [a] -> f a -> f a iterate :: (Repeat f, Traversable f) => (a -> a) -> a -> f a class Choose f -- | Select tuples of list elements: choose "abc" == -- [a!:b!:empty,a!:c!:empty,b!:c!:empty] choose :: Choose f => [a] -> [f a] instance Data.NonEmpty.Mixed.Choose Data.Empty.T instance Data.NonEmpty.Mixed.Choose f => Data.NonEmpty.Mixed.Choose (Data.NonEmptyPrivate.T f) instance Data.NonEmpty.Mixed.Choose [] module Data.NonEmpty.Map data T k a -- |
-- \k a -> forAllMap $ \m -> Map.insert k a m == NonEmptyMap.flatten (NonEmptyMap.insert k a m) --insert :: Ord k => k -> a -> Map k a -> T k a -- |
-- \k a -> forAllMap $ \m -> Map.insertWith (++) k a m == NonEmptyMap.flatten (NonEmptyMap.insertWith (++) k a m) --insertWith :: Ord k => (a -> a -> a) -> k -> a -> Map k a -> T k a singleton :: k -> a -> T k a member :: Ord k => k -> T k a -> Bool size :: T k a -> Int elems :: T k a -> T [] a keys :: T k a -> T [] k keysSet :: Ord k => T k a -> T k lookup :: Ord k => k -> T k a -> Maybe a -- |
-- \k -> forAllNonEmptyMap $ \m -> Map.delete k (NonEmptyMap.flatten m) == NonEmptyMap.delete k m --delete :: Ord k => k -> T k a -> Map k a minViewWithKey :: T k a -> ((k, a), Map k a) maxViewWithKey :: Ord k => T k a -> ((k, a), Map k a) -- |
-- \xs -> Map.fromList (NonEmpty.flatten xs) == NonEmptyMap.flatten (NonEmptyMap.fromList (xs::NonEmpty.T [] (Int,Char))) ---- | Warning: Dangerous because it silently drops colliding key/value -- pairs. Better use fromListWith. fromList :: Ord k => T [] (k, a) -> T k a -- |
-- \xs -> Map.fromListWith (++) (NonEmpty.flatten xs) == NonEmptyMap.flatten (NonEmptyMap.fromListWith (++) (xs::NonEmpty.T [] (Int,String))) --fromListWith :: Ord k => (a -> a -> a) -> T [] (k, a) -> T k a -- |
-- forAllNonEmptyMap $ \m -> NonEmptyMap.fromAscList (NonEmptyMap.toAscList m) == m --fromAscList :: Ord k => T [] (k, a) -> T k a -- |
-- forAllNonEmptyMap $ \m -> NonEmpty.flatten (NonEmptyMap.toAscList m) == Map.toAscList (NonEmptyMap.flatten m) --toAscList :: T k a -> T [] (k, a) fetch :: Ord k => Map k a -> Maybe (T k a) flatten :: Ord k => T k a -> Map k a -- |
-- forAllNonEmptyMap $ \xs -> forAllNonEmptyMap $ \ys -> Map.union (NonEmptyMap.flatten xs) (NonEmptyMap.flatten ys) == NonEmptyMap.flatten (NonEmptyMap.union xs ys) ---- | Warning: Dangerous because it silently drops colliding key/value -- pairs. Better use unionWith. union :: Ord k => T k a -> T k a -> T k a -- |
-- forAllMap $ \xm -> forAllNonEmptyMap $ \ym -> Map.union xm (NonEmptyMap.flatten ym) == NonEmptyMap.flatten (NonEmptyMap.unionLeft xm ym) ---- | Warning: Dangerous because it silently drops colliding key/value -- pairs. Better use unionLeftWith. unionLeft :: Ord k => Map k a -> T k a -> T k a -- |
-- forAllNonEmptyMap $ \xm -> forAllMap $ \ym -> Map.union (NonEmptyMap.flatten xm) ym == NonEmptyMap.flatten (NonEmptyMap.unionRight xm ym) ---- | Warning: Dangerous because it silently drops colliding key/value -- pairs. Better use unionRightWith. unionRight :: Ord k => T k a -> Map k a -> T k a -- |
-- forAllNonEmptyMap $ \xs -> forAllNonEmptyMap $ \ys -> Map.unionWith (++) (NonEmptyMap.flatten xs) (NonEmptyMap.flatten ys) == NonEmptyMap.flatten (NonEmptyMap.unionWith (++) xs ys) --unionWith :: Ord k => (a -> a -> a) -> T k a -> T k a -> T k a -- |
-- forAllMap $ \xm -> forAllNonEmptyMap $ \ym -> Map.unionWith (++) xm (NonEmptyMap.flatten ym) == NonEmptyMap.flatten (NonEmptyMap.unionLeftWith (++) xm ym) --unionLeftWith :: Ord k => (a -> a -> a) -> Map k a -> T k a -> T k a -- |
-- forAllNonEmptyMap $ \xm -> forAllMap $ \ym -> Map.unionWith (++) (NonEmptyMap.flatten xm) ym == NonEmptyMap.flatten (NonEmptyMap.unionRightWith (++) xm ym) --unionRightWith :: Ord k => (a -> a -> a) -> T k a -> Map k a -> T k a map :: Ord k => (a -> b) -> T k a -> T k b mapWithKey :: Ord k => (k -> a -> b) -> T k a -> T k b instance (GHC.Classes.Ord k, GHC.Classes.Ord a) => GHC.Classes.Ord (Data.NonEmpty.Map.T k a) instance (GHC.Classes.Eq k, GHC.Classes.Eq a) => GHC.Classes.Eq (Data.NonEmpty.Map.T k a) instance (GHC.Show.Show k, GHC.Show.Show a) => GHC.Show.Show (Data.NonEmpty.Map.T k a) instance GHC.Classes.Ord k => GHC.Base.Functor (Data.NonEmpty.Map.T k) instance GHC.Classes.Ord k => Data.Foldable.Foldable (Data.NonEmpty.Map.T k) instance GHC.Classes.Ord k => Data.Traversable.Traversable (Data.NonEmpty.Map.T k) instance (Control.DeepSeq.NFData k, Control.DeepSeq.NFData a) => Control.DeepSeq.NFData (Data.NonEmpty.Map.T k a) instance Control.DeepSeq.NFData k => Data.NonEmpty.Class.NFData (Data.NonEmpty.Map.T k) instance (Test.QuickCheck.Arbitrary.Arbitrary k, GHC.Classes.Ord k, Test.QuickCheck.Arbitrary.Arbitrary a) => Test.QuickCheck.Arbitrary.Arbitrary (Data.NonEmpty.Map.T k a) instance (Test.QuickCheck.Arbitrary.Arbitrary k, GHC.Classes.Ord k) => Data.NonEmpty.Class.Arbitrary (Data.NonEmpty.Map.T k) instance (Test.QuickCheck.Arbitrary.Arbitrary k, GHC.Classes.Ord k) => Data.NonEmpty.Class.Gen (Data.NonEmpty.Map.T k) -- | Word with fixed length lists constructed from NonEmpty and -- Empty types. module Data.FixedLengthList type T0 = T type T1 = T T0 type T2 = T T1 type T3 = T T2 type T4 = T T3 type T5 = T T4 type T6 = T T5 type T7 = T T6 type T8 = T T7 type T9 = T T8 type Func0 a b = b type Func1 a b = a -> Func0 a b type Func2 a b = a -> Func1 a b type Func3 a b = a -> Func2 a b type Func4 a b = a -> Func3 a b type Func5 a b = a -> Func4 a b type Func6 a b = a -> Func5 a b type Func7 a b = a -> Func6 a b type Func8 a b = a -> Func7 a b type Func9 a b = a -> Func8 a b uncurry0 :: Func0 a b -> T0 a -> b uncurry1 :: Func1 a b -> T1 a -> b uncurry2 :: Func2 a b -> T2 a -> b uncurry3 :: Func3 a b -> T3 a -> b uncurry4 :: Func4 a b -> T4 a -> b uncurry5 :: Func5 a b -> T5 a -> b uncurry6 :: Func6 a b -> T6 a -> b uncurry7 :: Func7 a b -> T7 a -> b uncurry8 :: Func8 a b -> T8 a -> b uncurry9 :: Func9 a b -> T9 a -> b curry0 :: (T0 a -> b) -> Func0 a b curry1 :: (T1 a -> b) -> Func1 a b curry2 :: (T2 a -> b) -> Func2 a b curry3 :: (T3 a -> b) -> Func3 a b curry4 :: (T4 a -> b) -> Func4 a b curry5 :: (T5 a -> b) -> Func5 a b curry6 :: (T6 a -> b) -> Func6 a b curry7 :: (T7 a -> b) -> Func7 a b curry8 :: (T8 a -> b) -> Func8 a b curry9 :: (T9 a -> b) -> Func9 a b consAll0 :: Func0 a (T0 a) consAll1 :: Func1 a (T1 a) consAll2 :: Func2 a (T2 a) consAll3 :: Func3 a (T3 a) consAll4 :: Func4 a (T4 a) consAll5 :: Func5 a (T5 a) consAll6 :: Func6 a (T6 a) consAll7 :: Func7 a (T7 a) consAll8 :: Func8 a (T8 a) consAll9 :: Func9 a (T9 a) module Data.Optional data T f a Nil :: T f a Cons :: a -> f a -> T f a (?:) :: a -> f a -> T f a infixr 5 ?: fromEmpty :: T a -> T f a fromNonEmpty :: T f a -> T f a instance (GHC.Classes.Ord a, GHC.Classes.Ord (f a)) => GHC.Classes.Ord (Data.Optional.T f a) instance (GHC.Classes.Eq a, GHC.Classes.Eq (f a)) => GHC.Classes.Eq (Data.Optional.T f a) instance (Data.NonEmpty.Class.NFData f, Control.DeepSeq.NFData a) => Control.DeepSeq.NFData (Data.Optional.T f a) instance Data.NonEmpty.Class.NFData f => Data.NonEmpty.Class.NFData (Data.Optional.T f) instance (Data.NonEmpty.Class.Show f, GHC.Show.Show a) => GHC.Show.Show (Data.Optional.T f a) instance Data.NonEmpty.Class.Show f => Data.NonEmpty.Class.Show (Data.Optional.T f) instance GHC.Base.Functor f => GHC.Base.Functor (Data.Optional.T f) instance Data.Foldable.Foldable f => Data.Foldable.Foldable (Data.Optional.T f) instance Data.Traversable.Traversable f => Data.Traversable.Traversable (Data.Optional.T f) instance (Data.NonEmpty.Class.Arbitrary f, Test.QuickCheck.Arbitrary.Arbitrary a) => Test.QuickCheck.Arbitrary.Arbitrary (Data.Optional.T f a) instance Data.NonEmpty.Class.Arbitrary f => Data.NonEmpty.Class.Arbitrary (Data.Optional.T f) instance Data.NonEmpty.Class.Gen f => Data.NonEmpty.Class.Gen (Data.Optional.T f) instance Data.NonEmpty.Class.Empty (Data.Optional.T f) instance (Data.NonEmpty.Class.Cons f, Data.NonEmpty.Class.Empty f) => Data.NonEmpty.Class.Cons (Data.Optional.T f) instance Data.NonEmpty.Class.Repeat f => Data.NonEmpty.Class.Repeat (Data.Optional.T f) instance Data.NonEmpty.Class.Iterate f => Data.NonEmpty.Class.Iterate (Data.Optional.T f) instance Data.NonEmpty.Class.Zip f => Data.NonEmpty.Class.Zip (Data.Optional.T f) instance (Data.Traversable.Traversable f, Data.NonEmpty.Class.Reverse f) => Data.NonEmpty.Class.Reverse (Data.Optional.T f) instance (Data.NonEmptyPrivate.Insert f, Data.NonEmpty.Class.Sort f) => Data.NonEmpty.Class.Sort (Data.Optional.T f) instance (Data.NonEmptyPrivate.InsertBy f, Data.NonEmpty.Class.SortBy f) => Data.NonEmpty.Class.SortBy (Data.Optional.T f) instance Data.NonEmptyPrivate.Insert f => Data.NonEmptyPrivate.Insert (Data.Optional.T f) instance Data.NonEmptyPrivate.InsertBy f => Data.NonEmptyPrivate.InsertBy (Data.Optional.T f) module Data.Zip -- | Wrap a container such that its Applicative instance is based on zip. newtype T f a Cons :: f a -> T f a [decons] :: T f a -> f a -- | Always returns a rectangular list by clipping all dimensions to the -- shortest slice. Be aware that transpose [] == repeat []. transposeClip :: (Traversable f, Zip g, Repeat g) => f (g a) -> g (f a) instance GHC.Base.Functor f => GHC.Base.Functor (Data.Zip.T f) instance (Data.NonEmpty.Class.Zip f, Data.NonEmpty.Class.Repeat f) => GHC.Base.Applicative (Data.Zip.T f) instance (Data.NonEmpty.Class.NFData f, Control.DeepSeq.NFData a) => Control.DeepSeq.NFData (Data.Zip.T f a) instance Data.NonEmpty.Class.NFData f => Data.NonEmpty.Class.NFData (Data.Zip.T f)