Hoogle Search

Within LTS Haskell 24.49 (ghc-9.10.3)

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

  1. package hashtables

    Mutable hash tables in the ST monad This package provides a couple of different implementations of mutable hash tables in the ST monad, as well as a typeclass abstracting their common operations, and a set of wrappers to use the hash tables in the IO monad. QUICK START: documentation for the hash table operations is provided in the Data.HashTable.Class module, and the IO wrappers (which most users will probably prefer) are located in the Data.HashTable.IO module. This package currently contains three hash table implementations:

    1. Data.HashTable.ST.Cuckoo contains an implementation of "cuckoo hashing" as introduced by Pagh and Rodler in 2001 (see http://en.wikipedia.org/wiki/Cuckoo_hashing). Cuckoo hashing has worst-case O(1) lookups and can reach a high "load factor", in which the table can perform acceptably well even when approaching 90% full. Randomized testing shows this implementation of cuckoo hashing to be slightly faster on insert and slightly slower on lookup than Data.HashTable.ST.Basic, while being more space efficient by about a half-word per key-value mapping. Cuckoo hashing, like the basic hash table implementation using linear probing, can suffer from long delays when the table is resized.
    2. Data.HashTable.ST.Basic contains a basic open-addressing hash table using linear probing as the collision strategy. On a pure speed basis it should currently be the fastest available Haskell hash table implementation for lookups, although it has a higher memory overhead than the other tables and can suffer from long delays when the table is resized because all of the elements in the table need to be rehashed.
    3. Data.HashTable.ST.Linear contains a linear hash table (see http://en.wikipedia.org/wiki/Linear_hashing), which trades some insert and lookup performance for higher space efficiency and much shorter delays when expanding the table. In most cases, benchmarks show this table to be currently slightly faster than Data.HashTable from the Haskell base library.
    It is recommended to create a concrete type alias in your code when using this package, i.e.:
    import qualified Data.HashTable.IO as H
    
    type HashTable k v = H.BasicHashTable k v
    
    foo :: IO (HashTable Int Int)
    foo = do
    ht <- H.new
    H.insert ht 1 1
    return ht
    
    Firstly, this makes it easy to switch to a different hash table implementation, and secondly, using a concrete type rather than leaving your functions abstract in the HashTable class should allow GHC to optimize away the typeclass dictionaries. This package accepts a couple of different cabal flags:
    • unsafe-tricks, default ON. If this flag is enabled, we use some unsafe GHC-specific tricks to save indirections (namely unsafeCoerce# and reallyUnsafePtrEquality#. These techniques rely on assumptions about the behaviour of the GHC runtime system and, although they've been tested and should be safe under normal conditions, are slightly dangerous. Caveat emptor. In particular, these techniques are incompatible with HPC code coverage reports.
    • sse42, default OFF. If this flag is enabled, we use some SSE 4.2 instructions (see http://en.wikipedia.org/wiki/SSE4, first available on Intel Core 2 processors) to speed up cache-line searches for cuckoo hashing.
    • bounds-checking, default OFF. If this flag is enabled, array accesses are bounds-checked.
    • debug, default OFF. If turned on, we'll rudely spew debug output to stdout.
    • portable, default OFF. If this flag is enabled, we use only pure Haskell code and try not to use unportable GHC extensions. Turning this flag on forces unsafe-tricks and sse42 OFF.
    Please send bug reports to https://github.com/gregorycollins/hashtables/issues.

  2. package haskeline

    A command-line interface for user input, written in Haskell. Haskeline provides a user interface for line input in command-line programs. This library is similar in purpose to readline, but since it is written in Haskell it is (hopefully) more easily used in other Haskell programs. Haskeline runs both on POSIX-compatible systems and on Windows.

  3. package hslua-marshalling

    Marshalling of values between Haskell and Lua. Provides functions to marshal values from Haskell to Lua, and vice versa. This package is part of HsLua, a Haskell framework built around the embeddable scripting language Lua.

  4. package storable-record

    Elegant definition of Storable instances for records With this package you can build a Storable instance of a record type from Storable instances of its elements in an elegant way. It does not do any magic, just a bit arithmetic to compute the right offsets, that would be otherwise done manually or by a preprocessor like C2HS. I cannot promise that the generated memory layout is compatible with that of a corresponding C struct. However, the module generates the smallest layout that is possible with respect to the alignment of the record elements. If you encounter, that a record does not have a compatible layout, we should fix that. But also without C compatibility this package is useful e.g. in connection with StorableVector. We provide Storable instance support for several cases:

    • If you wrap a type in a newtype, then you can lift its Storable instance to that newtype with the module Foreign.Storable.Newtype. This way you do not need the GeneralizedNewtypeDeriving feature of GHC.
    • If you have a type that is an instance of Traversable, you can use that feature for implementation of Storable methods. The module Foreign.Storable.Traversable allows manipulation of the portion of your type, that is accessible by Traversable methods. For instance with the type data T a = Cons Int [a] and an according Traversable implementation, you can load and store the elements of the contained list. This may be part of a Storable implementation of the whole type.
    • If you have a record containing elements of various types, then you need module Foreign.Storable.Record.
    Note however that the Storable instances defined with this package are quite slow in (up to) GHC-6.12.1. I'm afraid this is due to incomplete inlining, but we have still to investigate the problem. For examples see packages storable-tuple and sample-frame.

  5. package xml

    A simple XML library. A simple XML library.

  6. package HsOpenSSL

    Partial OpenSSL binding for Haskell HsOpenSSL is an OpenSSL binding for Haskell. It can generate RSA and DSA keys, read and write PEM files, generate message digests, sign and verify messages, encrypt and decrypt messages. It has also some capabilities of creating SSL clients and servers. This package is in production use by a number of Haskell based systems and stable. You may also be interested in the tls package, http://hackage.haskell.org/package/tls, which is a pure Haskell implementation of SSL.

  7. package lucid

    Clear to write, read and edit DSL for HTML Clear to write, read and edit DSL for HTML.

    • Names are consistent, and do not conflict with base or are keywords (all have suffix _)
    • Same combinator can be used for attributes and elements (e.g. style_)
    • For more, read the blog post
    See the Lucid module for more documentation.

  8. package regex-base

    Common "Text.Regex.*" API for Regex matching This package does not provide the ability to do regular expression matching. Instead, it provides the type classes that constitute the abstract API that is implemented by regex-* backends such as:

    See also https://wiki.haskell.org/Regular_expressions for more information.

  9. package statistics

    A library of statistical types, data, and functions This library provides a number of common functions and types useful in statistics. We focus on high performance, numerical robustness, and use of good algorithms. Where possible, we provide references to the statistical literature. . The library's facilities can be divided into four broad categories: . * Working with widely used discrete and continuous probability distributions. (There are dozens of exotic distributions in use; we focus on the most common.) . * Computing with sample data: quantile estimation, kernel density estimation, histograms, bootstrap methods, significance testing, and regression and autocorrelation analysis. . * Random variate generation under several different distributions. . * Common statistical tests for significant differences between samples.

  10. package storablevector

    Fast, packed, strict storable arrays with a list interface like ByteString Fast, packed, strict storable arrays with a list interface, a chunky lazy list interface with variable chunk size and an interface for write access via the ST monad. This is much like bytestring and binary but can be used for every Foreign.Storable.Storable type. See also package http://hackage.haskell.org/package/vector with a similar intention. We do not provide advanced fusion optimization, since especially for lazy vectors this would either be incorrect or not applicable. However we provide fusion with lazy lists in the package http://hackage.haskell.org/package/storablevector-streamfusion.

Page 24 of many | Previous | Next