HORIZON HASKELLDocslts/ghc-9.14.x45dd5372026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

ModuleAgda-2.8.0.2Haskell2010

Agda.Utils.Set1

Non-empty sets.

Provides type Set1 of non-empty sets.

Import: @

import Agda.Utils.Set1 (Set1) import qualified Agda.Utils.Set1 as Set1

@

  • 2 types
  • 74 values
  • PackageAgda-2.8.0.2
  • Exports80
  • LanguageHaskell2010
  • LicenceMIT
  • SourceSet1.hs
valueunlessNull :: Applicative m => Set a -> (Set1 a -> m ()) -> m ()
#

A more general type would be Null m => Set a -> (Set1 a -> m) -> m but this type is problematic as we do not have a general instance Applicative m => Null (m ()).

patternpattern IsNonEmpty :: NESet a -> Set a
#

O(1) match, O(log n) usage of contents. The IsNonEmpty and IsEmpty patterns allow you to treat a Set as if it were either a IsNonEmpty n (where n is a NESet) or an IsEmpty.

For example, you can pattern match on a Set:

myFunc :: Set X -> Y
myFunc (IsNonEmpty n) =  -- here, the user provided a non-empty set, and n is the NESet
myFunc IsEmpty        =  -- here, the user provided an empty set

Matching on IsNonEmpty n means that the original Set was not empty, and you have a verified-non-empty NESet n to use.

Note that patching on this pattern is O(1). However, using the contents requires a O(log n) cost that is deferred until after the pattern is matched on (and is not incurred at all if the contents are never used).

A case statement handling both IsNonEmpty and IsEmpty provides complete coverage.

This is a bidirectional pattern, so you can use IsNonEmpty to convert a NESet back into a Set, obscuring its non-emptiness (see toSet).

valuecartesianProduct :: NESet a -> NESet b -> NESet (a, b)
#

Calculate the Cartesian product of two sets.

cartesianProduct xs ys = fromList $ liftA2 (,) (toList xs) (toList ys)

Example:

cartesianProduct (fromList (1:|[2])) (fromList ('a':|['b'])) =
  fromList ((1,'a') :| [(1,'b'), (2,'a'), (2,'b')])
valuedelete :: Ord a => a -> NESet a -> Set a
#

O(log n). Delete an element from a set.

valuedeleteAt :: Int -> NESet a -> Set a
#

O(log n). Delete the element at index, i.e. by its zero-based index in the sorted sequence of elements. If the index is out of range (less than zero, greater or equal to size of the set), error is called.

Returns a potentially empty set (Set), because this could potentailly delete the final element in a singleton set.

deleteAt 0    (fromList (5:|[3])) == singleton 5
deleteAt 1    (fromList (5:|[3])) == singleton 3
deleteAt 2    (fromList (5:|[3]))    Error: index out of range
deleteAt (-1) (fromList (5:|[3]))    Error: index out of range
valuedeleteFindMax :: NESet a -> (a, Set a)
#

O(log n). Delete and find the minimal element.

Note that unlike Data.Set.deleteFindMax for Set, this cannot ever fail, and so is a total function. However, the result Set is potentially empty, since the original set might have contained just a single item.

deleteFindMax (fromList (5 :| [3, 10])) == (10, Data.Set.fromList [3, 5])
valuedeleteFindMin :: NESet a -> (a, Set a)
#

O(1). Delete and find the minimal element. It is constant-time, so has better asymptotics that Data.Set.minView for Set.

Note that unlike Data.Set.deleteFindMin for Set, this cannot ever fail, and so is a total function. However, the result Set is potentially empty, since the original set might have contained just a single item.

deleteFindMin (fromList (5 :| [3, 10])) == (3, Data.Set.fromList [5, 10])
valuedeleteMax :: NESet a -> Set a
#

O(log n). Delete the maximal element. Returns a potentially empty set (Set), because we might delete the final item in a singleton set.

deleteMax (fromList (5 :| [3, 7])) == Data.Set.fromList [3, 5]
deleteMax (singleton 5) == Data.Set.empty
valuedeleteMaybe :: Ord a => a -> NESet a -> Maybe (NESet a)
#

O(log n). Delete an element from a set, returning Nothing if the result would be empty.

This is more efficient than nonEmptySet . delete x because it avoids converting the known-minimum representation back through Set when the deleted element is not the minimum.

valuedeleteMin :: NESet a -> Set a
#

O(1). Delete the minimal element. Returns a potentially empty set (Set), because we might delete the final item in a singleton set. It is constant-time, so has better asymptotics than Data.Set.deleteMin.

deleteMin (fromList (5 :| [3, 7])) == Data.Set.fromList [5, 7]
deleteMin (singleton 5) == Data.Set.empty
valuedifference :: Ord a => NESet a -> NESet a -> Set a
#

O(m*log(n/m + 1)), m <= n. Difference of two sets.

Returns a potentially empty set (Set) because the first set might be a subset of the second set, and therefore have all of its elements removed.

valuedisjoint :: Ord a => NESet a -> NESet a -> Bool
#

O(n+m). Check whether two sets are disjoint (i.e. their intersection is empty).

disjoint (fromList (2:|[4,6]))   (fromList (1:|[3]))     == True
disjoint (fromList (2:|[4,6,8])) (fromList (2:|[3,5,7])) == False
disjoint (fromList (1:|[2]))     (fromList (1:|[2,3,4])) == False
valuedisjointUnion :: NESet a -> NESet b -> NESet (Either a b)
#

Calculate the disjoint union of two sets.

 disjointUnion xs ys = map Left xs `union` map Right ys

Example:

disjointUnion (fromList (1:|[2])) (fromList ("hi":|["bye"])) =
  fromList (Left 1 :| [Left 2, Right "hi", Right "bye"])
valuedrop :: Int -> NESet a -> Set a
#

Drop a given number of elements in order, beginning with the smallest ones.

Returns a potentailly empty set (Set), in the case that drop is called with a number equal to or greater the number of items in the set, and we drop every item.

drop n = Data.Set.fromDistinctAscList . Data.List.NonEmpty.drop n . toAscList
valuedropWhileAntitone :: (a -> Bool) -> NESet a -> Set a
#

O(log n). Drop while a predicate on the elements holds. The user is responsible for ensuring that for all elements j and k in the set, j < k ==> p j >= p k. See note at spanAntitone.

Returns a potentially empty set (Set) because the predicate might be true for all items.

dropWhileAntitone p = Data.Set.fromDistinctAscList . Data.List.NonEmpty.dropWhile p . toList
dropWhileAntitone p = filter (not . p)
valueelemAt :: Int -> NESet a -> a
#

O(log n). Retrieve an element by its index, i.e. by its zero-based index in the sorted sequence of elements. If the index is out of range (less than zero, greater or equal to size of the set), error is called.

elemAt 0 (fromList (5:|[3])) == 3
elemAt 1 (fromList (5:|[3])) == 5
elemAt 2 (fromList (5:|[3]))    Error: index out of range
valuefilter :: (a -> Bool) -> NESet a -> Set a
#

O(n). Filter all elements that satisfy the predicate.

Returns a potentially empty set (Set) because the predicate might filter out all items in the original non-empty set.

valuefindIndex :: Ord a => a -> NESet a -> Int
#

O(log n). Return the index of an element, which is its zero-based index in the sorted sequence of elements. The index is a number from 0 up to, but not including, the size of the set. Calls error when the element is not a member of the set.

findIndex 2 (fromList (5:|[3]))    Error: element is not in the set
findIndex 3 (fromList (5:|[3])) == 0
findIndex 5 (fromList (5:|[3])) == 1
findIndex 6 (fromList (5:|[3]))    Error: element is not in the set
valuefindMax :: NESet a -> a
#

O(log n). The maximal key of a set Note that this is total, making lookupMin obsolete.

findMax (fromList (5 :| [3])) == 5
valuefindMin :: NESet a -> a
#

O(1). The minimal element of a set. Note that this is total, making lookupMin obsolete. It is constant-time, so has better asymptotics than Data.Set.lookupMin and Data.Map.findMin as well.

findMin (fromList (5 :| [3])) == 3
valuefoldl1' :: (a -> a -> a) -> NESet a -> a
#

O(n). A strict version of foldl1. Each application of the operator is evaluated before using the result in the next application. This function is strict in the starting value.

valuefoldr1' :: (a -> a -> a) -> NESet a -> a
#

O(n). A strict version of foldr1. Each application of the operator is evaluated before using the result in the next application. This function is strict in the starting value.

valuefromAscList :: Eq a => NonEmpty a -> NESet a
#

O(n). Build a set from an ascending list in linear time. /The precondition (input list is ascending) is not checked./

valuefromDescList :: Eq a => NonEmpty a -> NESet a
#

O(n). Build a set from a descending list in linear time. The precondition (input list is descending) is not checked.

valuefromDistinctAscList :: NonEmpty a -> NESet a
#

O(n). Build a set from an ascending list of distinct elements in linear time. The precondition (input list is strictly ascending) is not checked.

O(n). Build a set from a descending list of distinct elements in linear time. The precondition (input list is strictly descending) is not checked.

valueinsert :: Ord a => a -> NESet a -> NESet a
#

O(log n). Insert an element in a set. If the set already contains an element equal to the given value, it is replaced with the new value.

valueinsertSet :: Ord a => a -> Set a -> NESet a
#

O(log n). Convert a Set into an NESet by adding a value. Because of this, we know that the set must have at least one element, and so therefore cannot be empty.

See insertSetMin for a version that is constant-time if the new value is strictly smaller than all values in the original set

insertSet 4 (Data.Set.fromList [5, 3]) == fromList (3 :| [4, 5])
insertSet 4 Data.Set.empty == singleton 4 "c"
valueinsertSetMax :: a -> Set a -> NESet a
#

O(log n) Convert a Set into an NESet by adding a value where the value is strictly less than all values in the input set The values in the original map must all be strictly greater than the new value. The precondition is not checked.

While this has the same asymptotics as insertSet, it saves a constant factor for key comparison (so may be helpful if comparison is expensive) and also does not require an Ord instance for the key type.

insertSetMin 7 (Data.Set.fromList [5, 3]) == fromList (3 :| [5, 7])
valid (insertSetMin 7 (Data.Set.fromList [5, 3])) == True
valid (insertSetMin 2 (Data.Set.fromList [5, 3])) == False
valid (insertSetMin 5 (Data.Set.fromList [5, 3])) == False
valueinsertSetMin :: a -> Set a -> NESet a
#

O(1) Convert a Set into an NESet by adding a value where the value is strictly less than all values in the input set The values in the original map must all be strictly greater than the new value. The precondition is not checked.

insertSetMin 2 (Data.Set.fromList [5, 3]) == fromList (2 :| [3, 5])
valid (insertSetMin 2 (Data.Set.fromList [5, 3])) == True
valid (insertSetMin 7 (Data.Set.fromList [5, 3])) == False
valid (insertSetMin 3 (Data.Set.fromList [5, 3])) == False
valueintersection :: Ord a => NESet a -> NESet a -> Set a
#

O(m*log(n/m + 1)), m <= n. The intersection of two sets.

Returns a potentially empty set (Set), because the two sets might have an empty intersection.

Elements of the result come from the first set, so for example

import qualified Data.Set.NonEmpty as NES
data AB = A | B deriving Show
instance Ord AB where compare _ _ = EQ
instance Eq AB where _ == _ = True
main = print (NES.singleton A `NES.intersection` NES.singleton B,
              NES.singleton B `NES.intersection` NES.singleton A)

prints (fromList (A:|[]),fromList (B:|[])).

valueisSubsetOf :: Ord a => NESet a -> NESet a -> Bool
#

O(n+m). Is this a subset? (s1 `isSubsetOf` s2) tells whether s1 is a subset of s2.

valuelookupGE :: Ord a => a -> NESet a -> Maybe a
#

O(log n). Find smallest element greater or equal to the given one.

lookupLT 3 (fromList (3 :| [5])) == Just 3
lookupLT 4 (fromList (3 :| [5])) == Just 5
lookupLT 6 (fromList (3 :| [5])) == Nothing
valuelookupGT :: Ord a => a -> NESet a -> Maybe a
#

O(log n). Find smallest element greater than the given one.

lookupLT 4 (fromList (3 :| [5])) == Just 5
lookupLT 5 (fromList (3 :| [5])) == Nothing
valuelookupIndex :: Ord a => a -> NESet a -> Maybe Int
#

O(log n). Lookup the index of an element, which is its zero-based index in the sorted sequence of elements. The index is a number from 0 up to, but not including, the size of the set.

isJust   (lookupIndex 2 (fromList (5:|[3]))) == False
fromJust (lookupIndex 3 (fromList (5:|[3]))) == 0
fromJust (lookupIndex 5 (fromList (5:|[3]))) == 1
isJust   (lookupIndex 6 (fromList (5:|[3]))) == False
valuelookupLE :: Ord a => a -> NESet a -> Maybe a
#

O(log n). Find largest element smaller or equal to the given one.

lookupLT 2 (fromList (3 :| [5])) == Nothing
lookupLT 4 (fromList (3 :| [5])) == Just 3
lookupLT 5 (fromList (3 :| [5])) == Just 5
valuelookupLT :: Ord a => a -> NESet a -> Maybe a
#

O(log n). Find largest element smaller than the given one.

lookupLT 3 (fromList (3 :| [5])) == Nothing
lookupLT 5 (fromList (3 :| [5])) == Just 3
valuemap :: Ord b => (a -> b) -> NESet a -> NESet b
#

O(n*log n). map f s is the set obtained by applying f to each element of s.

It's worth noting that the size of the result may be smaller if, for some (x,y), x /= y && f x == f y

valuemapMonotonic :: (a -> b) -> NESet a -> NESet b
#

O(n). mapMonotonic f s == map f s, but works only when f is strictly increasing. The precondition is not checked. Semi-formally, we have:

and [x < y ==> f x < f y | x <- ls, y <- ls]
                    ==> mapMonotonic f s == map f s
    where ls = Data.Foldable.toList s
valuepartition :: (a -> Bool) -> NESet a -> These (NESet a) (NESet a)
#

O(n). Partition the map according to a predicate.

Returns a These with potentially two non-empty sets:

  • This n1 means that the predicate was true for all items.

  • That n2 means that the predicate was false for all items.

  • These n1 n2 gives n1 (all of the items that were true for the predicate) and n2 (all of the items that were false for the predicate).

See also split.

partition (> 3) (fromList (5 :| [3])) == These (singleton 5) (singleton 3)
partition (< 7) (fromList (5 :| [3])) == This  (fromList (3 :| [5]))
partition (> 7) (fromList (5 :| [3])) == That  (fromList (3 :| [5]))
valuepowerSet :: NESet a -> NESet (NESet a)
#

Calculate the power set of a non-empty: the set of all its (non-empty) subsets.

t `member` powerSet s == t `isSubsetOf` s

Example:

powerSet (fromList (1 :| [2,3])) =
  fromList (singleton 1 :| [ singleton 2
                           , singleton 3
                           , fromList (1 :| [2])
                           , fromList (1 :| [3])
                           , fromList (2 :| [3])
                           , fromList (1 :| [2,3])
                           ]
           )

We know that the result is non-empty because the result will always at least contain the original set.

valuespanAntitone :: (a -> Bool) -> NESet a -> These (NESet a) (NESet a)
#

O(log n). Divide a set at the point where a predicate on the elements stops holding. The user is responsible for ensuring that for all elements j and k in the set, j < k ==> p j >= p k.

Returns a These with potentially two non-empty sets:

  • This n1 means that the predicate never failed for any item, returning the original set

  • That n2 means that the predicate failed for the first item, returning the original set

  • These n1 n2 gives n1 (the set up to the point where the predicate stops holding) and n2 (the set starting from the point where the predicate stops holding)

spanAntitone p xs = partition p xs

Note: if p is not actually antitone, then spanAntitone will split the set at some unspecified point where the predicate switches from holding to not holding (where the predicate is seen to hold before the first element and to fail after the last element).

valuesplit :: Ord a => a -> NESet a -> Maybe (These (NESet a) (NESet a))
#

O(log n). The expression (split x set) is potentially a These containing up to two NESets based on splitting the set into sets containing items before and after the value x. It will never return a set that contains x itself.

  • Nothing means that x was the only value in the the original set, and so there are no items before or after it.

  • Just (This n1) means x was larger than or equal to all items in the set, and n1 is the entire original set (minus x, if it was present)

  • Just (That n2) means x was smaller than or equal to all items in the set, and n2 is the entire original set (minus x, if it was present)

  • Just (These n1 n2) gives n1 (the set of all values from the original set less than x) and n2 (the set of all values from the original set greater than x).

split 2 (fromList (5 :| [3])) == Just (That  (fromList (3 :| [5]))      )
split 3 (fromList (5 :| [3])) == Just (That  (singleton 5)              )
split 4 (fromList (5 :| [3])) == Just (These (singleton 3) (singleton 5))
split 5 (fromList (5 :| [3])) == Just (This  (singleton 3)              )
split 6 (fromList (5 :| [3])) == Just (This  (fromList (3 :| [5]))      )
split 5 (singleton 5)         == Nothing
valuesplitAt :: Int -> NESet a -> These (NESet a) (NESet a)
#

O(log n). Split a set at a particular index i.

  • This n1 means that there are less than i items in the set, and n1 is the original set.

  • That n2 means i was 0; we dropped 0 items, so n2 is the original set.

  • These n1 n2 gives n1 (taking i items from the original set) and n2 (dropping i items from the original set))

valuesplitMember
  1. :: Ord a
  2. => a
  3. -> NESet a
  4. -> (Bool, Maybe (These (NESet a) (NESet a)))
#

O(log n). The expression (splitMember x set) splits a set just like split but also returns member x set (whether or not x was in set)

splitMember 2 (fromList (5 :| [3])) == (False, Just (That  (fromList (3 :| [5)]))))
splitMember 3 (fromList (5 :| [3])) == (True , Just (That  (singleton 5)))
splitMember 4 (fromList (5 :| [3])) == (False, Just (These (singleton 3) (singleton 5)))
splitMember 5 (fromList (5 :| [3])) == (True , Just (This  (singleton 3))
splitMember 6 (fromList (5 :| [3])) == (False, Just (This  (fromList (3 :| [5])))
splitMember 5 (singleton 5)         == (True , Nothing)
valuesplitRoot :: NESet a -> NonEmpty (NESet a)
#

O(1). Decompose a set into pieces based on the structure of the underlying tree. This function is useful for consuming a set in parallel.

No guarantee is made as to the sizes of the pieces; an internal, but deterministic process determines this. However, it is guaranteed that the pieces returned will be in ascending order (all elements in the first subset less than all elements in the second, and so on).

Note that the current implementation does not return more than four subsets, but you should not depend on this behaviour because it can change in the future without notice.

valuetake :: Int -> NESet a -> Set a
#

Take a given number of elements in order, beginning with the smallest ones.

Returns a potentailly empty set (Set), which can only happen when calling take 0.

take n = Data.Set.fromDistinctAscList . Data.List.NonEmpty.take n . toAscList
valuetakeWhileAntitone :: (a -> Bool) -> NESet a -> Set a
#

O(log n). Take while a predicate on the elements holds. The user is responsible for ensuring that for all elements j and k in the set, j < k ==> p j >= p k. See note at spanAntitone.

Returns a potentially empty set (Set) because the predicate might fail on the first input.

takeWhileAntitone p = Data.Set.fromDistinctAscList . Data.List.NonEmpty.takeWhile p . toList
takeWhileAntitone p = filter p
valuefoldl :: (a -> b -> a) -> a -> NESet b -> a
#

O(n). Fold the elements in the set using the given left-associative binary operator, such that foldl f z == foldl f z . toAscList.

For example,

descElemsList set = foldl (flip (:)) [] set
valuefoldl' :: (a -> b -> a) -> a -> NESet b -> a
#

O(n). A strict version of foldl. Each application of the operator is evaluated before using the result in the next application. This function is strict in the starting value.

valuefoldr :: (a -> b -> b) -> b -> NESet a -> b
#

O(n). Fold the elements in the set using the given right-associative binary operator, such that foldr f z == foldr f z . toAscList.

For example,

elemsList set = foldr (:) [] set
valuefoldr' :: (a -> b -> b) -> b -> NESet a -> b
#

O(n). A strict version of foldr. Each application of the operator is evaluated before using the result in the next application. This function is strict in the starting value.

valuesize :: NESet a -> Int
#

O(1). The number of elements in the set. Guaranteed to be greater than zero.

valuetoSet :: NESet a -> Set a
#

O(log n). Convert a non-empty set back into a normal possibly-empty map, for usage with functions that expect Set.

Can be thought of as "obscuring" the non-emptiness of the set in its type. See the Data.Set.NonEmpty.IsNotEmpty pattern.

nonEmptySet and maybe empty toSet form an isomorphism: they are perfect structure-preserving inverses of eachother.

toSet (fromList ((3,"a") :| [(5,"b")])) == Data.Set.fromList [(3,"a"), (5,"b")]
valueunion :: Ord a => NESet a -> NESet a -> NESet a
#

O(m*log(n/m + 1)), m <= n. The union of two sets, preferring the first set when equal elements are encountered.

valuevalid :: Ord a => NESet a -> Bool
#

O(n). Test if the internal set structure is valid.

methodfoldl1 :: (a -> a -> a) -> t a -> a
#

A variant of foldl that has no base case, and thus may only be applied to non-empty structures.

This function is non-total and will raise a runtime exception if the structure happens to be empty.

foldl1 f = foldl1 f . toList
Examples

Basic usage:

Example1 expression
foldl1 (+) [1..4]10
Example1 expression
foldl1 (+) []*** Exception: Prelude.foldl1: empty list
Example1 expression
foldl1 (+) Nothing*** Exception: foldl1: empty structure
Example1 expression
foldl1 (-) [1..4]-8
Example1 expression
foldl1 (&&) [True, False, True, True]False
Example1 expression
foldl1 (||) [False, False, True, True]True
Example1 expression
foldl1 (+) [1..]* Hangs forever *
methodfoldr1 :: (a -> a -> a) -> t a -> a
#

A variant of foldr that has no base case, and thus may only be applied to non-empty structures.

This function is non-total and will raise a runtime exception if the structure happens to be empty.

Examples

Basic usage:

Example1 expression
foldr1 (+) [1..4]10
Example1 expression
foldr1 (+) []Exception: Prelude.foldr1: empty list
Example1 expression
foldr1 (+) Nothing*** Exception: foldr1: empty structure
Example1 expression
foldr1 (-) [1..4]-2
Example1 expression
foldr1 (&&) [True, False, True, True]False
Example1 expression
foldr1 (||) [False, False, True, True]True
Example1 expression
foldr1 (+) [1..]* Hangs forever *
datadata NESet a
#

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:

  1. The nonEmptySet smart constructor will convert a Set a into a Maybe (NESet a), returning Nothing if the original Set was empty.

  2. You can use the insertSet family of functions to insert a value into a Set to create a guaranteed NESet.

  3. 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.

  4. withNonEmpty offers a continuation-based interface for deconstructing a Set and treating it as if it were an NESet.

You can convert an NESet into a Set with toSet or IsNonEmpty, essentially "obscuring" the non-empty property from the type.

Instances22Foldable, Foldable1, Eq1, Ord1, Show1, Singleton, …
  • Foldable NESetDefined in nonempty-containers-0.3.6.0 · Data.Set.NonEmpty.Internal

    Traverses elements in ascending order

    foldr1, foldl1, minimum, maximum are all total.

  • Foldable1 NESetDefined in nonempty-containers-0.3.6.0 · Data.Set.NonEmpty.Internal

    Traverses elements in ascending order

  • Eq1 NESetDefined in nonempty-containers-0.3.6.0 · Data.Set.NonEmpty.Internal
  • Ord1 NESetDefined in nonempty-containers-0.3.6.0 · Data.Set.NonEmpty.Internal
  • Show1 NESetDefined in nonempty-containers-0.3.6.0 · Data.Set.NonEmpty.Internal
  • Singleton a (NESet a)Defined in Agda-2.8.0.2 · Agda.Utils.Singleton
  • Ord a => IsList (NESet a)Defined in nonempty-containers-0.3.6.0 · Data.Set.NonEmpty.Internal
  • Eq a => Eq (NESet a)Defined in nonempty-containers-0.3.6.0 · Data.Set.NonEmpty.Internal
  • (Data a, Ord a) => Data (NESet a)Defined in nonempty-containers-0.3.6.0 · Data.Set.NonEmpty.Internal
  • Ord a => Ord (NESet a)Defined in nonempty-containers-0.3.6.0 · Data.Set.NonEmpty.Internal
  • (Read a, Ord a) => Read (NESet a)Defined in nonempty-containers-0.3.6.0 · Data.Set.NonEmpty.Internal
  • Show a => Show (NESet a)Defined in nonempty-containers-0.3.6.0 · Data.Set.NonEmpty.Internal
  • Ord a => Semigroup (NESet a)Defined in nonempty-containers-0.3.6.0 · Data.Set.NonEmpty.Internal

    Left-biased union

  • NFData a => NFData (NESet a)Defined in nonempty-containers-0.3.6.0 · Data.Set.NonEmpty.Internal
  • (FromJSON a, Ord a) => FromJSON (NESet a)Defined in nonempty-containers-0.3.6.0 · Data.Set.NonEmpty.Internal
  • ToJSON a => ToJSON (NESet a)Defined in nonempty-containers-0.3.6.0 · Data.Set.NonEmpty.Internal
  • Ord a => IsNonEmptyList (NESet a)Defined in nonempty-containers-0.3.6.0 · Data.Containers.NonEmpty.List
  • HasRange a => HasRange (Set1 a)Defined in Agda-2.8.0.2 · Agda.Syntax.Position
  • (Ord a, KillRange a) => KillRange (Set1 a)Defined in Agda-2.8.0.2 · Agda.Syntax.Position
  • HasRangeWithoutFile a => HasRangeWithoutFile (Set1 a)Defined in Agda-2.8.0.2 · Agda.Syntax.Position
  • (Ord a, EmbPrj a) => EmbPrj (Set1 a)Defined in Agda-2.8.0.2 · Agda.TypeChecking.Serialise.Instances.Common · orphan
  • type Item (NESet a) = aDefined in nonempty-containers-0.3.6.0 · Data.Set.NonEmpty.Internal