Set

Finite Sets

The Set e type represents a set of elements of type e. Most operations require that e be an instance of the Ord class. A Set is strict in its elements. For a walkthrough of the most commonly used functions see the sets introduction. This module is intended to be imported qualified, to avoid name clashes with Prelude functions, e.g.
import Data.Set (Set)
import qualified Data.Set as Set
Note that the implementation is generally left-biased. Functions that take two sets as arguments and combine them, such as union and intersection, prefer the entries in the first argument to those in the second. Of course, this bias can only be observed when equality is an equivalence relation instead of structural equality.

Warning

The size of the set must not exceed maxBound::Int. Violation of this condition is not detected and if the size limit is exceeded, its behaviour is undefined.

Implementation

The implementation of Set is based on size balanced binary trees (or trees of bounded balance) as described by: Bounds for union, intersection, and difference are as given by

Performance information

The time complexity is given for each operation in big-O notation, with <math> referring to the number of entries in the set. Operations like member, insert, and delete take <math> time. Binary set operations like union and intersection take <math> time, where <math> and <math> are the sizes of the smaller and larger input sets respectively.
A set of values a.
Not on Stackage, so not searched. See README for more info
This module defines the command line interface for all the Cabal commands. For each command (like configure, build etc) it defines a type that holds all the flags, the default set of flags and a CommandUI that maps command line flags to and from the corresponding flags type. All the flags types are instances of Monoid, see http://www.haskell.org/pipermail/cabal-devel/2007-December/001509.html for an explanation. The types defined here get used in the front end and especially in cabal-install which has to do quite a bit of manipulating sets of command line flags. This is actually relatively nice, it works quite well. The main change it needs is to unify it with the code for managing sets of fields that can be read and written from files. This would allow us to save configure flags in config files.
An error involving the SetupHooks module of a package with Hooks build-type.
Hooks into the cabal build phases. Usage:
  • In your .cabal file, declare build-type: Hooks (with a cabal-version greater than or equal to 3.14),
  • In your .cabal file, include a custom-setup stanza which declares the dependencies of your SetupHooks module; this will usually contain a dependency on the Cabal-hooks package.
  • Provide a SetupHooks.hs module next to your .cabal file; it must export setupHooks :: SetupHooks.
Set-like operations on lists Avoid using them as much as possible
Set how many times a breakpoint should be ignored also used for enable/disable
Run-time settings