Found 4053 functions, 136 packages and 151 completions.
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 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
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/ .
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 .
A binding for the OpenGL graphics system
A 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 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.
A raw binding for the OpenGL graphics system
GLURaw 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/ .
FFI domain specific language, on top of hsc2hs.
This is a set of macros to be used when writing Haskell FFI. They were designed to be able to fully describe C interfaces, so that hsc2hs can extract from them all Haskell code needed to mimic such interfaces. All Haskell names used are automatically derived from C names, structures are mapped to Haskell instances of Storable, and there are also macros you can use with C code to help write bindings to inline functions or macro functions. Documentation is available at package homepage: http://bitbucket.org/mauricio/bindings-dsl This package contains no Haskell code, only C header files designed for hsc2hs.
A simple directory-like tree datatype, with useful IO functions
A simple directory-like tree datatype, with useful IO functions and Foldable and Traversable instance Provides a simple data structure mirroring a directory tree on the filesystem, as well as useful functions for reading and writing file and directory structures in the IO monad. Importing the library and optional (useful) Foldable and Traverable libraries: import System.Directory.Tree import qualified Data.Foldable as F import qualified Data.Traversable as T Write a hand-made directory tree of textfiles (strings) to the disk. Simulates creating a new user Tux's home directory on a unix machine: writeDirectory$ "/home" :/ Dir "Tux" [File "README" "Welcome!"] read a directory by opening all the files at a filepath with readFile, returning an 'AnchoredDirTree String' (d2). Then check for any IO failures: do (base :/ d2) <- readDirectory "../parent_dir/dir2/" let failed = anyFailed d2 if failed then ... Use Foldable instance function to concat a directory dir of text files into a single file under the same directory: do (b :/ dt) <- readDirectory dir let f = F.concat dt return$ b :/ File "ALL_TEXT" f Open all the files in the current directory as lazy bytestrings, ignoring the base path in Anchored wrapper: import qualified Data.ByteString.Lazy as B do (_ :/ dTree) <- readDirectoryWith B.readFile "./" This version also offers an experimental function readDirectoryWithL that does lazy directory IO, allowing you to treat the returned DirTree as if it were a normal lazily-generated data structure. For example, the following does only the amount of IO necessary to list the file names of the children of the root directory, similar to ls / : do d <- readDirectoryWithL readFile "/" mapM_ (putStrLn . name) $ contents $ free d Any ideas or suggestions for improvements are most welcome :-) CHANGES : from 0.10.1 added records for AnchoredDirTree: anchor , dirTree free deprecated in favor of dirTree added a new function dropTo implemented lenses compatible with lens package
XML parser/formatter based on expat
This package provides a general purpose Haskell XML library using Expat to do its parsing ( http://expat.sourceforge.net/ - a fast stream-oriented XML parser written in C). It is extensible to any string type, with String , ByteString and Text provided out of the box. Basic usage: Parsing a tree ( Tree ), formatting a tree ( Format ). Other features: Helpers for processing XML trees ( Proc ), trees annotated with XML source location ( Annotated ), extended XML trees with comments, processing instructions, etc ( Extended ), XML cursors ( Cursor ), SAX-style parse ( SAX ), and access to the low-level interface in case speed is paramount ( Internal.IO ). The design goals are speed, speed, speed, interface simplicity and modularity. For introduction and examples, see the Text.XML.Expat.Tree module. For benchmarks, http://haskell.org/haskellwiki/Hexpat/ If you want to do interactive I/O, an obvious option is to use lazy parsing with one of the lazy I/O functions such as hGetContents. However, this can be problematic in some applications because it doesn't handle I/O errors properly and can give no guarantee of timely resource cleanup. Because of the generalized list, Hexpat is designed to allow for chunked I/O, but as of this writing I haven't done a nice integration with enumerator and friends. IO is filed under Internal because it's low-level and most users won't want it. The other Internal modules are re-exported by Annotated , Tree and Extended , so you won't need to import them directly. Credits to Iavor Diatchki and the xml (XML.Light) package for Proc and Cursor . Thanks to the many contributors. ChangeLog: 0.15 changes intended to fix a (rare) "error: a C finalizer called back into Haskell." that seemed only to happen only on ghc6.12.X; 0.15.1 Fix broken Annotated parse; 0.16 switch from mtl to transformers; 0.17 fix mapNodeContainer & rename some things.; 0.18 rename defaultEncoding to overrideEncoding. 0.18.3 formatG and indent were demanding list items more than once (inefficient in chunked processing); 0.19 add Extended.hs; 0.19.1 fix a memory leak introduced in 0.19, delegate parsing to bound thread if unbound (see note above); 0.19.2 include expat source code so 'cabal install' just works on Linux, Mac and Windows (thanks Jacob Stanley); 0.19.3 fix misconfiguration of expat which broke entity parsing; 0.19.4 bump version constraint for text; 0.19.5 bump text to < 0.12 and fix text-0.10.0.1 breakage; 0.19.6 dependency breakage with List; 0.19.7 ghc-7.2.1 compatibility; 0.19.8 fix space leak on lazy parse under ghc-7.2.1; 0.19.9 fix formatting of > character + improve performance; 0.19.10 ghc-7.4.x compatibility; 0.20.1 fix an unfortunate crash when used in parallel processing and greatly improve performance; 0.20.2 make parseSaxG lazier.
Fixed-length lists and low-dimensional linear algebra.
Vectors are represented by lists with type-encoded lengths. The constructor is :. , which acts like a cons both at the value and type levels, with () taking the place of nil. So x:.y:.z:.() is a 3d vector. The library provides a set of common list-like functions (map, fold, etc) for working with vectors. Built up from these functions are a small but useful set of linear algebra operations: matrix multiplication, determinants, solving linear systems, inverting matrices.