Hoogle Search
Within LTS Haskell 24.46 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
Generic HTTP types for Haskell (for both client and server code). Types and functions to describe and handle HTTP concepts. Including "methods", "headers", "query strings", "paths" and "HTTP versions".
-
Primitive memory-related operations This package provides various primitive memory-related operations.
-
GHC primitives This package contains the primitive types and operations supplied by GHC. It is an internal package, only for the use of GHC developers. GHC users should not use it! If you do use it then expect breaking changes at any time without warning. You should prefer to import GHC.Exts from the base package instead.
-
Lenses, Folds and Traversals This package comes "Batteries Included" with many useful lenses for the types commonly used from the Haskell Platform, and with tools for automatically generating lenses and isomorphisms for user-supplied data types. The combinators in Control.Lens provide a highly generic toolbox for composing families of getters, folds, isomorphisms, traversals, setters and lenses and their indexed variants. An overview, with a large number of examples can be found in the README. An introductory video on the style of code used in this library by Simon Peyton Jones is available from Internet Archive. A video on how to use lenses and how they are constructed is available on youtube. Slides for that second talk can be obtained from comonad.com. More information on the care and feeding of lenses, including a brief tutorial and motivation for their types can be found on the lens wiki. A small game of pong and other more complex examples that manage their state using lenses can be found in the example folder. Lenses, Folds and Traversals With some signatures simplified, the core of the hierarchy of lens-like constructions looks like: You can compose any two elements of the hierarchy above using (.) from the Prelude, and you can use any element of the hierarchy as any type it linked to above it. The result is their lowest upper bound in the hierarchy (or an error if that bound doesn't exist). For instance:
- You can use any Traversal as a Fold or as a Setter.
- The composition of a Traversal and a Getter yields a Fold.
data Foo a = Foo Int Int a
You can define lenses such as-- bar :: Lens' (Foo a) Int bar :: Functor f => (Int -> f Int) -> Foo a -> f (Foo a) bar f (Foo a b c) = fmap (\a' -> Foo a' b c) (f a)
-- quux :: Lens (Foo a) (Foo b) a b quux :: Functor f => (a -> f b) -> Foo a -> f (Foo b) quux f (Foo a b c) = fmap (Foo a b) (f c)
without the need to use any type that isn't already defined in the Prelude. And you can define a traversal of multiple fields with Control.Applicative.Applicative:-- traverseBarAndBaz :: Traversal' (Foo a) Int traverseBarAndBaz :: Applicative f => (Int -> f Int) -> Foo a -> f (Foo a) traverseBarAndBaz f (Foo a b c) = Foo <$> f a <*> f b <*> pure c
What is provided in this library is a number of stock lenses and traversals for common haskell types, a wide array of combinators for working them, and more exotic functionality, (e.g. getters, setters, indexed folds, isomorphisms). -
Run IO operations asynchronously and wait for their results This package provides a higher-level interface over threads, in which an Async a is a concurrent thread that will eventually deliver a value of type a. The package provides ways to create Async computations, wait for their results, and cancel them. Using Async is safer than using threads in two ways:
- When waiting for a thread to return a result, if the thread dies with an exception then the caller must either re-throw the exception (wait) or handle it (waitCatch); the exception cannot be ignored.
- The API makes it possible to build a tree of threads that are automatically killed when their parent dies (see withAsync).
-
Low-level networking interface This package provides a low-level networking interface.
High-Level Packages
Other packages provide higher level interfaces:- connection
- hookup
- network-simple
Extended Packages
network seeks to provide a cross-platform core for networking. As such some APIs live in extended libraries. Packages in the network ecosystem are often prefixed with network-.network-bsd
In network-3.0.0.0 the Network.BSD module was split off into its own package, network-bsd-3.0.0.0.network-uri
In network-2.6 the Network.URI module was split off into its own package, network-uri-2.6. If you're using the Network.URI module you can automatically get it from the right package by adding this to your .cabal file:library build-depends: network-uri-flag
-
Monadic parser combinators Parsec is designed from scratch as an industrial-strength parser library. It is simple, safe, well documented (on the package homepage), has extensive libraries, good error messages, and is fast. It is defined as a monad transformer that can be stacked on arbitrary monads, and it is also parametric in the input stream type. The main entry point is the Text.Parsec module which provides defaults for parsing Character data. The Text.ParserCombinators.Parsec module hierarchy contains the legacy parsec-2 API and may be removed at some point in the future.
-
A class for types with a default value This module defines a class for types with a default value. Instances are provided for (), Data.Set.Set, Data.Map.Map, Int, Integer, Float, Double, and many others.
-
Test interactive Haskell examples doctest is a tool that checks examples and properties in Haddock comments. It is similar in spirit to the popular Python module with the same name. Documentation is at https://github.com/sol/doctest#readme.
-
POSIX functionality This package gives you access to the set of operating system services standardised by POSIX.1-2008 (or the IEEE Portable Operating System Interface for Computing Environments - IEEE Std. 1003.1). The package is not supported under Windows.