Hoogle Search

Within LTS Haskell 24.3 (ghc-9.10.2)

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

  1. module Database.Relational.Set

    This module defines set operations on monadic Relation operations.

  2. data Set ε

    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)

  3. newtype Set a

    cql Database.CQL.Protocol

    No documentation available.

  4. Set :: [a] -> Set a

    cql Database.CQL.Protocol

    No documentation available.

  5. newtype Set a

    cql Database.CQL.Protocol.Internal

    No documentation available.

  6. Set :: [a] -> Set a

    cql Database.CQL.Protocol.Internal

    No documentation available.

  7. module Data.SBV.Set

    A collection of set utilities, useful when working with symbolic sets. To the extent possible, the functions in this module follow those of Data.Set so importing qualified is the recommended workflow. Note that unlike Data.Set, SBV sets can be infinite, represented as a complement of some finite set. This means that a symbolic set is either finite, or its complement is finite. (If the underlying domain is finite, then obviously both the set itself and its complement will always be finite.) Therefore, there are some differences in the API from Haskell sets. For instance, you can take the complement of any set, which is something you cannot do in Haskell! Conversely, you cannot compute the size of a symbolic set (as it can be infinite!), nor you can turn it into a list or necessarily enumerate its elements.

  8. module Data.Metrology.Set

    This module defines a few set-like operations on type-level lists. It may be applicable beyond the units package.

  9. module Data.Enum.Set

    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 = Word64
    
    For 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.

  10. module Data.Delta.Set

    Delta types for Set.

Page 3 of many | Previous | Next