Hoogle Search
Within LTS Haskell 24.60 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
unionSetRight :: Ord a => NESet a -> Set a -> NESet anonempty-containers Data.Set.NonEmpty O(m*log(n/m + 1)), m <= n. Union of a non-empty set and a possibly-empty Set.
unsafeFromSet :: Set a -> NESet anonempty-containers Data.Set.NonEmpty O(log n). Unsafe version of nonEmptySet. Coerces a Set into an NESet, but is undefined (throws a runtime exception when evaluation is attempted) for an empty Set.
-
nonempty-containers Data.Set.NonEmpty.Internal Used for cartesianProduct
MergeNESet :: NESet a -> MergeNESet anonempty-containers Data.Set.NonEmpty.Internal No documentation available.
-
nonempty-containers Data.Set.NonEmpty.Internal A non-empty (by construction) set of values a. At least one value exists in an NESet a at all times. Functions that take an NESet can safely operate on it with the assumption that it has at least one item. Functions that return an NESet provide an assurance that the result has at least one item. Data.Set.NonEmpty re-exports the API of Data.Set, faithfully reproducing asymptotics, typeclass constraints, and semantics. Functions that ensure that input and output sets are both non-empty (like insert) return NESet, but functions that might potentially return an empty map (like delete) return a Set instead. You can directly construct an NESet with the API from Data.Set.NonEmpty; it's more or less the same as constructing a normal Set, except you don't have access to empty. There are also a few ways to construct an NESet from a Set:
- The nonEmptySet smart constructor will convert a Set a into a Maybe (NESet a), returning Nothing if the original Set was empty.
- You can use the insertSet family of functions to insert a value into a Set to create a guaranteed NESet.
- You can use the IsNonEmpty and IsEmpty patterns to "pattern match" on a Set to reveal it as either containing a NESet or an empty map.
- withNonEmpty offers a continuation-based interface for deconstructing a Set and treating it as if it were an NESet.
NESet :: a -> !Set a -> NESet anonempty-containers Data.Set.NonEmpty.Internal No documentation available.
getMergeNESet :: MergeNESet a -> NESet anonempty-containers Data.Set.NonEmpty.Internal No documentation available.
insertMaxSet :: a -> Set a -> Set anonempty-containers Data.Set.NonEmpty.Internal O(log n). Insert new value into a set where values are /strictly less than the new value. That is, the new value must be strictly greater than all values present in the Set. The precondition is not checked./ While this has the same asymptotics as Data.Set.insert, it saves a constant factor for value comparison (so may be helpful if comparison is expensive) and also does not require an Ord instance for the value type.
insertMinSet :: a -> Set a -> Set anonempty-containers Data.Set.NonEmpty.Internal O(log n). Insert new value into a set where values are strictly greater than the new values That is, the new value must be strictly less than all values present in the Set. /The precondition is not checked./ While this has the same asymptotics as Data.Set.insert, it saves a constant factor for value comparison (so may be helpful if comparison is expensive) and also does not require an Ord instance for the value type.
-
nonempty-containers Data.Set.NonEmpty.Internal No documentation available.