https://wiki.haskell.org/api.php?action=feedcontributions&user=AntonioRG&feedformat=atomHaskellWiki - User contributions [en]2021-06-22T08:14:06ZUser contributionsMediaWiki 1.27.4https://wiki.haskell.org/index.php?title=Applications_and_libraries/Compiler_tools&diff=20747Applications and libraries/Compiler tools2008-05-01T11:38:03Z<p>AntonioRG: link to hatchet</p>
<hr />
<div>== Applications ==<br />
<br />
;[http://www.haskell.org/happy/ Happy]<br />
:[[Happy]] is a parser generator system for Haskell, similar to the tool `yacc' for C. Like `yacc', it takes a file containing an annotated BNF specification of a grammar and produces a Haskell module containing a parser for the grammar.<br />
<br />
;[[Frown]]<br />
:Frown is an LALR(k) parser generator for Haskell 98 written in Haskell 98.<br />
<br />
;[http://www.ki.informatik.uni-frankfurt.de/~klose/lucky.html Lucky]<br />
:A parser generator for Haskell using monadic parser combinators. It was developed to be compatible with Happy.<br />
<br />
;[http://www.cs.york.ac.uk/fp/cpphs/ cpphs]<br />
:cpphs is a liberalised re-implementation of cpp, the C pre-processor, in Haskell.<br />
<br />
== Libraries ==<br />
<br />
=== Compiler construction ===<br />
;[[GHC/As_a_library|GHC API]]<br />
:The GHC API is a library that exports much functionality from the [[GHC|Glasgow Haskell Compiler]].<br />
<br />
;[[Yhc/API| YHC API]]<br />
:The YHC API is a library that exports much functionality from the [[Yhc|York Haskell Compiler]].<br />
<br />
;[http://www.cse.unsw.edu.au/~chak/haskell/ctk/ Manuel Chakravarty's Compiler Toolkit]<br />
:There is a significant set of functionality that is required in each compiler like symbol table management, input-output operations, error management, and so on, which are good candidates for code reuse. The Compiler Toolkit is an attempt to provide an open collection of modules for these recurring tasks in Haskell.<br />
<br />
;[http://www.cs.chalmers.se/~markus/BNFC The BNF Converter]<br />
:A High-Level Tool for Implementing Well-Behaved Programming Languages.<br />
<br />
;[http://www.cwi.nl/projects/MetaEnv/haterm/ ATerm Library]<br />
:ATerms provide a generic format for representation and exchange of (annotated) terms. ATerms were developed in the context of the ASF+SDF Meta-Environment. They are also used by the rewriting language Stratego, by the transformation tool bundle XT, by the visitor generator JJForester, and by numerous other tools developed at CWI, Universiteit Utrecht, and elsewhere.<br />
<br />
;Attribute Grammar<br />
:How can attribute grammars help at the separation of concerns, at things related to the goals of aspect oriented programming? How do they relate to other concepts like monads and arrows? Why are they important for the functional programmer? See Wouter Swierstra's [http://www.haskell.org/tmrwiki/WhyAttributeGrammarsMatter WhyAttributeGrammarsMatter]. Utrecht University's [http://www.cs.uu.nl/wiki/HUT/AttributeGrammarSystem Attribute Grammar System] tools include also an attribute grammar compiler, UUAGC. The concept of attribute grammar was used in their [http://www.cs.uu.nl/wiki/Ehc/WebHome Essential Haskell Compiler] project, which gives us not only a working programming language, but also a good didactical material about using attribute grammars, e.g. in writing compilers.<br />
<br />
=== Type checkers ===<br />
<br />
;[http://www.cse.ogi.edu/~mpj/thih/ Typing Haskell in Haskell]<br />
:A Haskell program that implements a Haskell typechecker, thus providing a mathematically rigorous specification in a notation that is familiar to Haskell users.<br />
<br />
;[http://www.cs.mu.oz.au/~bjpop/code.html Hatchet]<br />
:Hatchet is a type checking and inference tool for Haskell 98, written in (almost) Haskell 98.<br />
<br />
;[http://www.cs.uu.nl/wiki/Ehc/WebHome Ruler]<br />
:The purpose of the Ruler system is to describe type rules in such a way that a partial Attribute Grammar implementation, and a pretty printed LaTeX can be generated from a description of type rules<br />
<br />
;[http://eecs.oregonstate.edu/~erwig/HaskellRules/ Haskell Rules: Embedding Rule Systems in Haskell]<br />
:Haskell Rules is a domain-specific embedded language that allows semantic rules to be expressed as Haskell functions. This DSEL provides logical variables, unification, substitution, non-determinism, and backtracking. It also allows Haskell functions to be lifted to operate on logical variables. These functions are automatically delayed so that the substitutions can be applied. The rule DSEL allows various kinds of logical embedding, for example, including logical variables within a data structure or wrapping a data structure with a logical wrapper.<br />
<br />
=== Regular expressions ===<br />
<br />
There are many libraries for regular expressions available. By default<br />
GHC comes with:<br />
<br />
;[http://darcs.haskell.org/packages/regex-compat/ regex-compat]<br />
<br />
;[http://darcs.haskell.org/packages/regex-posix/ regex-posix]<br />
<br />
Providing String and ByteString interfaces to C's regex.h.<br />
<br />
Additional libraries are available for more efficient regular expression<br />
implementations:<br />
<br />
;[http://darcs.haskell.org/packages/regex-pcre/ regex-pcre: Perl pcre]<br />
:PCRE-based regexes<br />
<br />
;[http://darcs.haskell.org/packages/regex-tre/ regex-tre: TRE]<br />
:TRE-based regexes<br />
<br />
;[http://darcs.haskell.org/packages/regex-parsec/ regex-parsec]<br />
:Pure Haskell parsec regexes<br />
<br />
;[http://darcs.haskell.org/packages/regex-dfa/ regex-dfa]<br />
:Pure Haskell DFA for regexes<br />
<br />
;[http://www.di.uminho.pt/~jas/Research/HaLeX/HaLeX.html HaLex]<br />
:NDFA and DFA library and tool<br />
<br />
Other libraries include:<br />
<br />
;[http://www.haskell.org/ghc/docs/latest/html/libraries/base/Text-Regex-Posix.html Text.Regex.Posix]<br />
:Interface to the POSIX regular expression library.<br />
<br />
;[http://sourceforge.net/projects/lazy-regex Text.Regex.Lazy]<br />
:This is an alternative to Text.Regex along with some enhancements. GHC's Text.Regex marshals the data back and forth to c-arrays to call libc and this is far too slow (and strict). This module understands regular expression Strings via a Parsec parser and creates an internal data structure (Text.Regex.Lazy.Pattern). This is then transformed into a Parsec parser to process the input String, or into a DFA table for matching against the input String or FastPackedString. The input string is consumed lazily, so it may be an arbitrarily long or infinite source.<br />
<br />
;[http://www.dcs.gla.ac.uk/~meurig/regexp/ Regular expression library]<br />
:Inspired by the Perl regular expression library, written purely in Haskell.<br />
<br />
;[http://repetae.net/john/computer/haskell/JRegex/ JRegex]<br />
:A library that interfaces to both PCRE and Posix regular expressions.<br />
<br />
;[http://www.cs.chalmers.se/~d00nibro/harp/ Haskell Regular Patterns]<br />
:HaRP is a Haskell extension that extends the normal pattern matching facility with the power of regular expressions. Regular expression patterns in HaRP work over ordinary Haskell lists ([]) of arbitrary type. HaRP is as a pre-processor to ordinary Haskell.<br />
<br />
=== Lexers and parsers ===<br />
<br />
;[http://www.cs.ruu.nl/~daan/parsec.html Parsec]<br />
:A simple, well documented monadic parser combinator library for fast parsers with good error messages.<br />
<br />
;[http://www.cs.chalmers.se/Cs/Grundutb/Kurser/afp/code/week3/Parsek.hs Parsek]<br />
:An implementation of [http://www.cs.chalmers.se/~koen/pubs/entry-jfp04-parser.html parallel parsing processes], providing the same API as Parsec<br />
<br />
;[http://www.haskell.org/happy/ Happy]<br />
:[[Happy]] is a parser generator system for Haskell, similar to the tool `yacc' for C. Like `yacc', it takes a file containing an annotated BNF specification of a grammar and produces a Haskell module containing a parser for the grammar.<br />
<br />
;[http://www.informatik.uni-bonn.de/~ralf/frown/ Frown]<br />
:Frown is an LALR(k) parser generator for Haskell 98 written in Haskell 98.<br />
<br />
;[http://www.ki.informatik.uni-frankfurt.de/~klose/lucky.html Lucky]<br />
:A parser generator for Haskell using monadic parser combinators. It was developed to be compatible with Happy.<br />
<br />
;[http://www.cs.uu.nl/wiki/HUT/ParserCombinators Utrecht Parser Combinator Library]<br />
:The combinators in this library analyse the grammar on the fly and build parsers that are quite efficient. An interesting aspect is that parsing results become available on the fly without hanging on to the input. The parsers will give extensive error reports of erroneous situations, and wil proceed with parsing. <br />
<br />
;[http://pdos.csail.mit.edu/~baford/packrat/ The Packrat Parsing and Parsing Expression Grammars Page]<br />
:Written by [http://www.brynosaurus.com/ Bryan Ford] parsing expression grammars (PEGs), an alternative to context free grammars for formally specifying syntax, and packrat parsers, or linear-time memoizing parsers for PEGs. Also a packrat parser generator in Haskell that generates Haskell parsers.<br />
<br />
;[http://www.cse.unsw.edu.au/~chak/haskell/ctk/ CTKlight]<br />
:Standalone distribution of the self-optimising lexer (i.e. regex) and parser combinators of the Compiler Toolkit (CTK).<br />
<br />
;[http://www.haskell.org/alex/ Alex: A Lexical Analyser Generator]<br />
:[[Alex]] 2.0 is a Lex-like package for generating Haskell scanners.<br />
<br />
;[http://www.nondot.org/sabre/Projects/HaskellLexer/ The Haskell Dynamic Lexer Engine]<br />
:This system is completely dynamic: the lexer may be modified at runtime, and string buffers may be lexed by different lexers at different times.<br />
<br />
;[http://asdl.sourceforge.net/ The Zephyr Abstract Syntax Description Lanuguage (ASDL)]<br />
:ASDL is a language designed to describe the tree-like data structures in compilers. Its main goal is to provide a method for compiler components written in different languages to interoperate. ASDL makes it easier for applications written in a variety of programming languages to communicate complex recursive data structures. asdlGen is a tool that takes ASDL descriptions and produces implementations of those descriptions in C, C++, Java, Standard ML, and Haskell.<br />
<br />
;[http://www.pms.informatik.uni-muenchen.de/mitarbeiter/panne/haskell_libs/hsparser.html HParser] {{dead link}}<br />
:A parser for Haskell written purely in Haskell (using the Happy parser generator).<br />
<br />
;[http://www.cs.chalmers.se/~d00nibro/haskell-src-exts/ HSX]<br />
:Haskell-Source with eXtensions (HSX) is an extension of the standard haskell-src package, and handles most common syntactic extensions to Haskell.<br />
<br />
;[http://hackage.haskell.org/cgi-bin/hackage-scripts/package/haskell-src-exts HSE]<br />
:Haskell-Source with Extensions (HSE, haskell-src-exts) is an extension of the standard haskell-src package. To fetch it from the Darcs repository:<br />
::darcs get http://code.haskell.org/HSP/haskell-src-exts<br />
<br />
;[http://wiki.di.uminho.pt/wiki/bin/view/PURe/HaGLR HaGLR]<br />
:HaGLR provides support for Generalized LR parsing in Haskell.<br />
<br />
;[[Polyparse]]<br />
:A collection of alternative parser combinator libraries.<br />
<br />
;[http://uebb.cs.tu-berlin.de/~magr/projects/piggybackGHC/doc/ piggybackGHC]<br />
:This package provides simple wrapper modules for the [[GHC/As_a_library|GHC API]] for lexing and parsing Haskell modules.<br />
<br />
=== Pretty printing ===<br />
<br />
;[http://www.cs.uu.nl/wiki/HUT/PrettyPrintingCombinators uulib]<br />
:Utrecht's sophisticated parsing and pretty printing combinator library. The combinators in the pretty-printing library are optimal in the sense that they produce the layout with the smallest height possible within a given width. Special combinators allow the sepcification of alternative layouts<br />
<br />
;[http://www.haskell.org/ghc/docs/latest/html/libraries/base/Text-PrettyPrint.html Text.PrettyPrint]<br />
: Pretty-printing module included in the standard libraries.<br />
<br />
;[http://research.microsoft.com/~simonpj/downloads/pretty-printer/pretty.html Pretty printer library]<br />
:Simon Peyton Jones made an "industrial strength" pretty printing library in Haskell, based on John Hughes's paper "The Design of a Pretty-printing Library" (in Advanced Functional Programming, Johan Jeuring and Erik Meijer (eds), LNCS 925). [http://www.md.chalmers.se/~rjmh/Software/NewPP.hs Original version by John Hughes].<br />
<br />
;[http://www.cs.uu.nl/~daan/pprint.html PPrint]<br />
:PPrint is an implementation of the pretty printing combinators described by Philip Wadler. The PPrint library adds new primitives to describe commonly occuring layouts and works well in practice.<br />
<br />
;[http://repetae.net/john/recent/out/Doc.html Doc]<br />
:A Pretty printing class using multiparameter type classes for maximal generality with some useful instances.<br />
<br />
;[http://sophos.berkeley.edu/macfarlane/pandoc/ PanDoc]<br />
:Library for converting from one markup format to another, and a command-line tool that uses this library. It can read markdown and (subsets of) reStructuredText, HTML, and LaTeX, and it can write markdown, reStructuredText, HTML, LaTeX, RTF, DocBook XML, and S5 HTML slide shows. Pandocâ€™s version of markdown contains some enhancements, like footnotes and embedded LaTeX. <br />
<br />
=== Term rewriting ===<br />
<br />
;[http://www.dsic.upv.es/~slucas/csr/termination/muterm MU-TERM]<br />
:A tool for proving termination of rewriting with replacement restrictions<br />
<br />
;[http://www.dsic.upv.es/users/elp/ondemandOBJ OnDemandOBJ]<br />
:A Laboratory for Strategy Annotations<br />
<br />
<br />
== Hackage ==<br />
<br />
* [http://hackage.haskell.org/packages/archive/pkg-list.html#cat:Parsing Parsing libraries on Hackage]<br />
* [http://hackage.haskell.org/packages/archive/pkg-list.html#cat:Text Regex libs on Hackage]<br />
<br />
{{LibrariesPage}}</div>AntonioRGhttps://wiki.haskell.org/index.php?title=Applications_and_libraries/Data_structures&diff=20676Applications and libraries/Data structures2008-04-24T12:12:12Z<p>AntonioRG: broken link</p>
<hr />
<div>{{unknown copyright}}<br />
{{LibrariesPage}}<br />
<br />
==General libraries and tools for data structures==<br />
<br />
;[http://www.eecs.tufts.edu/~rdocki01/edison.html Edison]<br />
:This is the latest version of the Edison library of efficient data structures. There are also [http://www.haskell.org/ghc/docs/edison/ earlier version of Edison] by Chris Okasaki. It provides sequences, finite maps, priority queues, and sets/bags. ([http://www.eecs.usma.edu/Personnel/okasaki/pubs.html#hw00 overview paper]).<br />
<br />
;[[Library/New collections]]<br />
:This is a package of many useful collections types. Advantages include:<br />
:*Easy to migrate from standard Lists/Sets/Maps to the new package. The package is an evolution (rather than a revolution) of the collections currenty in base package.<br />
:*Each collection type fits in a consistent framework (thanks to classes)<br />
:*An extensive QuickCheck test suite also serves as detailed specification for the collections.<br />
<br />
:This package includes and superseeds the following libraries:<br />
<br />
:;[http://homepages.nildram.co.uk/~ahey/HLibs/Data.Tree.AVL/ Data.Tree.AVL]<br />
::An implementation of AVL trees and related utilities.<br />
<br />
:;[http://homepages.nildram.co.uk/~ahey/HLibs/Data.StringMap/ Data.StringMap]<br />
::A library providing maps from String keys to values, based on Tries.<br />
<br />
:This package includes the lollowing libraries, but they are mainained separately:<br />
<br />
:;[http://sourceforge.net/projects/ranged-sets/ Ranged Sets]<br />
::A ranged set is a list of non-overlapping ranges. The ranges have upper and lower boundaries, and a boundary divides the base type into values above and below. No value can ever sit on a boundary. So you can have the set {2.0 < x <= 3.0, 5.3 < x < 6}<br />
<br />
;[http://www.cs.vu.nl/Strafunski/ Strafunski]<br />
:A bundle for generic programming. It provides programming support for generic traversal as useful in the implementation of program transformations.<br />
<br />
;[http://www.lochan.org/2005/keith-cl/libs/ Partial v0.1]<br />
:The Partial library provides a partial order class. It also provides routines for generating a Hasse diagram from a set and a partial order. Renderers are provided for the abstract Hasse diagram representation into LaTeX (via Xy-pic) and into dot, the format for AT&amp;T's Graphviz tools. Since no horizontal sorting is done, the Xy-pic output is rather poor at present; dot does a much better job with its layout optimisation algorithm.<br />
<br />
;[http://web.engr.oregonstate.edu/~erwig/diet/ Discrete Interval Encoding Trees]<br />
:The discrete interval encoding tree is a structure for storing subsets of types having a total order and a predecessor and a successor function.<br />
<br />
;[http://www.cwi.nl/~ralf/HList/ HList]<br />
:A heterogeneous collection is a datatype that is capable of storing data of different types, while providing operations for look-up, update, iteration, and others. There are various kinds of heterogeneous collections, differing in representation, invariants, and access operations.<br />
<br />
;[http://www.csee.ogi.edu/~diatchki/monadLib monadLib]<br />
:Iavor Diatchki's library of monad transformers for Haskell. It enables the quick construction of monads --- abstract data types that capture common programming idioms, such as throwing and catching exceptions or continuations. In many programming languages such features are built into the language (if they're provided at all), but in Haskell they are user-programmable.<br />
<br />
;[http://wiki.di.uminho.pt/wiki/bin/view/Alcino/PointlessHaskell Pointless Haskell]<br />
:Pointless Haskell is library for [[pointfree|point-free]] programming with recursion patterns defined as hylomorphisms. It also allows the visualization of the intermediate data structure of the hylomorphisms with GHood. This feature together with the DrHylo tool allows us to easily visualize recursion trees of Haskell functions.<br />
<br />
;[http://www.informatik.uni-freiburg.de/~wehr/haskell/ rhaskell : Reactive Objects]<br />
:Stefan Wehr's reactive objects library. Reactive objects are a convenient abstraction for writing programs which have to interact with a concurrent environment. A reactive object has two characteristics: the abandonment of all blocking operations and the unification of the concepts state and process. The former allows a reactive object to accept input from multiple sources without imposing any ordering on the input events. The latter prevents race conditions because the state of an object is only manipulated from the process belonging to the object.<br />
<br />
;[http://repetae.net/john/recent/out/GenUtil.html GenUtil]<br />
:A collection of random useful utility functions written in pure Haskell 98. In general, it trys to conform to the naming scheme put forth the Haskell prelude and fill in the obvious omissions, as well as provide useful routines in general.<br />
<br />
;[http://www.cs.uu.nl/~afie/pd09122004.zip PersistentDocument] ''The link is dead, somebody please either update it or remove it.''<br />
:The persistent document abstraction takes care of dealing with a document you want to open from and save to disk and that supports undo. This functionality can be used by editors of arbitrary documents and saves you a lot of quite subtle coding.<br />
<br />
;[[Zipper monad]]<br />
:A generic monad for navigating around arbitrary data structures<br />
<br />
==Graphs==<br />
<br />
;[http://web.engr.oregonstate.edu/~erwig/fgl/haskell/ FGL - A Functional Graph Library]<br />
:The functional graph library provides a collection of graph operations.<br />
<br />
;[http://wiki.di.uminho.pt/wiki/bin/view/PURe/PUReSoftware Data.Relation]<br />
:Part of the UMinho Haskell libraries, this library provides a representation and operations on relations. A special case of relations are graphs. The operations include graph chopping and slicing, strong connected component analysis, graphs metrics, and more.<br />
<br />
;[http://article.gmane.org/gmane.comp.lang.haskell.libraries/4739 Haskell Graph Automorphism Library]<br />
:Jean-Philippe Bernardy's implementation of Brendan McKay's algorithm for graph canonic labeling and automorphism group (Nauty).<br />
<br />
==IO==<br />
<br />
;[[Library/Streams | Streams]]<br />
:Streams is a feature-rich, flexible, extensible, backward-compatible and fast I/O library. It supports various stream types: files and legacy Handle type, string and memory buffers, pipes. There is also common functionality, available for any stream: buffering, Char encoding, locking.<br />
<br />
;[[Binary IO]]<br />
<br />
==Mutable data==<br />
<br />
;[http://www.isi.edu/~hdaume/STPP/ The Haskell STate Preprocessor]<br />
:This is a short preprocessor for stateful Haskell programs. It aleviates the pain of performing single array lookup/write/update functions with some syntax to support it. It also supports hash table operations based on the HashTable implementation available from the author. Finally, it supports monadic if and monadic case constructions. It is lightweight in the sense that it performs no syntactic analysis and is essentially a character transformer.<br />
<br />
;[[Library/ArrayRef | Arrays & References Library]]<br />
:Featuring:<br />
* Unboxed references in IO and ST monads<br />
* Monad-independent interfaces to boxed and unboxed references<br />
* Syntax sugar to make using of mutable objects easier (=:, +=, -=,..)<br />
* Reimplemented Arrays library with the following improvements:<br />
* Unboxed arrays now can be used in polymorphic functions<br />
* The MArray class now supports arrays with dynamic bounds<br />
* Implementation of dynamic (resizable) arrays<br />
<br />
See also [[Modern array libraries]]<br />
<br />
==Lists==<br />
<br />
;[http://code.google.com/p/slist/ SList] ''(broken link)''<br />
:Sized lists for Haskell<br />
<br />
;[http://www.cse.unsw.edu.au/~dons/dlist.html dlist]<br />
:Difference lists (supporting O(1) append and snoc)<br />
<br />
==Strings==<br />
<br />
;[http://www.cse.unsw.edu.au/~dons/fps.html Data.ByteString]<br />
:The FPS library provides mmapped and malloc'd packed strings (byte arrays held by a ForeignPtr), along with a list interface to these strings. It lets you do extremely fast I/O in Haskell; in some cases, even faster than typical C implementations, as well as conserving space.<br />
<br />
;[http://software.complete.org/missingh/ MissingH]<br />
:MissingH is a library of pure-Haskell utility functions relating to strings, logging, and I/O.<br />
<br />
;[http://repetae.net/john/recent/out/HsLocale.html HsLocale]<br />
:A locale-aware replacement for the standard IO routines, and support for ''wide'' strings<br />
<br />
;[http://www.cse.unsw.edu.au/~dons/code/icfp05/tests/unit-tests/VariableExpansion.hs VariableExpansion]<br />
:A library for variable expansion inside strings<br />
<br />
;[http://haskell-i18n.cvs.sourceforge.net/haskell-i18n/ i18n strings]<br />
:At sourceforge<br />
<br />
==Regular expressions==<br />
<br />
There are many libraries for regular expressions available. By default<br />
GHC comes with:<br />
<br />
;[http://darcs.haskell.org/packages/regex-base/ regex-base]<br />
:This defines the type classes for the new API<br />
<br />
;[http://darcs.haskell.org/packages/regex-compat/ regex-compat]<br />
:This defines the old Text.Regex.Posix API, using regex-posix<br />
<br />
;[http://darcs.haskell.org/packages/regex-posix/ regex-posix]<br />
:This is the interface to the old (and slow) posix backend (C's regex.h)<br />
<br />
All backends provide String and ByteString interfaces.<br />
<br />
Additional backend libraries are available for (hopefully) more efficient regular expression<br />
implementations:<br />
<br />
;[http://darcs.haskell.org/packages/regex-pcre/ regex-pcre]<br />
:PCRE-based regexes. This requires [http://www.pcre.org/ libpcre] (currently works against version 6.6.0 as of January 2007). This Haskell library and libpcre are both BSD. This is very fast but has left branch semantics instead of POSIX leftmost longest semantics.<br />
<br />
;[http://darcs.haskell.org/packages/regex-tre/ regex-tre]<br />
:TRE-based regexes. This requires [http://laurikari.net/tre/ libtre] (currently works against version 0.7.5 as of January 2007). Libtre aims to be POSIX compatible and is a much faster implementation that used by regex-posix. Note that libtre does have an [http://laurikari.net/pipermail/tre-general/2007-January/000083.html outstanding bug] in correctly interpreting some regular expressions. This Haskell package is BSD-3 licensed and libtre is LGPL.<br />
<br />
;[http://darcs.haskell.org/packages/regex-parsec/ regex-parsec]<br />
:Pure Haskell regexes implemented via parsec. The leftmost longest subexpression capture semantics of this library differ from the POSIX standard. This also has an option to prefer the left branch semantics that libpcre uses.<br />
<br />
;[http://darcs.haskell.org/packages/regex-dfa/ regex-dfa]<br />
:Pure Haskell DFA for regexes. This is licensed under LPGL (the above packages are all under BSD-3) due to derived code. This is faster than regex-parsec but does not return captured subexpressions. It also is being updated to handle repeated patterns that can match empty strings (the older version hangs, the new version rewrites the pattern internally).<br />
<br />
;There is a regex-tdfa packages in development (not released) that will be a pure Haskell and BSD-3 licensed implementation inspired by libtre. It aims to be a replacement for regex-posix.<br />
<br />
;Development versions (possible unstable or broken) of the above packages are also available under [http://darcs.haskell.org/packages/regex-unstable/ regex-unstable]. For support, please use the [[Mailing_lists | haskell-cafe]] mailing list.<br />
<br />
==Serialising data==<br />
<br />
;[http://www.cse.unsw.edu.au/~dons/binary/Data-Binary.html Data.Binary] ([http://darcs.haskell.org/binary/ darcs repository])<br />
;A library for serialising binary values to and from lazy ByteStrings.<br />
<br />
;[http://www.n-heptane.com/nhlab/repos/NewBinary NewBinary]<br />
:A port of Malcolm Wallace's Binary library from NHC, offering facilities for heap compression and binary I/O. The de-facto standard for binary I/O in Haskell<br />
<br />
;[http://www.cs.helsinki.fi/u/ekarttun/SerTH/ SerTH]<br />
:SerTH is a binary serialization library for Haskell. It supports serializing cyclic datatypes in a fast binary format. SerTH uses template haskell for deriving the serializing interface for new datatypes.<br />
<br />
;[[Library/AltBinary | AltBinary]]<br />
: AltBinary is an exhaustive library that support binary I/O and serialization. It's part of [http://haskell.org/haskellwiki/Library/Streams Streams] library, so serialization is possible to any I/O source, from String to memory-mapped file. It's also backward compatible with [http://www.n-heptane.com/nhlab/repos/NewBinary NewBinary] library what makes translation of old code trivial. Very fast, very feature-rich, Hugs/GHC compatible, etc, etc...<br />
<br />
;[http://svn.openfoundry.org/pugs/third-party/HsSyck/ HsSyck]<br />
:YAML is a straightforward machine parsable data serialization format designed for human readability and interaction with dynamic languages. It is optimized for data serialization, configuration settings, log files, Internet messaging and filtering. Syck is an extension, written in C, for reading and writing YAML swiftly in popular scripting languages. It is part of core Ruby, and also has bindings for Perl 5, Python, Lua, Cocoa, and Perl 6. HsSyck provides Data.Yaml.Syck as an interface to YAML structures, using Data.ByteString for efficient textual data representation. Additionally, we provide a set of DrIFT rules to dump and load arbitrary Haskell data types in the YAML format.<br />
<br />
;[[GenericSerialize]]<br />
:GenericSerialize is a library which serializes data using the "Scrap Your Boilerplate" infrastructure. This means that while it cannot easily support data-structure-specific serialization, it can support many different data formats cheaply.<br />
<br />
==Compressing data==<br />
<br />
;[[Library/Compression | Compressions-2005]]<br />
:Features of the Compression-2005 Library ([http://freearc.narod.ru/ homepage])<br />
* easy and uniform access to most competitive free compression algorithms as of April'05: LZMA, PPMd and GRZip<br />
* all input/output performed via user-supplied functions (callbacks), so you can compress data in memory, files, pipes, sockets and anything else<br />
* all parameters of compression algorithm are defined with a single string, for example "lzma:8mb:fast:hc4:fb32". <br />
* Using this library, you can write a bzip-like utility in one line, with better compression results than bzip2 itself.<br />
<br />
;[http://hackage.haskell.org/cgi-bin/hackage-scripts/package/zlib Zlib]<br />
:Zlib bindings for ByteStrings. darcs get http://code.haskell.org/zlib/ ([http://hackage.haskell.org/cgi-bin/hackage-scripts/package/zlib docs])<br />
<br />
;[http://hackage.haskell.org/cgi-bin/hackage-scripts/package/bzlib BZip2]<br />
:BZip2 bindings for ByteStrings. darcs get http://code.haskell.org/bzlib/ ([http://hackage.haskell.org/cgi-bin/hackage-scripts/package/bzlib docs])<br />
<br />
==Benchmarking data structures==<br />
<br />
;[http://www.cs.york.ac.uk/fp/auburn/ Auburn]<br />
:Auburn is Graeme Moss's kit for benchmarking implementations of lazy data structures. Give it several implementations of an ADT (abstract data type) and it will tell you which one is best for your particular application.<br />
<br />
;[http://www.cse.unsw.edu.au/~dons/code/fps/tests/Bench.hs Bench]<br />
:Simple time and space benchmarking for various list-like data structures. Easily adapted to arbitrary structures<br />
<br />
==Generic traversals==<br />
<br />
;[http://eecs.oregonstate.edu/~erwig/reclib/ RecLib A Recursion and Traversal Library for Haskell]<br />
:The Recursion Library for Haskell provides a rich set of generic traversal strategies to facilitate the flexible specification of generic term traversals. The underlying mechanism is the Scrap Your Boilerplate (SYB) approach. Most of the strategies that are used to implement recursion operators are taken from Stratego.<br />
<br />
==Typesafe variants of <hask>IntSet</hask> and <hask>IntMap</hask> for enumerations==<br />
<br />
* ChrisKuklewicz wrote a bit of boilerplate to re-use IntSet and IntMap with any Enum type: [[EnumSet EnumMap]]<br />
* an efficient implementation of EnumSet for sets which fit into a machine word can be found in [http://www.eecs.tufts.edu/~rdocki01/docs/edison/Data-Edison-Coll-EnumSet.html Edison] (see above)<br />
<br />
==Hackage==<br />
<br />
* [http://hackage.haskell.org/packages/archive/pkg-list.html#cat:Data%20Structures Data structures on Hackage]<br />
* [http://hackage.haskell.org/packages/archive/pkg-list.html#cat:Data More data structures on Hackage]<br />
* [http://hackage.haskell.org/packages/archive/pkg-list.html#cat:Generics Generics on Hackage]</div>AntonioRGhttps://wiki.haskell.org/index.php?title=Applications_and_libraries/Editors&diff=20343Applications and libraries/Editors2008-03-30T10:15:41Z<p>AntonioRG: </p>
<hr />
<div>== Applications ==<br />
<br />
* [[Yi]] is a text editor written and extensible in Haskell. It has an own [[Yi|Haskell wiki]] page, too. The goal of the Yi project is to provide a flexible, powerful and correct editor core scriptable in Haskell. A principle of Yi is that any behaviour can be programmed, so there exist vi, vim, emacs, mg, nano, joe and ee frontends to Yi. Other editor interfaces can be written easily via a lexer specification.<br />
<br />
* [[Leksah]] is an IDE for Haskell written in Haskell. Leksah is intended as a practical tool to support the Haskell development process. It is an pre-release phase with bugs and open ends but actively developed and moving quickly. Hopefully, Leksah will already be interesting, useful and fun. Leksah uses GTK+ as GUI Toolkit with the gtk2hs binding. It is platform independent and should run on any platform where GTK+, gtk2hs and GHC can be installed. I have tested it on Windows and Linux. It only supports GHC.<br />
<br />
* [[hIDE]] is an IDE for Haskell, based around a dynamic plugin core, and utilising a sophisticated compiler interface to provide syntax colouring, type checking and more.<br />
<br />
* [http://www.cs.uu.nl/research/projects/proxima/ Proxima]<br />
<br />
== Libraries ==<br />
<br />
* [http://www2-data.informatik.unibw-muenchen.de/EdComb/index.html EdComb] -- Editor combinators allow to assemble structure editors compositionally instead of generating them from descriptions, just as parsing combinators allow to assemble parsers compositionally instead of employing parser generators to generate parsers from grammar descriptions. A fruitfully general approach to the concept of ''editor'' is presented. Therefore, these editor combinators can be used also e.g. as ''browser combinators'', with interesting new possibilities for browsers. ''(The link is broken, but a paper with the code of an old version can be downloaded from [http://www.unibw.de/rz/dokumente/getFILE?searchterm=edcomb&fid=636512 here].)<br />
<br />
* [http://leiffrenzel.de/eclipse/cohatoe/ Cohatoe] -- short for ''Contributing Haskell to Eclipse''. Eclipse is an open, extensible IDE platform, accepting plugins for extending functionality. Normally such plugins are written in Java. Cohatoe enables writing such plugins in Haskell.<br />
<br />
{{LibrariesPage}}</div>AntonioRGhttps://wiki.haskell.org/index.php?title=Applications_and_libraries/Editors&diff=20342Applications and libraries/Editors2008-03-30T10:13:54Z<p>AntonioRG: broken link</p>
<hr />
<div>== Applications ==<br />
<br />
* [[Yi]] is a text editor written and extensible in Haskell. It has an own [[Yi|Haskell wiki]] page, too. The goal of the Yi project is to provide a flexible, powerful and correct editor core scriptable in Haskell. A principle of Yi is that any behaviour can be programmed, so there exist vi, vim, emacs, mg, nano, joe and ee frontends to Yi. Other editor interfaces can be written easily via a lexer specification.<br />
<br />
* [[Leksah]] is an IDE for Haskell written in Haskell. Leksah is intended as a practical tool to support the Haskell development process. It is an pre-release phase with bugs and open ends but actively developed and moving quickly. Hopefully, Leksah will already be interesting, useful and fun. Leksah uses GTK+ as GUI Toolkit with the gtk2hs binding. It is platform independent and should run on any platform where GTK+, gtk2hs and GHC can be installed. I have tested it on Windows and Linux. It only supports GHC.<br />
<br />
* [[hIDE]] is an IDE for Haskell, based around a dynamic plugin core, and utilising a sophisticated compiler interface to provide syntax colouring, type checking and more.<br />
<br />
* [http://www.cs.uu.nl/research/projects/proxima/ Proxima]<br />
<br />
== Libraries ==<br />
<br />
* [http://www2-data.informatik.unibw-muenchen.de/EdComb/index.html EdComb] -- Editor combinators allow to assemble structure editors compositionally instead of generating them from descriptions, just as parsing combinators allow to assemble parsers compositionally instead of employing parser generators to generate parsers from grammar descriptions. A fruitfully general approach to the concept of ''editor'' is presented. Therefore, these editor combinators can be used also e.g. as ''browser combinators'', with interesting new possibilities for browsers. ''(The link is broken, but a paper with the code of an old version can be downloaded from [http://www.unibw.de/rz/dokumente/fakultaeten/getFILE?searchterm=edcomb&fid=636067%2F2000-01.html here].)<br />
<br />
* [http://leiffrenzel.de/eclipse/cohatoe/ Cohatoe] -- short for ''Contributing Haskell to Eclipse''. Eclipse is an open, extensible IDE platform, accepting plugins for extending functionality. Normally such plugins are written in Java. Cohatoe enables writing such plugins in Haskell.<br />
<br />
{{LibrariesPage}}</div>AntonioRG