Hoogle Search
Within Stackage Nightly 2026-07-03 (ghc-9.12.4)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
module Database.Relational.
Set This module defines set operations on monadic Relation operations.
module Data.Monoid.RightAction.
Set No documentation available.
-
core-data Core.Data.Structures A set of unique elements. The element type needs to be an instance of the same Key typeclass that is used for keys in the Map type above. Instances are already provided for many common element types. Set implements Foldable, Monoid, etc so many common operations such as foldr to walk the elements and reduce them, length to return the size of the collection, null to test whether is empty, and (<>) to take the union of two sets are available. To convert to other collection types see fromSet below. (this is a thin wrapper around unordered-containers's HashSet, but if you use the conversion functions to extract a list the list will be ordered according to the elements' Ord instance)
-
hashmap Data.HashSet The abstract type of a Set. Its interface is a suitable subset of IntSet.
-
This module defines a few set-like operations on type-level lists. It may be applicable beyond the units package.
-
Efficient sets over bounded enumerations, using bitwise operations based on containers and EdisonCore. In many cases, EnumSets may be optimised away entirely by constant folding at compile-time. For example, in the following code:
import Data.Enum.Set as E data Foo = A | B | C | D | E | F | G | H deriving (Bounded, Enum, Eq, Ord) instance E.AsEnumSet Foo addFoos :: E.EnumSet Foo -> E.EnumSet Foo addFoos = E.delete A . E.insert B bar :: E.EnumSet Foo bar = addFoos $ E.fromFoldable [A, C, E] barHasA :: Bool barHasA = E.member A bar
With -O or -O2, bar will compile to GHC.Types.W# 22## and barHasA will compile to GHC.Types.False. By default, Words are used as the representation. Other representations may be chosen in the class instance:{-# LANGUAGE TypeFamilies #-} import Data.Enum.Set as E import Data.Word (Word64) data Foo = A | B | C | D | E | F | G | H deriving (Bounded, Enum, Eq, Ord, Show) instance E.AsEnumSet Foo where type EnumSetRep Foo = Word64For type EnumSet E, EnumSetRep E should be a Word-like type that implements Bits and Num, and E should be a type that implements Eq and Enum equivalently and is a bijection to Int over its range. EnumSet E can only store a value of E if the result of applying fromEnum to the value is positive and less than the number of bits in EnumSetRep E. For this reason, it is preferable for E to be a type that derives Eq and Enum, and for EnumSetRep E to have more bits than the number of constructors of E. If the highest fromEnum value of E is 29, EnumSetRep E should be Word, because it always has at least 30 bits. This is the default implementation. Otherwise, options include Word32, Word64, and the wide-word package's Data.WideWord.Word128. Foreign types may also be used. Note: complexity calculations assume that EnumSetRep E implements Bits with constant-time functions, as is the case with Word etc. Otherwise, the complexity of those operations should be added to the complexity of EnumSet functions. -
cql Database.CQL.Protocol No documentation available.
-
cql Database.CQL.Protocol No documentation available.
-
cql Database.CQL.Protocol.Internal No documentation available.
-
cql Database.CQL.Protocol.Internal No documentation available.