Hoogle Search
Within LTS Haskell 24.16 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
POSIX network database (
) API This package provides Haskell bindings to the the POSIX network database (netdb.h) API. Relationship to the network package
The network package version 2.* series provides Network.BSD but it is removed starting with network version 3.0. This package provides the Network.BSD module split off from the network package. If in addition to the network's modules also Network.BSD is necessary, add network-bsd to your dependencies like so:library build-depends: network >= 2.7 && < 3.2 , network-bsd >= 2.7 && < 2.9
I.e. you can control the version of the network package independently. NOTE: Starting with network-bsd-2.8.1.0 the APIs of network and network-bsd evolve differently, and consequently the versioning doesn't match up anymore! Moreover, also starting with version network-bsd-2.8.1.0 this package requires network >= 3 in order to avoid module name clashes with network < 3's Network.BSD module. However, network-bsd-2.7.0.0 and network-bsd-2.8.0.0 passes thru the Network.BSD module from network-2.7.* and network-2.8.* respectively in a non-clashing way via Cabal's reexported-modules feature while ensuring a well-defined API versioning of the observable API of network-bsd. This is why the example above supporting a wide range of network versions works by including version 2.7.0.0 in the required version range of network-bsd. -
Backend for the persistent library using sqlite3. This package includes a thin sqlite3 wrapper based on the direct-sqlite package, as well as the entire C library, so there are no system dependencies.
-
A standard library for Haskell See README and Haddocks at https://www.stackage.org/package/rio
-
A toolkit for making compile-time interpolated templates Shakespeare is a family of type-safe, efficient template languages. Shakespeare templates are expanded at compile-time, ensuring that all interpolated variables are in scope. Variables are interpolated according to their type through a typeclass. Shakespeare templates can be used inline with a quasi-quoter or in an external file. Note there is no dependency on haskell-src-extras. Instead Shakespeare believes logic should stay out of templates and has its own minimal Haskell parser. Packages that use this: xml-hamlet Please see the documentation at http://www.yesodweb.com/book/shakespearean-templates for more details.
-
A library for client-side HTTP The HTTP package supports client-side web programming in Haskell. It lets you set up HTTP connections, transmitting requests and processing the responses coming back, all from within the comforts of Haskell. It's dependent on the network package to operate, but other than that, the implementation is all written in Haskell. A basic API for issuing single HTTP requests + receiving responses is provided. On top of that, a session-level abstraction is also on offer (the BrowserAction monad); it taking care of handling the management of persistent connections, proxies, state (cookies) and authentication credentials required to handle multi-step interactions with a web server. The representation of the bytes flowing across is extensible via the use of a type class, letting you pick the representation of requests and responses that best fits your use. Some pre-packaged, common instances are provided for you (ByteString, String). Here's an example use:
do rsp <- Network.HTTP.simpleHTTP (getRequest "http://www.haskell.org/") -- fetch document and return it (as a 'String'.) fmap (take 100) (getResponseBody rsp) do (_, rsp) <- Network.Browser.browse $ do setAllowRedirects True -- handle HTTP redirects request $ getRequest "http://www.haskell.org/" return (take 100 (rspBody rsp))
Note: This package does not support HTTPS connections. If you need HTTPS, take a look at the following packages:- http-streams
- http-client (in combination with http-client-tls)
- req
- wreq
-
A safe approach to CAS and other atomic ops in Haskell. After GHC 7.4 a new `casMutVar#` primop became available, but it's difficult to use safely, because pointer equality is a highly unstable property in Haskell. This library provides a safer method based on the concept of Tickets. . Also, this library uses the "foreign primop" capability of GHC to add access to other variants that may be of interest, specifically, compare and swap inside an array. . Note that as of GHC 7.8, the relevant primops have been included in GHC itself. This library is engineered to work pre- and post-GHC-7.8, while exposing the same interface.
-
Dependent sum type A dependent sum is a generalization of a particular way of thinking about the Either type. Either a b can be thought of as a 2-tuple (tag, value), where the value of the tag determines the type of the value. In particular, either tag = Left and value :: a or tag = Right and value :: b. This package allows you to define your own dependent sum types by using your own "tag" types.
-
Simplified error-handling The one-stop shop for all your error-handling needs! Just import Control.Error. This library encourages an error-handling style that directly uses the type system, rather than out-of-band exceptions.
-
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:
- 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.
- 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.
- 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.
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.
-
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.