Set +Data

module Data.Set
containers Data.Set
An efficient implementation of sets. These modules are intended to be imported qualified, to avoid name clashes with Prelude functions, e.g. > import Data.Set (Set) > import qualified Data.Set as Set The implementation of Set is based on size balanced binary trees (or trees of bounded balance) as described by: * Stephen Adams, "Efficient sets: a balancing act", Journal of Functional Programming 3(4):553-562, October 1993, * J. Nievergelt and E.M. Reingold, "Binary search trees of bounded balance", SIAM journal of computing 2(1), March 1973. Note that the implementation is left-biased -- the elements of a first argument are always preferred to the second, for example in union or insert. Of course, left-biasing can only be observed when equality is an equivalence relation instead of structural equality.
data Set a
containers Data.Set
A set of values a.
setBit :: Bits a => a -> Int -> a
base Data.Bits
package set-cover
Solver for exact set cover problems. Included examples: Sudoku, 8 Queens, Soma Cube, Tetris Cube, Cube of L's, Logika's Baumeister puzzle. Generic algorithm allows to choose between slow but flexible Set from containers package and fast but cumbersome bitvectors. Build examples with cabal install -fbuildExamples. The package needs only Haskell 98. Version 0.0.3
package set-extra
Functions that could be added to Data.Set. Version 1.3.1
package set-monad
The set-monad library exports the Set abstract data type and set-manipulating functions. These functions behave exactly as their namesakes from the Data.Set module of the containers library. In addition, the set-monad library extends Data.Set by providing Functor, Applicative, Alternative, Monad, and MonadPlus instances for sets. In other words, you can use the set-monad library as a drop-in replacement for the Data.Set module of the containers library and, in addition, you will also get the aforementioned instances which are not available in the containers package. It is not possible to directly implement instances for the aforementioned standard Haskell type classes for the Set data type from the containers library. This is because the key operations map and union, are constrained with Ord as follows. > map :: (Ord a, Ord b) => (a -> b) -> Set a -> Set b > union :: (Ord a) => Set a -> Set a -> Set a The set-monad library provides the type class instances by wrapping the constrained Set type into a data type that has unconstrained constructors corresponding to monadic combinators. The data type constructors that represent monadic combinators are evaluated with a constrained run function. This elevates the need to use the constraints in the instance definitions (this is what prevents a direct definition). The wrapping and unwrapping happens internally in the library and does not affect its interface. For details, see the rather compact definitions of the run function and type class instances. The left identity and associativity monad laws play a crucial role in the definition of the run function. The rest of the code should be self explanatory. The technique is not new. This library was inspired by [1]. To my knowledge, the original, systematic presentation of the idea to represent monadic combinators as data is given in [2]. There is also a Haskell library that provides a generic infrastructure for the aforementioned wrapping and unwrapping [3]. The set-monad library is particularly useful for writing set-oriented code using the do and/or monad comprehension notations. For example, the following definitions now type check. > s1 :: Set (Int,Int) > s1 = do a <- fromList [1 .. 4] > b <- fromList [1 .. 4] > return (a,b) > -- with -XMonadComprehensions > s2 :: Set (Int,Int) > s2 = [ (a,b) | (a,b) <- s1, even a, even b ] > s3 :: Set Int > s3 = fmap (+1) (fromList [1 .. 4]) As noted in [1], the implementation technique can be used for monadic libraries and EDSLs with restricted types (compiled EDSLs often restrict the types that they can handle). Haskell's standard monad type class can be used for restricted monad instances. There is no need to resort to GHC extensions that rebind the standard monadic combinators with the library or EDSL specific ones. [1] CSDL Blog: The home of applied functional programming at KU. Monad Reification in Haskell and the Sunroof Javascript compiler. [2] Chuan-kai Lin. 2006. Programming monads operationally with Unimo. In Proceedings of the eleventh ACM SIGPLAN International Conference on Functional Programming (ICFP '06). ACM. [3] Heinrich Apfelmus. The operational package. Version
package setenv
A cross-platform library for setting environment variables Version 0.1.1
package setlocale
A Haskell interface to setlocale(). Version 0.0.3
package setops
Uniform names (and Unicode operators) for set operations on data structures. Version 0.1.2
package setters
Haskell declares a getter for each `record' style data type field. This library will help you declare setters (`setFieldName' function for `fieldName' field). Version 0.1
package BiobaseTrainingData
Parameter training for RNA secondary structure prediction tools requires data to train on. Since there are a number of different available formats, and handling them all in the training tools is a pain, we have this library and programs. MkTrainingData transforms different formats and they all produce a common &quot;training data&quot; format. This format is Haskell-readable (and only partially human-readable) line-by-line. Generating additional training data is therefor easy as one can just &quot;cat&quot; together different training files. Note that several features are designed around extended RNA secondary structures. Now with some filtering and manipulation options. Version
package BiobaseTurner
A data structure for Mathews / Turner RNA and DNA energy parameters. This library currently only provides an importer, not export functions. There are two reasons: (i) We currently have no use-case where we need more than import facilities (ii) The file structure is geared towards humans, not machines. If you need to be able to export, send a mail. NOTE This is rather fragile as some files use different index enumerations, which we handle rather... simplistically. In principle, all parameters should be symmetric regarding the stem direction. However, there is one asymmetry case in dnastack.dh. We do not fix this problem as we do not change the source files. Version
package BiobaseTypes
Provides an algebraic ring class and instances for Gibbs free energy, partition function probabilities, and scores. Conversion between different entities is provided by a convert function. All entities are ready for the vector library. * Ignore everything except the Ring itself! Version
package bitset
A bit set is a compact data structure, which maintains a set of members from a type that can be enumerated (i. e. has an `Enum' instance). Version 1.4.7
package cabal-setup
cabal-setup is a user interface to Cabal.  It provides the basic commands for configuring, building, and installing Cabal packages. Version 1.2.1
package cassette
Combinator library for defining both type safe parsers and pretty printers simultaneously. This library performs well in practice because parsers and printers are implemented in CPS and because arguments are always curried, rather than packed into nested tuples. Version 0.1.0
package charset
Fast unicode character sets based on complemented PATRICIA tries Version
package charsetdetect
Mozilla have developed a robust and efficient character set detection algorithm for use in their web browsers.  The algorithm is able to detect all of the most frequently encountered character encodings totally automatically. This library wraps up their library and exposes a very simple Haskell interface to it. The library is portable, and is confirmed to work on both Unix and Windows. Version 1.0
package data-lens-ixset
Integrates Data.IxSet with Data.Lens. Version 0.1.4
module Data.IntSet
containers Data.IntSet
An efficient implementation of integer sets. These modules are intended to be imported qualified, to avoid name clashes with Prelude functions, e.g. > import Data.IntSet (IntSet) > import qualified Data.IntSet as IntSet The implementation is based on big-endian patricia trees. This data structure performs especially well on binary operations like union and intersection. However, my benchmarks show that it is also (much) faster on insertions and deletions when compared to a generic size-balanced set implementation (see Data.Set). * Chris Okasaki and Andy Gill, "Fast Mergeable Integer Maps", Workshop on ML, September 1998, pages 77-86, * D.R. Morrison, "/PATRICIA -- Practical Algorithm To Retrieve Information Coded In Alphanumeric/", Journal of the ACM, 15(4), October 1968, pages 514-534. Additionally, this implementation places bitmaps in the leaves of the tree. Their size is the natural size of a machine word (32 or 64 bits) and greatly reduce memory footprint and execution times for dense sets, e.g. sets other. The asymptotics are not affected by this optimization. Many operations have a worst-case complexity of O(min(n,W)). This means that the operation can become linear in the number of elements with a maximum of W -- the number of bits in an Int (32 or 64).

Show more results