Help | Examples | About | API | Blog | Hackage | Haskell
Concurrently search more than 6377 packages and more than 599194 functions! (Index generated: Tue, 22 Apr 2014 14:04:47 UTC )
Found 7488 functions, 235 packages and 259 completions.
Scrap Your Boilerplate
This package contains the generics system described in the Scrap Your Boilerplate papers (see http://www.cs.uu.nl/wiki/GenericProgramming/SYB ). It defines the Data class of types permitting folding and unfolding of constructor applications, instances of this class for primitive types, and a variety of traversals. No changelog available
Ralf Lammel, Simon Peyton Jones, Jose Pedro Magalhaes
Semigroupoids: Category sans id
Provides a wide array of (semi)groupoids and operations for working with them. A Semigroupoid is a Category without the requirement of identity arrows for every object in the category. A Category is any Semigroupoid for which the Yoneda lemma holds. When working with comonads you often have the <*> portion of an Applicative , but not the pure . This was captured in Uustalu and Vene's "Essence of Dataflow Programming" in the form of the ComonadZip class in the days before Applicative . Apply provides a weaker invariant, but for the comonads used for data flow programming (found in the streams package), this invariant is preserved. Applicative function composition forms a semigroupoid. Similarly many structures are nearly a comonad, but not quite, for instance lists provide a reasonable extend operation in the form of tails , but do not always contain a value. Ideally the following relationships would hold: Traversable <---- Foldable <--- Functor ------> Alt ---------> Plus Semigroupoid | | | | | v v v v v Traversable1 <--- Foldable1 Apply --------> Applicative -> Alternative Category | | | | v v v v Bind ---------> Monad -------> MonadPlus Arrow Apply, Bind, and Extend (not shown) give rise the Static, Kleisli and Cokleisli semigroupoids respectively. This lets us remove many of the restrictions from various monad transformers as in many cases the binding operation or <*> operation does not require them. Finally, to work with these weaker structures it is beneficial to have containers that can provide stronger guarantees about their contents, so versions of Traversable and Foldable that can be folded with just a Semigroup are added. No changelog available
Edward A. Kmett
collection of crypto hashes, fast, pure and practical
A collection of crypto hashes, with a practical incremental and one-pass, pure APIs, with performance close to the fastest implementations available in other languages. The implementations are made in C with a haskell FFI wrapper that hide the C implementation. Simple examples using the unified API: import Crypto.Hash sha1 :: ByteString -> Digest SHA1 sha1 = hash hexSha3_512 :: ByteString -> String hexSha3_512 bs = show (hash bs :: Digest SHA3_512) Simple examples using the module API: import qualified Crypto.Hash.SHA1 as SHA1 main = putStrLn $ show $ SHA1.hash (Data.ByteString.pack [0..255]) import qualified Crypto.Hash.SHA3 as SHA3 main = putStrLn $ show $ digest where digest = SHA3.finalize ctx ctx = foldl' SHA3.update iCtx (map Data.ByteString.pack [ [1,2,3], [4,5,6] ] iCtx = SHA3.init 224 No changelog available
Vincent Hanquez <vincent@snarc.org>
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 Skills Matter . 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: (Local Copy) 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 . Minimizing Dependencies If you want to provide lenses and traversals for your own types in your own libraries, then you can do so without incurring a dependency on this (or any other) lens package at all. e.g. for a data type: 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). Changelog
Edward A. Kmett
Reliable, high-performance processing with left-fold enumerators
Typical buffer–based incremental I/O is based around a single loop, which reads data from some source (such as a socket or file), transforms it, and generates one or more outputs (such as a line count, HTTP responses, or modified file). Although efficient and safe, these loops are all single–purpose; it is difficult or impossible to compose buffer–based processing loops. Haskell’s concept of “lazy I/O” allows pure code to operate on data from an external source. However, lazy I/O has several shortcomings. Most notably, resources such as memory and file handles can be retained for arbitrarily long periods of time, causing unpredictable performance and error conditions. Enumerators are an efficient, predictable, and safe alternative to lazy I/O. Discovered by Oleg Kiselyov, they allow large datasets to be processed in near–constant space by pure code. Although somewhat more complex to write, using enumerators instead of lazy I/O produces more correct programs. This library contains an enumerator implementation for Haskell, designed to be both simple and efficient. Three core types are defined, along with numerous helper functions: Iteratee : Data sinks, analogous to left folds. Iteratees consume a sequence of input values, and generate a single output value. Many iteratees are designed to perform side effects (such as printing to stdout ), so they can also be used as monad transformers. Enumerator : Data sources, which generate input sequences. Typical enumerators read from a file handle, socket, random number generator, or other external stream. To operate, enumerators are passed an iteratee, and provide that iteratee with input until either the iteratee has completed its computation, or EOF. Enumeratee : Data transformers, which operate as both enumerators and iteratees. Enumeratees read from an outer enumerator, and provide the transformed data to an inner iteratee. No changelog available
John Millikin <jmillikin@gmail.com>
Command line argument processing
This library provides an easy way to define command line parsers. Most users will want to use the System.Console.CmdArgs.Implicit module, whose documentation contains an example. System.Console.CmdArgs.Explicit provides a way to write command line parsers for both single mode programs (most programs) and multiple mode programs (e.g. darcs or cabal). Parsers are defined by constructing a data structure. System.Console.CmdArgs.Implicit provides a way to concisely define command line parsers, up to three times shorter than getopt. These parsers are translated into the Explicit data type. System.Console.CmdArgs.GetOpt provides a wrapper allowing compatiblity with existing getopt parsers, mapping to the Explicit data type. For a general reference on what command line flags are commonly used, see http://www.faqs.org/docs/artu/ch10s05.html . No changelog available
Neil Mitchell <ndmitchell@gmail.com>
A raw binding for the OpenGL graphics system
OpenGLRaw is a raw Haskell binding for the OpenGL 3.2 graphics system and lots of OpenGL extensions. It is basically a 1:1 mapping of OpenGL's C API, intended as a basis for a nicer interface. OpenGLRaw offers access to all necessary functions, tokens and types plus a general facility for loading extension entries. The module hierarchy closely mirrors the naming structure of the OpenGL extensions, making it easy to find the right module to import. All API entries are loaded dynamically, so no special C header files are needed for building this package. If an API entry is not found at runtime, a userError is thrown. OpenGL is the industry's most widely used and supported 2D and 3D graphics application programming interface (API), incorporating a broad set of rendering, texture mapping, special effects, and other powerful visualization functions. For more information about OpenGL and its various extensions, please see http://www.opengl.org/ and http://www.opengl.org/registry/ . No changelog available
Vector & affine spaces, linear maps, and derivatives
vector-space provides classes and generic operations for vector spaces and affine spaces. It also defines a type of infinite towers of generalized derivatives. A generalized derivative is a linear transformation rather than one of the common concrete representations (scalars, vectors, matrices, ...). Warning : this package depends on type families working fairly well, requiring GHC version at least 6.9. Project wiki page: http://haskell.org/haskellwiki/vector-space © 2008-2012 by Conal Elliott; BSD3 license. No changelog available
Conal Elliott
A binding for the OpenGL graphics system
A Haskell binding for the OpenGL graphics system (GL, version 4.4) and its accompanying utility library (GLU, version 1.3). OpenGL is the industry's most widely used and supported 2D and 3D graphics application programming interface (API), incorporating a broad set of rendering, texture mapping, special effects, and other powerful visualization functions. For more information about OpenGL and its various extensions, please see http://www.opengl.org/ and http://www.opengl.org/registry/ . No changelog available
Portable temporary file and directory support for Windows and Unix, based on code from Cabal
The functions for creating temporary files and directories in the base library are quite limited. The unixutils package contains some good ones, but they aren't portable to Windows. This library just repackages the Cabal implementations of its own temporary file and folder functions so that you can use them without linking against Cabal or depending on it being installed. No changelog available
Isaac Jones <ijones@syntaxpolice.org> Duncan Coutts <duncan@haskell.org>
Prelude.map:: (a -> b) -> [a] -> [b]
base

map f xs is the list obtained by applying f to each element of xs, i.e.,

map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn]
map f [x1, x2, ...] == [f x1, f x2, ...]
Source
Prelude.concatMap:: (a -> [b]) -> [a] -> [b]
base

Map a function over a list and concatenate the results.

Source
Prelude.foldl:: (b -> a -> b) -> b -> [a] -> b
base

foldl, applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right:

foldl f z [x1, x2, ..., xn] == (...((z `f` x1) `f` x2) `f`...) `f` xn

The list must be finite.

Source
Prelude.map:: (a -> b) -> [a] -> [b]
haskell98

map f xs is the list obtained by applying f to each element of xs, i.e.,

map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn]
map f [x1, x2, ...] == [f x1, f x2, ...]
Data.Foldable.fold:: t m -> m
base

Combine the elements of a structure using a monoid.

Source
Data.Map.fold:: (a -> b -> b) -> b -> Map k a -> b
containers

Deprecated. As of version 0.5, replaced by foldr.

O(n). Fold the values in the map using the given right-associative binary operator. This function is an equivalent of foldr and is present for compatibility only.

Source
Data.Map.Map:: module
containers

Note: You should use Data.Map.Strict instead of this module if:

  • You will eventually need all the values stored.
  • The stored values don't represent large virtual data structures to be lazily computed.

An efficient implementation of ordered maps from keys to values (dictionaries).

These modules are intended to be imported qualified, to avoid name clashes with Prelude functions, e.g.

  import qualified Data.Map as Map

The implementation of Map 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, http://www.swiss.ai.mit.edu/~adams/BB/.
  • 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.

Operation comments contain the operation time complexity in the Big-O notation (http://en.wikipedia.org/wiki/Big_O_notation).

Source
Data.Set.fold:: (a -> b -> b) -> b -> Set a -> b
containers

O(n). Fold the elements in the set using the given right-associative binary operator. This function is an equivalent of foldr and is present for compatibility only.

Please note that fold will be deprecated in the future and removed.

Source
Data.IntSet.fold:: (Key -> b -> b) -> b -> IntSet -> b
containers

O(n). Fold the elements in the set using the given right-associative binary operator. This function is an equivalent of foldr and is present for compatibility only.

Please note that fold will be deprecated in the future and removed.

Source
Prelude.concatMap:: (a -> [b]) -> [a] -> [b]
haskell98

Map a function over a list and concatenate the results.

Powered by Haskell, HXT, Snap, and
Please send any feedback to hayoo@holumbus.org