Free monads are useful for many tree-like structures and domain specific languages.
A Monad n is a free Monad for f if every Monad homomorphism from n to another monad m is equivalent to a natural transformation from f to m.
Cofree comonads provide convenient ways to talk about branching streams and rose-trees, and can be used to annotate syntax trees.
A Comonad v is a cofree Comonad for f if every Comonad homomorphism another comonad w to v is equivalent to a natural transformation from w to f.
A free functor is a left adjoint to a forgetful functor. It used to be the case that the only category that was easy to work with in Haskell was Hask itself, so there were no interesting forgetful functors.
But the new ConstraintKinds feature of GHC provides an easy way of creating subcategories of Hask. That brings interesting opportunities for free (and cofree) functors.
The examples directory contains an implementation of non-empty lists as free semigroups, and automata as free actions. The standard example of free higher order functors is free monads, and this definition can be found in Data.Functor.HFree.
free-game is a library that abstracts graphical applications with simple interfaces. Twitter: #hs_free_game
The free-theorems library allows to automatically generate free theorems from Haskell type expressions. It supports nearly all Haskell 98 types except of type constructor classes, and in addition it can also handle higher-rank functions. Free theorems are generated for three different sublanguages of Haskell, a basic one corresponding to the polymorphic lambda-calculus of Girard-Reynolds, an extension of that allowing for recursion and errors, and finally a sublanguage additionally allowing seq. In the last two sublanguages, also inequational free theorems may be derived in addition to classical equational results.
This program is to verify (or to put into question) strictness conditions on free theorems that arise if a polymorphic lambda calculus is enriched by general recursion. Given a type the program either returns an instance of the corresponding unrestricted free theorem that does not hold and thereby verifies the need of the additional restrictions or it returns without finding such an instantiation and thereby suggests (but not proves) that the strictness conditions are superfluous. The underlying algorithm is described in "Automatically Generating Counterexamples to Naive Free Theorems" (FLOPS'10) by Daniel Seidel and Janis Voigtländer. A webinterface for the program is also available at http://www-ps.iai.uni-bonn.de/cgi-bin/exfind.cgi.
Related to this package you may be interested in the online free theorem generator at http://www-ps.iai.uni-bonn.de/ft that is also available offline via http://hackage.haskell.org/cgi-bin/hackage-scripts/package/free-theorems-webui. Also interesting may be the tool polyseq that generates "optimal" free theorems in a polymorphic lambda calculus with selective strictness. Polyseq can be downloaded at http://hackage.haskell.org/cgi-bin/hackage-scripts/package/polyseq but the functionality is as well provided via a webinterface at http://www-ps.iai.uni-bonn.de/cgi-bin/polyseq.cgi.
A soccer game.
Interface to the Kinect device. Currently supports depth perception. (No video or audio.)
This package provides a preprocessor executable, 'freesect', which implements a broad generalisation of sections (dubbed 'free sections') for partial application and higher-order style. Some examples of free sections can be found in the included test suite; refer to the homepage for more info.
Wrapper around FreeType 2 library. Relevant exerpts from the FreeType 2 website:
What is FreeType 2?
FreeType 2 is a software font engine that is designed to be small, efficient, highly customizable, and portable while capable of producing high-quality output (glyph images). It can be used in graphics libraries, display servers, font conversion tools, text image generation tools, and many other products as well.
The following is a non-exhaustive list of features provided by FreeType 2.
* FreeType 2 provides a simple and easy-to-use API to access font content in a uniform way, independently of the file format. Additionally, some format-specific APIs can be used to access special data in the font file.
* Unlike most comparable libraries, FreeType 2 supports scalable font formats like TrueType or Type 1 natively and can return the outline data (and control instructions/hints) to client applications.
By default, FreeType 2 supports the following font formats.
* TrueType fonts (and collections)
* Type 1 fonts
* CID-keyed Type 1 fonts
* CFF fonts
* OpenType fonts (both TrueType and CFF variants)
* SFNT-based bitmap fonts
* X11 PCF fonts
* Windows FNT fonts
* BDF fonts (including anti-aliased ones)
* PFR fonts
* Type 42 fonts (limited support)
From a given glyph outline, FreeType 2 is capable of producing a high-quality monochrome bitmap, or anti-aliased pixmap, using 256 levels of gray. This is much better than the 5 levels used by Windows 9x/98/NT/2000 or FreeType 1.
FreeType 2 supports all the character mappings defined by the TrueType and OpenType specification. It is also capable of automatically synthetizing a Unicode charmap from Type 1 fonts, which puts an end to the painful 'encoding translation' headache common with this format (of course, original encodings are also available in the case where you need them).
The FreeType 2 core API provides simple functions to access advanced information like glyph names or kerning data.
FreeType 2 provides information that is often not available from other similar font engines, like kerning distances, glyph names, vertical metrics, etc.
FreeType 2 provides its own caching subsystem since release 2.0.1. It can be used to cache either face instances or glyph images efficiently.
Based on the freetype-gl library, with large modifications.
This is similar to the FTGL (http://hackage.haskell.org/package/FTGL) library, but avoids C++, which makes it easier to wrap and work with in Haskell-land.
Unfortunately, it seems not to perform as well as FTGL on some setups.
NOTE: Most of the demos and C-side documentation are out-of-date, as the C side was heavily modified, without updating many of the demos or the C documentation.
This package provides datatypes to construct Free monads, Free monad transformers, and useful instances. In addition it provides the constructs to avoid quadratic complexity of left associative bind, as explained in:
* Janis Voigtlander, Asymptotic Improvement of Computations over Free Monads, MPC'08
Plus, OpT, Yoneda, CoYoneda, Free, Cofree, Density, Codensity, CoT, CodensityAsk, Initialize, Finalize, Decompose, Recompose
A free indexed monad
Michael and Scott queues are described in their PODC 1996 paper:
These are single-ended concurrent queues based on a singlly linked list and using atomic CAS instructions to swap the tail pointers. As a well-known efficient algorithm they became the basis for Java's ConcurrentLinkedQueue.
The pointfree tool is a standalone command-line version of the pl plugin for lambdabot.
Show more results