Hoogle Search

Within LTS Haskell 24.17 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. type NonEmpty = SizeGreaterThan 0

    refined Refined

    A Predicate ensuring that the type is non-empty.

  2. data NonEmpty a

    foundation Foundation

    NonEmpty property for any Collection

  3. data NonEmpty a

    foundation Foundation.Collection

    NonEmpty property for any Collection

  4. NonEmpty :: [a] -> NonEmptyList a

    massiv-test Test.Massiv.Utils

    No documentation available.

  5. module Data.Containers.NonEmpty

    Non-Empty Typeclass

    Provides the typeclass HasNonEmpty, which abstracts over different types which have a "non-empty" variant. Used to convert between and in between possibly-empty and non-empty types. Instances are provided for all modules in this package, as well as for NonEmpty in base and NonEmptyVector.

  6. module Data.IntMap.NonEmpty

    Non-Empty Finite Integer-Indexed Maps (lazy interface)

    The NEIntMap v type represents a non-empty finite map (sometimes called a dictionary) from integer keys to values of type v. An NEIntMap is strict in its keys but lazy in its values. See documentation for NEIntMap for information on how to convert and manipulate such non-empty maps. This module essentially re-imports the API of Data.IntMap.Lazy and its IntMap type, along with semantics and asymptotics. In most situations, asymptotics are different only by a constant factor. In some situations, asmyptotics are even better (constant-time instead of log-time). Because NEIntMap is implemented using IntMap, all of the caveats of using IntMap apply (such as the limitation of the maximum size of maps). All functions take non-empty maps as inputs. In situations where their results can be guarunteed to also be non-empty, they also return non-empty maps. In situations where their results could potentially be empty, IntMap is returned instead. Some variants of functions (like alter', alterF', adjustMin, adjustMax, adjustMinWithKey, adjustMaxWithKey) are provided in a way restructured to preserve guaruntees of non-empty maps being returned. Some functions (like mapEither, partition, split) have modified return types to account for possible configurations of non-emptiness. This module is intended to be imported qualified, to avoid name clashes with Prelude and Data.IntMap functions:
    import qualified Data.IntMap.NonEmpty as NEIM
    
    Note that all asmyptotics O(f(n)) in this module are actually O(min(W, f(n))), where W is the number of bits in an Int (32 or 64). That is, if f(n) is greater than W, all operations are constant-time. At the moment, this package does not provide a variant strict on values for these functions, like containers does. This is a planned future implementation (PR's are appreciated). For now, you can simulate a strict interface by manually forcing values before returning results.

  7. module Data.IntSet.NonEmpty

    Non-Empty Finite Integer Sets

    The NEIntSet type represents a non-empty set of integers. See documentation for NEIntSet for information on how to convert and manipulate such non-empty set. This module essentially re-imports the API of Data.IntSet and its IntSet type, along with semantics and asymptotics. In most situations, asymptotics are different only by a constant factor. In some situations, asmyptotics are even better (constant-time instead of log-time). Because NEIntSet is implemented using IntSet, all of the caveats of using IntSet apply (such as the limitation of the maximum size of sets). All functions take non-empty sets as inputs. In situations where their results can be guarunteed to also be non-empty, they also return non-empty sets. In situations where their results could potentially be empty, IntSet is returned instead. Some functions (partition, split) have modified return types to account for possible configurations of non-emptiness. This module is intended to be imported qualified, to avoid name clashes with Prelude and Data.IntSet functions:
    import qualified Data.IntSet.NonEmpty as NEIS
    
    Note that all asmyptotics O(f(n)) in this module are actually O(min(W, f(n))), where W is the number of bits in an Int (32 or 64). That is, if f(n) is greater than W, all operations are constant-time.

  8. module Data.Map.NonEmpty

    Non-Empty Finite Maps (lazy interface)

    The NEMap k v type represents a non-empty finite map (sometimes called a dictionary) from keys of type k to values of type v. An NEMap is strict in its keys but lazy in its values. See documentation for NEMap for information on how to convert and manipulate such non-empty maps. This module essentially re-imports the API of Data.Map.Lazy and its Map type, along with semantics and asymptotics. In most situations, asymptotics are different only by a constant factor. In some situations, asmyptotics are even better (constant-time instead of log-time). All typeclass constraints are identical to their Data.Map counterparts. Because NEMap is implemented using Map, all of the caveats of using Map apply (such as the limitation of the maximum size of maps). All functions take non-empty maps as inputs. In situations where their results can be guarunteed to also be non-empty, they also return non-empty maps. In situations where their results could potentially be empty, Map is returned instead. Some variants of functions (like alter', alterF', adjustAt, adjustMin, adjustMax, adjustMinWithKey, adjustMaxWithKey) are provided in a way restructured to preserve guaruntees of non-empty maps being returned. Some functions (like mapEither, partition, spanAntitone, split) have modified return types to account for possible configurations of non-emptiness. This module is intended to be imported qualified, to avoid name clashes with Prelude and Data.Map functions:
    import qualified Data.Map.NonEmpty as NEM
    
    At the moment, this package does not provide a variant strict on values for these functions, like containers does. This is a planned future implementation (PR's are appreciated). For now, you can simulate a strict interface by manually forcing values before returning results.

  9. module Data.Sequence.NonEmpty

    Non-Empty Finite Sequences

    | An NESeq a is a non-empty (but finite) sequence of values of type a. Generally has the same interface as NonEmpty. This is a non-empty version of Seq from Data.Sequence. The main differences between this type and NonEmpty are:
    • You cannot have infinite NESeqs
    • You have constant-time consing from either end, and constant-time unconsing as well (through <|, |>, :<||, and :||>)
    • Concatenation (><, |><, ><|) is logarithmic-time.
    • You have logarithmic-time indexing and updating at a given index.
    While asymptotics are often better than for NonEmpty, there is a decent constant factor involved in most operations. See documentation for NESeq for information on how to convert and manipulate such non-empty sequences This module essentially re-imports the API of Data.Sequence.Lazy and its Seq type, along with semantics and asymptotics. Because NESeq is implemented using Seq, all of the caveats of using Seq apply. All functions take non-empty sequences as inputs. In situations where their results can be guarunteed to also be non-empty, they also return non-empty maps. In situations where their results could potentially be empty, Seq is returned instead. Some functions (like spanl, spanr, breakl, breakr, partition, splitAt) have modified return types to account for possible configurations of non-emptiness. Some functions (head, last, tail, init) are provided because they are total for non-empty sequences. This module is intended to be imported qualified, to avoid name clashes with Prelude and Data.Sequence functions:
    import qualified Data.Sequence.NonEmpty as NESeq
    

  10. module Data.Set.NonEmpty

    Non-Empty Finite Sets

    The NESet e type represents a non-empty set of elements of type e. Most operations require that e be an instance of the Ord class. A NESet is strict in its elements. See documentation for NESet for information on how to convert and manipulate such non-empty set. This module essentially re-imports the API of Data.Set and its Set type, along with semantics and asymptotics. In most situations, asymptotics are different only by a constant factor. In some situations, asmyptotics are even better (constant-time instead of log-time). All typeclass constraints are identical to their Data.Set counterparts. Because NESet is implemented using Set, all of the caveats of using Set apply (such as the limitation of the maximum size of sets). All functions take non-empty sets as inputs. In situations where their results can be guarunteed to also be non-empty, they also return non-empty sets. In situations where their results could potentially be empty, Set is returned instead. Some functions (partition, spanAntitone, split) have modified return types to account for possible configurations of non-emptiness. This module is intended to be imported qualified, to avoid name clashes with Prelude and Data.Set functions:
    import qualified Data.Set.NonEmpty as NES
    

Page 4 of many | Previous | Next