Found 5834 functions, 187 packages and 233 completions.
Scrap Your BoilerplateThis 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.
Ralf Lammel, Simon Peyton Jones, Jose Pedro Magalhaes
Haskell 98 semigroupoids: Category sans idProvides a wide array of semigroupoids and operations for working with semigroupds. A Semigroupoid is a Category without the requirement of identity arrows for every object in the category. 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.
Edward A. Kmett
collection of crypto hashes, fast, pure and practicalA collection of crypto hashes, with a practical incremental and one-pass, pure APIs, with performance close to the fastest implementations available in others 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 [1..256]) 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
Vincent Hanquez <vincent@snarc.org>
Reliable, high-performance processing with left-fold enumeratorsTypical 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.
John Millikin <jmillikin@gmail.com>
A raw binding for the OpenGL graphics systemOpenGLRaw 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/ .
Command line argument processingThis 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 .
Neil Mitchell <ndmitchell@gmail.com>
A binding for the OpenGL graphics systemA Haskell binding for the OpenGL graphics system (GL, version 3.2) 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/ .
Vector & affine spaces, linear maps, and derivativesvector-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.
Conal Elliott
Lenses, Folds and TraversalsThis 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 : https://github.com/ekmett/lens#lens-lenses-folds-and-traversals A video on how to use lenses and how they are constructed is available from youtube: http://youtu.be/cefnmjtAolY?hd=1 Slides can be obtained here: http://comonad.com/haskell/Lenses-Folds-and-Traversals-NYC.pdf 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: https://github.com/ekmett/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: https://github.com/ekmett/lens/blob/master/examples/ Lenses, Folds and Traversals The core of the hierarchy of lens-like constructions looks like: Local copy ( Hierarchy.png ) 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) -- baz :: 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).
Edward A. Kmett
A raw binding for the OpenGL graphics systemGLURaw is a raw Haskell binding for the GLU 1.3 OpenGL utility library. It is basically a 1:1 mapping of GLU's C API, intended as a basis for a nicer interface. 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/ .