This is the tenth edition of the Haskell Communities and Activities Report (HCAR) – a collection of entries about everything that is going on and related to Haskell in some way that appears twice a year. Perhaps the release of the tenth edition is a good time to have a look back at the beginning.
At the Haskell Workshop 2001, during the traditional discussion on “The Future of Haskell”, Claus Reinke pointed out that it is very difficult to keep track of all the developments within the Haskell community: there are many people working on and with Haskell, they are located in very different places and are working on several different fields. He was asking for a collection of up-to-date information about releases of compilers, tools, and application, but also of ongoing work in a single place for everyone to look up.
Everyone agreed with Claus, but probably nothing would have happened if he himself had not volunteered to start the project. Already in November 2001, the first edition of the HCAR appeared. It had 20 contributors and the PostScript/PDF version consisted of 22 pages.
Four and a half years later, one can compare the current edition with the first and will notice that the basic structure has remained unchanged, but the size has nearly tripled (62 pages) and the number of contributors has almost reached a hundred (93 contributors). This demonstrates that the original concept was a good one, and that the HCAR is successful. I would therefore like to thank Claus for his work on the first five editions, Arthur van Leeuwen, the editor of the sixth edition, but most of all the countless contributors that have filled the report with content over the years. It is you that really make the report happen, and also a joy to work on, allowing me to read lots of interesting submissions while assembling the report.
I am very happy to see that the HCAR has quite some “competition” these days: the Haskell Weekly News (→1.4) gather Haskell-relevant information on a regular basis, the mailing lists are as active as they always are, the #haskell IRC channel (→1.3) is a direct contact to other people interested in Haskell and a reliable source of information about current work, the Haskell Sequence (→1.4.1) is a news portal for the Haskell world, the Haskell Planet (unfortunately without an entry) collects blogs by Haskellers, the Haskell Wiki has been integrated with the main haskell.org (→1.1) site, and I am sure I forgot a few other ways to get at information about Haskell communities and activities.
All the media mentioned above have different strengths and weaknesses, and therefore serve and reach different groups of people. It is good to see that there is so much communication in the Haskell world.
If you miss a project in this HCAR, then simply contribute to the next – either by writing an entry yourself, or by making the project leader aware of the HCAR! Please mark the final weeks of October in your calendar, because that is when the entries for the November edition will be collected.
As always, feedback is very welcome <hcar at haskell.org>. Now, I wish you pleasant reading!
Andres Löh, University of Bonn, Germany
HaskellWiki is a MediaWiki installation now running on haskell.org, including the haskell.org “front page”. Anyone can create an account and edit and create pages. Examples of content include:
We encourage people to create pages to describe and advertise their own Haskell projects, as well as add to and improve the existing content. All content is submitted and available under a “simple permissive” license (except for a few legacy pages).
In addition to HaskellWiki, the haskell.org website hosts some ordinary HTTP directories. The machine also hosts mailing lists. There is plenty of space and processing power for just about anything that people would want to do there: if you have an idea for which HaskellWiki is insufficient, contact the maintainers, John Peterson and Olaf Chitil, to get access to this machine.
Google started to fund students working on Open Source/Free Software projects during the last summer through the Summer of Code programme. It aims to help students entering the FOSS development world, providing guidance and money for the summer period ($4,500 for three months of work.)
A number of organizations which runs active FOSS projects take part to this programme. They are required to provide mentors for students and publish a list of projects of interest. (More details can be found here: http://haskell.org/pipermail/haskell/2006-April/017872.html.)
The official Google site publishes detailed informations and deadlines, and it is located at http://code.google.com/soc/.
haskell.org is officially a mentoring organization for this year’s programme. Many community members volunteered for the organising and mentoring roles needed, an updated list of them can be found on the trac site we set up:
(The site also contains the list of projects proposals from the organization.)The application period opened on May 1st, and ended on May 9th.
We got more than a hundred proposals from roughly 90 individual students!
Google has accepted nine of the proposals for funding – paid Haskell Open Source work for the summer:
The man in charge for the administrative work is Isaac Jones <ijones at syntaxpolice.org>.
http://code.google.com/soc/studentfaq.html
The #haskell IRC channel is a real-time text chat where anyone can join to discuss Haskell. #haskell averages about one hundred eighty users. Point your IRC client to irc.freenode.net and join the #haskell channel.
The #haskell.se channel is the same subject but discussion happens in Swedish. This channel tends to have a lot of members from Gothenburg.
There is also a #darcs channel – if you want real-time discussion about darcs (→6.6), drop by!
The Haskell Weekly News (HWN) is a weekly newsletter covering developments in Haskell. Content includes announcements of new projects, discussions from the various Haskell communities, notable project commit messages, and more.
It is published in html form on The Haskell Sequence (→1.4.1), via mail on the Haskell mailing list, and via RSS. Headlines are published on haskell.org (→1.1).
http://www.haskell.org/haskellwiki/Haskell_Weekly_News
The Haskell Sequence is a community-edited Haskell news and discussion site. Its main feature is a slashdot-like front page with stories and discussion about things going on in the Haskell community, polls, questions, or just observations. Submissions are voted on by the community before being posted on the front page, similar to Kuro5hin.
The Haskell Sequence also syndicates Haskell mailing list posts, Haskell-related blogs, and other RSS feeds in a single location. Free space for Haskell-related blogs, which require no voting before being posted, is also available to anyone.
The Haskell Sequence is available at http://sequence.complete.org.
There are plenty of academic papers about Haskell, and plenty of informative pages on the Haskell Wiki. But there’s not much between the two extremes. The Monad.Reader aims to fit in there; more formal than a Wiki page, but less formal than a journal article.
Want to write about a tool or application that deserves more attention? Have a cunning hack that makes coding more fun? Got that visionary idea people should know about? Write an article for The Monad.Reader!
See the TmrWiki for more information: http://www.haskell.org/tmrwiki/FrontPage.
“Hitchhickers Guide to Haskell” is a tutorial aimed to provide a “quick start into Haskell” for programmers with solid experience of other languages under their belt. Instead of “side by side” comparison between Haskell and another language of choice (like C or Java), the tutorial is built around case studies, which show how typical tasks are performed in Haskell.
This is work in progress, only 5 chapters have been written so far.
The tutorial is available on the Haskell wiki (URL below) or from the darcs repository at http://adept.linux.kiev.ua/repos/hhgtth.
Right now I am collecting ideas for subsequent chapters, so any feedback from readers is appreciated more than ever.
http://www.haskell.org/haskellwiki/Hitchhikers_guide_to_Haskell
The contract to publish the book with Cambridge University Press has recently been signed (including a clause about film rights, so expect “Haskell the Movie” in a couple of years :-)), and it is now entering the final production stage, with an estimated publication date in the last quarter of 2006. Further details, including a preview of the first five chapters and powerpoint lecture slides for all chapters, are available on the web from http://www.cs.nott.ac.uk/~gmh/book.html.
The Haskell Tutorial WikiBook has made considerable progress over the last six months. It has now reached the stage where a beginner to Haskell should find it useful, although much still remains to be done.
Much of the recent work has been done by Eric Kow (Kowey). Jeff Newburn also gave permission for his “All About Monads” tutorial to be imported. Thanks to these, and to all the other contributors.
Future work needs to focus on:
All contributions are welcome.
We have been quite busy on GHC during the last six months. Here are the highlights:
http://www.haskell.org//pipermail/glasgow-haskell-users/2006-February/009633.html
http://research.microsoft.com/~simonpj/papers/boxy Huge thanks to Stephanie Weirich and Dimitrios Vytiniotis for their work on this project.
http://haskell.galois.com/cgi-bin/haskell-prime/trac.cgi/wiki/BangPatterns
Help is welcome as usual, and will probably speed the release along!
http://research.microsoft.com/~simonpj/papers/ext-f
Kevin Donnelly is spending the summer at Microsoft as an intern, to implement FC in GHC.
We are planning to run a “GHC Hackathon” just before ICFP in Portland, in September 2006. We’ll give some tutorials on how GHC works inside, and then spend some time writing code together. If you are interested, keep an eye on GHC’s web site.
The May 2006 release of Hugs was the first for over three years to include a Windows distribution, thanks to Neil Mitchell, who has also contributed a new version of WinHugs, the Windows graphical interface to Hugs. Other major features, already seen in the Unix-only release, are support for the Cabal infrastructure (→4.1.1), Unicode support (contributed by Dmitry Golubovsky) and lots of up-to-date libraries.
Obsolete non-hierarchical libraries (hslibs and Hugs-specific libraries) have been removed from the default search path, and will disappear altogether in the next release.
The source distribution is available in two forms: a huge omnibus bundle containing the Hugs programs and lots of useful libraries, or a minimal bundle, with most of the libraries hived off as separate Cabal packages.
There is also a new bug tracking system and development wiki at http://hackage.haskell.org/trac/hugs.
As ever, volunteers are welcome.
nhc98 is a small, easy to install, compiler for Haskell’98. It is in stable maintenance-only mode – the current public release is version 1.18. Maintenance continues in CVS at haskell.org. Recent news is that Niklas (the original author of nhc13) has contributed a workaround for the hi-mem bug which was preventing the compiler from building on many recent Linux platforms. A new release incorporating this patch is expected soon.
The Yhc (→2.4) branch of nhc98 is also making good progress.
The York Haskell Compiler (yhc) is a backend rewrite of the nhc98 (→2.3) compiler to support features such as a platform independent bytecode and runtime system.
It is currently work in progress, it compiles and correctly runs almost every standard Haskell 98 program but FFI support is on going. Contributions are welcome.
http://www.cs.york.ac.uk/~ndm/yhc/
Our work on running Haskell on handheld devices based on Palm OS has taken a different direction since the last report. Instead of basing our port on nhc98 (→2.3) we are now using yhc (→2.4) as the basis. Overall everything is easier since yhc has a better separation of compiler and runtime system. We have also added a part-time programmer to this project so more progress is being made. An alpha version is close to working.
| Report by: | Keith Hanna |
| Status: | stable (latest release: April 2005) |
Vital is a highly interactive, visual environment that aims to present Haskell in a form suitable for use by engineers, mathematicians, analysts and other end users who often need a combination of the expressiveness and robustness that Haskell provides together with the ease of use of a ‘live’ graphical environment in which programs can be incrementally developed.
In Vital, Haskell modules are presented as ‘documents’ having a free-form layout and with expressions and their values displayed together. These values can be displayed either textually, or pictorially and can be manipulated by an end user by point-and-click mouse operations. The way that values of a given type are displayed and the set of editing operations defined on them (i.e., the ‘look and feel’ of the type) are defined using type classes. For example, an ADT representing directed graphs could be introduced, with its values displayed pictorially as actual directed graphs and with the end user provided with a menu of operations allowing edges to be added or removed, transitive closures to be computed, etc. (In fact, although an end user appears to be operating directly on values, it is actually the Haskell program itself that is updated by the system, using a specialised form of reflection.)
The present implementation includes a collection of interactive tutorial documents (including examples illustrating approaches to exact real arithmetic, pictorial manipulation of DNA and the genetic code, animated diagrams of mechanisms, and the composition and synthesis of MIDI music).
The Vital system can be run via the web: a single mouse-click is all that is needed!
| Report by: | Keith Hanna |
| Status: | active (first release: November 2005) |
Pivotal 0.025 is a very early prototype of a Vital-like environment (→3.1.2) for Haskell. Unlike Vital, however, Pivotal is implemented entirely in Haskell. The implementation is based on the use of the hs-plugins library (→4.4.1) to allow dynamic compilation and evaluation of Haskell expressions together with the gtk2hs library (→4.8.1) for implementing the GUI.
At present, the implementation is only in a skeletal state but, nevertheless, it provides some useful functionality. The Pivotal web site provides an overview of its principles of operation, a selection of screen shots (including a section illustrating image transforms in the complex plane), and a (very preliminary!) release of the Haskell code for the system.
A more extensive implementation (based on the use of the GHC API (→2.1) for reflection, in place of the hs-plugins (→4.4.1) mechanism) is planned as soon as the required hooks are available in GHC 6.6.
House is a platform for exploring various ideas relating to low-level and system-level programming in a high-level functional language, or in short for building operating systems in Haskell. House is based on hOp by Sébastien Carlier and Jérémy Bobbio.
Recent work includes
The House demo system is now implemented on top of the H monad. There is also work in progress on implementing an L4 compatible micro-kernel on top of H.
Further information, papers, source code, demos and screenshots are available here: http://www.cse.ogi.edu/~hallgren/House/
The Camila project explores how concepts from the VDM++ specification language and the functional programming language Haskell can be combined. On the one hand, it includes experiments of expressing VDM’s data types (e.g. maps, sets, sequences), data type invariants, pre- and post-conditions, and such within the Haskell language. On the other hand, it includes the translation of VDM specifications into Haskell programs. Moreover, the use of the OOHaskell library (→4.6.7) allows the definition of classes and objects and enables important features such as inheritance. In the near future, support for parallelism and automatic translation of VDM++ specifications into Haskell will be added to the libraries.
Currently, the project has produced first versions of the Camila Library, both distributed as part of the UMinho Haskell Libraries and Tools. The library resorts to Haskell’s constructor class mechanism, and its support for monads and monad transformers to model VDM’s datatype invariants, and pre- and post-conditions. It allows switching between different modes of evaluation (e.g. with or without property checking) by simply coercing user defined functions and operations to different specific types.
The web site of Camila (http://wiki.di.uminho.pt/wiki/bin/view/PURe/Camila) provides documentation. Both library and tool are distributed as part of the UMinho Haskell Libraries and Tools.
HASP is a fork of Niklas Broberg’s Haskell Server Pages. Changes includes:
Some of the features implemented in HASP will be ported back into the main HSP tree. However, experimental features like byte code generation via the GHC api will most likely stay in HASP.
http://darcs.haskell.org/~lemmih/hasp/
Data Parallel Haskell is the codename for an extension to the Glasgow Haskell Compiler and its libraries to support nested data parallelism with a focus to utilise multi-core CPUs and other SMP hardware. The project is still in its early stages. For more information and code see http://www.cse.unsw.edu.au/~chak/project/dph/.
| Report by: | Phil Trinder |
| Participants: | Phil Trinder, Abyd Al Zain, Greg Michaelson, Kevin Hammond, Yang Yang, Jost Berthold, Murray Gross |
A complete, GHC-based implementation of the parallel Haskell extension GpH and of evaluation strategies is available. Extensions of the runtime-system and language to improve performance and support new platforms are under development.
Al Zain A. Implementing High-Level Parallelism on Computational Grids, PhD Thesis, Heriot-Watt University, 2006.
Al Zain A. Trinder P.W. Loidl H.W. Michaelson G.J. Managing Heterogeneity in a Grid Parallel Haskell, Journal of Scalable Computing: Practice and Experience 7(3), (September 2006).
The GUM implementation of GpH is available in two development branches.
Our main hardware platform are Intel-based Beowulf clusters. Work on ports to other architectures is also moving on (and available on request):
http://www.macs.hw.ac.uk/~dsg/gph/
ftp://ftp.macs.hw.ac.uk/pub/gph/gum-4.06-snap-i386-unknown-linux.tar
<gph at macs.hw.ac.uk>, <mgross at dorsai.org>
| Report by: | Phil Trinder |
| Participants: | Phil Trinder, Hans-Wolfgang Loidl, Jan Henry Nyström, Robert Pointon |
GdH supports distributed stateful interactions on multiple locations. It is a conservative extension of both Concurrent Haskell and GpH (→3.2.2), enabling the distribution of the stateful IO threads of the former on the multiple locations of the latter. The programming model includes forking stateful threads on remote locations, explicit communication over channels, and distributed exception handling.
An alpha-release of the GdH implementation is available on request <gph at macs.hw.ac.uk>. It shares substantial components of the GUM implementation of GpH (Glasgow parallel Haskell) (→3.2.2).
Nystrom J.H. Trinder P.W. King D.J. Are High-level Languages suitable for Robust Telecoms Software? Proc. 24th Int. Conference on Computer Safety, Reliability and Security (SAFECOMP’05), Fredrikstad, Norway (September 2005).
http://www.macs.hw.ac.uk/~dsg/telecoms/publications/SafeComp2005.pdf Nystrom, J.H., Trinder, P.W., King,D.J. A Comparative Evaluation of Three High-level Distributed Languages for Telecoms Software. In preparation.
Eden has been jointly developed by two groups at Philipps Universität Marburg, Germany and Universidad Complutense de Madrid, Spain. The project has been ongoing since 1996. Currently, the team consists of the following people:
Eden extends Haskell with a small set of syntactic constructs for explicit process specification and creation. While providing enough control to implement parallel algorithms efficiently, it frees the programmer from the tedious task of managing low-level details by introducing automatic communication (via head-strict lazy lists), synchronisation, and process handling.
Eden’s main constructs are process abstractions and process instantiations. The function process :: (a -> b) -> Process a b embeds a function of type (a -> b) into a process abstraction of type Process a b which, when instantiated, will be executed in parallel. Process instantiation is expressed by the predefined infix operator ( # ) :: Process a b -> a -> b. Higher-level coordination is achieved by defining skeletons, ranging from a simple parallel map to sophisticated replicated-worker schemes. They have been used to parallelise a set of non-trivial benchmark programs.
Eden has been implemented by modifying the parallel runtime system GUM of GpH (→3.2.2). Differences include stepping back from a global heap to a set of local heaps to reduce system message traffic and to avoid global garbage collection. The current (freely available) implementation is based on GHC 5.02.3. A source code version is available from the Eden web page. Installation support will be provided if required.
Rita Loogen, Yolanda Ortega-Mallén and Ricardo Peña: Parallel Functional Programming in Eden, Journal of Functional Programming 15(3), 2005, pages 431-475 (Special Issue on Functional Approaches to High-Performance Parallel Programming)
Epigram is a prototype dependently typed functional programming language, equipped with an interactive editing and typechecking environment. High-level Epigram source code elaborates into a dependent type theory based on Zhaohui Luo’s UTT. The definition of Epigram, together with its elaboration rules, may be found in ‘The view from the left’ by Conor McBride and James McKinna (JFP 14 (1)).
Simply typed languages have the property that any subexpression of a well typed program may be replaced by another of the same type. Such type systems may guarantee that your program won’t crash your computer, but the simple fact that True and False are always interchangeable inhibits the expression of stronger guarantees. Epigram is an experiment in freedom from this compulsory ignorance.
Specifically, Epigram is designed to support programming with inductive datatype families indexed by data. Examples include matrices indexed by their dimensions, expressions indexed by their types, search trees indexed by their bounds. In many ways, these datatype families are the progenitors of Haskell’s GADTs, but indexing by data provides both a conceptual simplification – the dimensions of a matrix are numbers – and a new way to allow data to stand as evidence for the properties of other data. It is no good representing sorted lists if comparison does not produce evidence of ordering. It is no good writing a type-safe interpreter if one’s typechecking algorithm cannot produce well-typed terms.
Programming with evidence lies at the heart of Epigram’s design. Epigram generalises constructor pattern matching by allowing types resembling induction principles to express as how the inspection of data may affect both the flow of control at run time and the text and type of the program in the editor. Epigram extracts patterns from induction principles and induction principles from inductive datatype families.
Whilst at Durham, Conor McBride developed the Epigram prototype in Haskell, interfacing with the xemacs editor. Nowadays, a team of willing workers at the University of Nottingham are developing a new version of Epigram, incorporating both significant improvements over the previous version and experimental features subject to active research.
The first steps have been made in collecting recurrent programs and examples in some sort of standard library. There’s still a great deal of cleaning up to do, but progress is being made.
The Epigram system has also been used succesfully by Thorsten Altenkirch in his undergraduate course on Computer Aided Formal Reasoning for two years http://www.cs.nott.ac.uk/~txa/g5bcfr/. Several final year students have successfully completed projects that involved both new applications of and useful contributions to Epigram.
Peter Morris is working on how to build the datatype system of Epigram from a universe of containers. This technology would enable datatype generic programming from the ground up. Central to these ideas is the concept of indexed container that has been developed recently. There are ongoing efforts to elaborate the ideas in Edwin Brady’s PhD thesis about efficiently compiling dependently typed programming languages.
Joel Wright has started writing a stand alone editor for Epigram using Gtk2Hs (→4.8.1). Thanks to a most helpful visit from Duncan Coutts and Axel Simon, two leading Gtk2Hs developers, we now have the beginnings of a structure editor for Epigram 2.
There has also been steady progress on Epigram 2 itself. The type theoretic basis underpinning Epigram has been further developed to incorporate observational type theory. The lion’s share of the core theory has already been implemented, but there is still plenty of work to do.
Whilst Epigram seeks to open new possibilities for the future of strongly typed functional programming, its implementation benefits considerably from the present state of the art. Our implementation makes considerable use of applicative functors, higher-kind polymorphism and type classes. Moreover, its denotational approach translates Epigram’s lambda-calculus directly into Haskell’s. On a more practical note, we have recently shifted to the darcs version control system and cabal framework.
Epigram source code and related research papers can be found on the web at http://www.e-pig.org and its community of experimental users communicate via the mailing list <epigram at durham.ac.uk>. The current implementation is naive in design and slow in practice, but it is adequate to exhibit small examples of Epigram’s possibilities. The new implementation, whose progress can be observed at http://www.e-pig.org/epilogue/ will be much less rudimentary.
Chameleon is a Haskell style language which integrates sophisticated reasoning capabilities into a programming language via its CHR programmable type system. Thus, we can program novel type system applications in terms of CHRs which previously required special-purpose systems.
Jeremy Wazny successfully defended his PhD thesis on Type inference and type error diagnosis for Hindley/Milner with Extensions. This thesis summarizes to a large extent the theoretical underpinnings behind Chameleon. A copy can be downloaded via http://www.comp.nus.edu.sg/~sulzmann/chameleon/.
The latest available Chameleon version is from July 2005. This version is known to have bugs. We are currently working on a much improved version which will be available in the third quarter of 2006. An announcement will be sent to the Haskell mailing list once the new version is ready.
XHaskell is an extension of Haskell with XDuce style regular expression types and regular expression pattern matching. We have much improved the implementation which can found under the XHaskell home-page.
| Report by: | Jurriaan Hage |
| Participants: | Bastiaan Heeren, Jurriaan Hage, Doaitse Swierstra |
With the generation of understandable type error messages in mind we have devised a constraint based type inference method in the form of the Top library. This library is used in the Helium compiler (for learning Haskell) developed at Universiteit Utrecht. Our philopsophy is that no single type inferencer works best for everybody all the time. Hence, we want a type inferencer adaptable to the programmer’s needs without the need for him to delve into the compiler. Our goal is to devise a library which helps compiler builders add this kind of technology to their compiler.
The main outcome of our work is the Top library which has the following characteristics:
An older version of the underlying machinery for the type inferencer has been published in the Proceedings of the Workshop of Immediate Applications of Constraint Programming held in October 2003 in Kinsale, Ireland.
The entire library is parameterized in the sense that for a given compiler we can choose which information we want to drag around.
The library has been used extensively in the Helium compiler, so that Helium can be seen as a case study in applying Top in a real compiler. In addition to the above, Helium also
| Report by: | Atze Dijkstra |
| Participants: | Atze Dijkstra, Doaitse Swierstra |
| Status: | active development |
The purpose of the EHC project is to provide a description of a Haskell compiler which is as understandable as possible so it can be used for education as well as research.
For its description an Attribute Grammar system (AG) is used as well as other formalisms allowing compact notation like parser combinators. For the description of type rules, and the generation of an AG implementation for those type rules, we recently started using the Ruler system (→5.5.3) (included in the EHC project).
The EHC project also tackles other issues:
Currently EHC already incorporates more advanced features like higher-ranked polymorphism, partial type signatures, class system, explicit passing of implicit parameters (i.e. class instances), extensible records, kind polymorphism.
Part of the description of the series of EH compilers is available as a PhD thesis, which incorporates previously published material on the EHC project.
The compiler is used for small student projects as well as larger experiments such as the incorporation of an Attribute Grammar system.
We also hope to provide a Haskell frontend dealing with all Haskell syntactic sugar omitted from EHC.
http://www.cs.uu.nl/groups/ST/Ehc/WebHome
http://www.cs.uu.nl/wiki/HUT/AttributeGrammarSystem
Software development often consists of designing a (set of mutually recursive) datatype(s), to which functionality is added. Some functionality is datatype specific, other functionality is defined on almost all datatypes, and only depends on the type structure of the datatype.
Examples of generic (or polytypic) functionality defined on almost all datatypes are the functions that can be derived in Haskell using the deriving construct, storing a value in a database, editing a value, comparing two values for equality, pretty-printing a value, etc. Another kind of generic function is a function that traverses its argument, and only performs an action at a small part of its argument. A function that works on many datatypes is called a generic function.
There are at least two approaches to generic programming: use a preprocessor to generate instances of generic functions on some given datatypes, or extend a programming language with the possibility to define generic functions. The techniques behind some of these ideas are given in a separate subsection. In Comparing approaches to generic programming in Haskell (in the lecture notes of the Spring School on Datatype-Generic Programming 2006, held in Nottingham, April 2006, to appear in LNCS), Ralf Hinze, Johan Jeuring and Andres Löh compare 8 different approaches to generic programming in Haskell, both lightweight approaches and language extensions. Most of the approaches discussed in this and previous versions of the Communities report are addressed. In the same set of lecture notes, Jeremy Gibbons discusses the various interpretations of the word ‘generic’.
DrIFT is a preprocessor which generates instances of generic functions. It is used in Strafunski (→4.3.2) to generate a framework for generic programming on terms. New releases appear regularly, the latest is 2.2.0 from April 2006.
Light-weight generic programming There are a number of approaches to light-weight generic programming.
Generic functions for data type traversals can (almost) be written in Haskell itself (using many of the extensions of Haskell provided by GHC), as shown by Ralf Lämmel and Simon Peyton Jones in the ‘Scrap your boilerplate’ (SYB) approach (http://www.cs.vu.nl/boilerplate/). The SYB approach to generic programming in Haskell has been further elaborated in the recently published (in FLOPS ’06) paper “Scrap Your Boilerplate” Reloaded and “Scrap Your Boilerplate” Revolutions (to appear in MPC’06). In these papers Ralf Hinze, Andres Löh, and Bruno Oliveira show, amongst others, how by viewing the SYB approach in a particular way, the choice of basic operators becomes obvious.
In Open data types and open functions (to appear at PPDP’06), Andres Löh and Ralf Hinze propose to add extensible data types to Haskell, and they show how to use these extensible data types to implement generic functions in a light-weight approach to generic programming.
In Generics as a Library, Bruno Oliveira, Ralf Hinze and Andres Löh show how to extend Ralf Hinze’s “Generic for the Masses” approach to be able to extend generic functions with ad-hoc behaviour for new data types.
Finally, in Generic programming, NOW! (in the lecture notes of the Spring School on Datatype-Generic Programming 2006, held in Nottingham, April 2006, to appear in LNCS), Ralf Hinze and Andres Löh show how GADTs can be used to implement many of the lightweight approaches to generic programming directly in Haskell.
Generic Haskell In Generic views on data types (to appear in MPC’06) Stefan Holdermans, Johan Jeuring, Andres Löh, and Alexey Rodriguez show how to add views on data types to Generic Haskell. Using these views, typical fixed-point functions such as determining the recursive children of a constructor of a recursive data type can be combined with the usual Generic Haskell programs in a single program. The Generic Haskell compiler has been extended with views (available via svn).
Other In Generic Programming with Sized Types (to appear in MPC’06), Andreas Abel defines a generic programming language in which you can only define terminating generic programs, by adding sizes to types.
In iData for the World Wide Web: programming interconnected web forms (in FLOPS’06), Rinus Plasmeijer and Peter Achten show how to use the generic programming extension of Clean for implementing web forms.
Jeremy Gibbons’ tutorial Design Patterns as Higher-Order Datatype-Generic Programs from ECOOP and OOPSLA 2005 has been written up as a paper, http://www.comlab.ox.ac.uk/jeremy.gibbons/publications/#hodgp. He and Bruno Oliveira have also written about The Essence of the Iterator Pattern as a higher-order datatype-generic program (http://www.comlab.ox.ac.uk/jeremy.gibbons/publications/#iterator), in terms of McBride and Paterson’s idioms or applicative functors.
The Spring School on Datatype-Generic Programming has taken place in Nottingham, UK, April 23 - 26, see http://www.cs.nott.ac.uk/ssdgp2006/. There were lectures about comparing approaches to generic programming in Haskell, generic programming in Haskell using GADTs, the implementation of patterns as generic programs, generic programming in Omega (a Haskell-like functional programming language with a limited form of dependent types), and in Epigram (→3.3.1) (a dependently typed programming language).
Generic Haskell: finding transformations between data types. Adding type inference to the compiler. Other: the relation between generic programming and dependently typed programming; the relation between coherence and generic programming; methods for constructing generic programs. Methods for testing generic programs.
Hopefully there will be papers about these topics in the next Workshop on Generic Programming (colocated with ICFP 2006): http://www.informatik.uni-bonn.de/~ralf/wgp2006.html.
The Haskell Cabal is a Common Architecture for Building Applications and Libraries. It is an API distributed with GHC (→2.1), NHC98 (→2.3), and Hugs (→2.2) which allows a developer to easily group together a set of modules into a package.
HackageDB (Haskell Package Database) is an online database of packages which can be interactively queried by client-side software such as the prototype cabal-get. From HackageDB, an end-user can download and install packages which conform to the Cabal interface.
The Haskell Implementations come with a good set of standard libraries included, but this set is constantly growing and is maintained centrally. This model does not scale up well, and as Haskell grows in acceptance, the quality and quantity of available libraries is becoming a major issue.
It can be very difficult for an end user to manage a wide variety of dependencies between various libraries, tools, and Haskell implementations, and to build all the necessary software at the correct version numbers on their platform: previously, there was no generic build system to abstract away differences between Haskell Implementations and operating systems.
HackageDB and The Haskell Cabal seek to provide some relief to this situation by building tools to assist developers, end users, and operating system distributors.
Such tools include a common build system, a packaging system which is understood by all of the Haskell Implementations, an API for querying the packaging system, and miscellaneous utilities, both for programmers and end users, for managing Haskell software.
Hacanon-light is a lightweight FFI library that uses the Data Interface Scheme (DIS) from Hacanon (http://haskell.org/hawiki/Hacanon) and Template Haskell to provide a high level interface to marshaling/un-marshaling. It differs from Hacanon taking a passive role in the binding process; it won’t use or validate itself from any foreign header files.
Hacanon-light is meant to be used together with Zeroth (→5.5.2).
HODE is a binding to the Open Dynamics Engine. ODE is an open source, high performance library for simulating rigid body dynamics.
HODE uses Hacanon-light (→4.2.1) to simplify the binding process and Zeroth (→5.5.2) to avoid linking with Template Haskell.
http://darcs.haskell.org/~lemmih/hode
| Report by: | Martin Erwig |
| Status: | active development |
The PFP library is a collection of modules for Haskell that facilitates probabilistic functional programming, that is, programming with stochastic values. The probabilistic functional programming approach is based on a data type for representing distributions. A distribution represent the outcome of a probabilistic event as a collection of all possible values, tagged with their likelihood.
A nice aspect of this system is that simulations can be specified independently from their method of execution. That is, we can either fully simulate or randomize any simulation without altering the code which defines it.
The library was developed as part of a simulation project with biologists and genome researchers. We plan to apply the library to more examples in this area. Future versions will hopefully contain a more systematically documented list of examples.
Since the last report, the implementation has undergone only minor changes, and no new release has been made yet. The web site has been updated slightly and contains the latest papers on the subject.
| Report by: | Marnix Klooster |
| Status: | Hmm 0.1 released, slow-paced development |
Hmm is a small Haskell library to parse and verify Metamath databases.
Metamath (http://metamath.org) was conceived and almost completely implemented by Norman Megill. It a project for formalizing mathematics, a file format for specifying machine-checkable proofs, and a program for generating and verifying this file format. Already more than 6000 proofs have been verified from the axioms of set theory.
Version 0.1 of Hmm has been released on October 17th, 2005.
The development version can be found at http://www.solcon.nl/mklooster/repos/hmm/. This is a darcs repository (→6.6).
Hmm can’t currently do more than just read and verify a Metamath file. However, the longer-term goal is to generate calculational proofs from Metamath proofs. As an example, the Metamath proof that cross-product distributes over union (see http://us.metamath.org/mpegif/xpundi.html) could be visualized something like this:
I am working towards this goal, slowly and step by step.
GSLHaskell is a high level functional interface to some linear algebra computations and other numerical routines, internally implemented using the GNU Scientific Library. The goal is to achieve the functionality and performance of GNU-Octave or similar systems.
The library is in a preliminary status, but the binding infrastructure is nearly finished and some simple applications requiring basic linear algebra (real svd and qr factorizations, symmetric eigensystems, etc.), numeric integration and differentiation, multidimensional minimization, etc., can already be written.
The immediate developments include a testing suite, updating the manual, writing additional illustrative examples, and some code refactoring. Then we can proceed to include the interface for the remaining functions and implement, using additional libraries, some useful algorithms in Octave not currently available in the GSL.
| Report by: | Frederik Eaton |
| Status: | unstable; actively maintained |
The index aware linear algebra library is a Haskell interface to a set of common vector and matrix operations. The interface exposes index types and ranges to the type system so that operand conformability can be statically guaranteed. For instance, an attempt to add or multiply two incompatibly sized matrices is a static error. A prepose-style (i.e. following Kiselyov and Chan’s “Implicit Configurations” paper) approach is used for generating type-level integers for use in index types. Vectors can be embedded in a program using a set of template Haskell routines.
Currently the library is in a “proof-of-concept” state. The interface has an example implementation using Arrays, but ultimately it should be primarily used with a fast external linear algebra package such as ATLAS. I would like to see it become part of Alberto Ruiz’s GSL library (→4.2.5), which can be used with ATLAS, and he has expressed an interest in adopting it. That is why I haven’t given it a real name yet.
The original announcement is here:
http://article.gmane.org/gmane.comp.lang.haskell.general/13561
http://ofb.net/~frederik/futility/src/Vector/Base.hs
http://ofb.net/~frederik/futility/src/Vector/Array.hs
http://ofb.net/~frederik/futility/src/Vector/Template.hs
http://ofb.net/~frederik/futility/src/Domain.hs
http://ofb.net/~frederik/futility/src/Prepose.hs
http://ofb.net/~frederik/futility/src/Vector/read-example.hs
Ivor is a tactic-based theorem proving engine with a Haskell API. Unlike other systems such as Coq and Agda, the tactic engine is primarily intended to be used by programs, rather than a human operator. To this end, the API provides a collection of primitive tactics and combinators for building new tactics. This allows easy construction of domain specific tactics, while keeping the core type theory small and independently checkable.
The primary aim of the library is to support research into generative programming and resource bounded computation in Hume (http://www.hume-lang.org/). In this setting, we have developed a dependently typed framework for representing program execution cost, and used the Ivor library to implement domain specific tactics for constructing programs within this framework. However the library is more widely applicable, some potential uses being:
Ivor features a dependent type theory similar to Luo’s ECC with definitions, with additional (experimental) multi-stage programming support. Optionally, it can be extended with heterogenous equality, primitive types and operations, new parser rules and user defined tactics. By default, all programs in the type theory terminate, but in the spirit of flexibility, the library can be configured to allow general recursion.
The library is in active development, although at an early stage. Future plans include development of more basic tactics (for basic properties such as injectivity and disjointness of constructors, and elimination with a motive), a compiler (with optimisations) and a larger collection of standard definitions.
magic-haskell is a binding to the libmagic library. With magic-haskell, you can determine the type of a file by looking at its contents rather than its name. This library also can yield the MIME type of a file by looking at its contents.
This is often a more useful method than looking at a file’s name since it can yield correct results even if a file’s extension is missing or misleading.
MissingH is a library designed to provide the little “missing” features that people often need and end up implementing on their own. Its focus is on list, string, and IO features, but extends into other areas as well. The library is 100%pure Haskell code and has no dependencies on anything other than the standard libraries distributed with current versions of GHC and Hugs.
In addition to the smaller utility functions, recent versions of MissingH have added a complete FTP client and server system, a virtualized I/O infrastructure similar to Python’s file-like objects, a virtualized filesystem infrastructure, a MIME type guesser, a configuration file parser, GZip decompression support in pure Haskell, a DBM-style database virtualization layer, and a modular logging infrastructure, complete with support for Syslog.
Future plans for MissingH include adding more network client and server libraries, support for a generalized URL downloading scheme that will work across all these client libraries, and enhancing the logging system.
This library is licensed under the GNU GPL.
MissingPy is really two libraries in one. At its lowest level, MissingPy is a library designed to make it easy to call into Python from Haskell. It provides full support for interpreting arbitrary Python code, interfacing with a good part of the Python/C API, and handling Python objects. It also provides tools for converting between Python objects and their Haskell equivalents. Memory management is handled for you, and Python exceptions get mapped to Haskell Dynamic exceptions.
At a higher level, MissingPy contains Haskell interfaces to some Python modules. These interfaces include support for the Python GZip and BZip2 modules (provided using the HVIO abstraction from MissingH), and support for Python DBM libraries (provided using AnyDBM from MissingH (→4.2.9)). These high-level interfaces look and feel just like any pure Haskell interface.
Future plans for MissingPy include an expansion of the higher-level interface to include such things as Python regexp libraries, SSL support, and LDAP support.
This library is licensed under the GNU GPL.
| Report by: | Doaitse Swierstra |
| Status: | Released as cabal packages |
The Utrecht parsing Library and the associated Attribute Grammar System have been made available as cabal packages (→4.1.1), and as such may be easier to install.
The systems have been succesfully used by Niels van der Velde, one of our Master students, as part of a toolchain to assist in the parallelisation of C code. It seems that the lazy evaluation used inside is requiring quite some memory footprint.
One of our other master students, Joost Verhoog, is about to complete the alternative path to code-generation for the AG system, in which we follow te more traditional multi-pass attribute grammar evaluation schemes, as explained in the thesis of Joao Saraiva http://www.cs.uu.nl/wiki/Swierstra/SupervisedTheses. Our hope is that this will alleviate the aforementioned problem.
Strafunski is a Haskell-based bundle for generic programming with functional strategies, that is, generic functions that can traverse into terms of any type while mixing type-specific and uniform behaviour. This style is particularly useful in the implementation of program analyses and transformations.
Strafunski bundles the following components:
The Strafunski-style of generic programming can be seen as a lightweight variant of generic programming (→3.4) because no language extension is involved, but generic functionality simply relies on a few overloaded combinators that are derived per datatype. By default, Strafunski relies on DrIFT to derive the appropriate class instances, but a simple switch is offered to rely on the “Scrap your boilerplate” (→3.4) model as available in the Data.Generics library.
Strafunski is used in the HaRe project (→5.3.3) and in the UMinho Haskell Libraries and Tools to provide analysis and transformation functionality for languages such as XML Schema, Java, VDM, SQL, spreadsheets, and Haskell itself.
hs-plugins is a library for dynamic loading and runtime compilation of Haskell modules, for Haskell and foreign language applications. It can be used to implement application plugins, hot swapping of modules in running applications, runtime evaluation of Haskell, and enables the use of Haskell as an application extension language. Version 1.0rc1 has been released.
http://www.cse.unsw.edu.au/~dons/hs-plugins/
darcs get
ldap-haskell is a Haskell binding to C-based LDAP libraries such as OpenLDAP. With ldap-haskell, you can interrogate an LDAP directory, update its entries, add data to it, etc. ldap-haskell provides an interface to all the most common operations you would need to perform with an LDAP server.
darcs get http://darcs.complete.org/ldap-haskell
The “time” package replaces the current library for handling time. The “main” modules feature representation of UTC and UT1, as well as the proleptic Gregorian calendar, time-zones, and functions for strftime-style formatting. Additional “second-level” modules handle TAI, leap-seconds, Julian, ISO 8601 week, and “year and day” calendars, calculation of Easter, and POSIX time. Modules are organised under Data.Time to distinguish from the old System.Time.
The source is in the darcs (→6.6) repository “time” in the current standard libraries, and is built by the GHC library build process. Largely complete, remaining work includes putting use examples in the documentation, and integrating existing unit tests into the testsuite repository.
In case anyone is interested, I’ve put a darcsized copy of the code here:
All contributions are welcome.
Streams is the new I/O library developed to extend existing Haskell’s Handle-based I/O features. It includes:
The main idea of the library is its clear class-based design that allows to split all functionality into a set of small maintainable modules, each of which supports one type of streams (file, memory buffer …) or one feature (locking, buffering, Char encoding …). The interface of each such module is fully defined by some type class (Stream, MemoryStream, TextStream), so the library can be easily extended by third party modules that implement additional stream types (network sockets, array buffers …) and features (overlapped I/O …).
http://haskell.org/haskellwiki/Library/Streams
<Bulat.Ziganshin at gmail.com>
The CoddFish library provides a strongly typed model of relational databases and operations on them, which allows for static checking of errors and integrity at compile time. Apart from the standard relational database operations, it provides normal form verification and database transformation operations.
The library makes essential use of the HList library (→4.6.7), which provides arbitrary-length tuples (or heterogeneous lists), and makes extensive use of type-level programming with multi-parameter type classes.
CoddFish lends itself as a sandbox for the design of typed languages for modeling, programming, and transforming relational databases.
The web site of CoddFish (http://wiki.di.uminho.pt/wiki/bin/view/PURe/CoddFish) provides documentation and a stand-alone release.
Takusen is a library for accessing DBMS’s. It is a low-level library like HSQL, in the sense that it is used to issue SQL statements. Takusen’s ‘unique-selling-point’ is a design for processing query results using a left-fold enumerator. For queries the user creates an iteratee function, which is fed rows one-at-a-time from the result-set. We also support processing query results using a cursor interface, if you require finer-grained control. Currently we fully support Oracle, Sqlite, and PostgreSQL.
Since the last report we have implemented a new internal interface for prepared statements, and improved the PostgreSQL back-end. We have also (very recently!) moved from SourceForge to a darcs repo (→6.6) at haskell.org, and hope to present a new release soon from this repo.
Plans for the future include:
| Report by: | Björn Bringert |
| Status: | active development and maintenance |
| Portability: | GHC, Hugs, multiple platforms |
HaskellDB is a library for accessing databases through Haskell in a type safe and declarative way. It completely hides the underlying implementation and can interface with several popular database engines through either HSQL or wxHaskell. HaskellDB was originally developed by Daan Leijen. This latest incarnation of HaskellDB was produced as part of a student project at Chalmers University of Technology.
The current version supports:
Future possible developments include:
There hasn’t been a new release for a while, but an experimental Cabalized (→4.1.1) version is available in the CVS repository. New developers are very welcome to join the project.
| Report by: | Jean-Philippe Bernardy |
| Status: | stable, maintained |
Haskell implementations come with modules to handle Maps, Sets, and other common data structures. We call these modules the Standard Collection Libraries. The goal of this project is to improve those.
Beside incremental improvement of the current code (stress testing, ironing bugs out, small improvements of API, …), a package has been created to gather collection-related code that would not fit in the base package yet. This includes changes that are either potentially de-stabilizing, controversial or otherwise experimental.
This new package features notably:
I plan to submit this package to intensive testing and review, in order to be able to include parts of it in the standard.
http://hackage.haskell.org/trac/ghc/wiki/CollectionLibraries
Monads are very common in Haskell programs and yet every time one needs a monad, it has to be defined from scratch. This is boring, error prone and unnecessary. Many people have their own libraries of monads, and it would be nice to have a common one that can be shared by everyone. Some time ago, Andy Gill wrote the monad transformer library that has been distributed with most Haskell implementations, but he has moved on to other jobs, so the library was left on its own. I wrote a similar library (before I knew of the existence of Andy’s library) and so i thought i should combine the two. The “new” monadic library is not really new, it is mostly reorganization and cleaning up of the old library. It has been separated from the “base” library so that it can be updated on its own.
Since the last report, there has been a new major release of the monad library (version 2.0), and a minor update (version 2.0.1).
Users interested in using the library can download it (with documentation) from the library’s website.
| Report by: | Don Stewart |
| Status: | active development |
Data.ByteString (formerly FPS) provides packed strings (byte arrays held by a ForeignPtr), along with a list interface to these strings. It lets you do extremely fast IO in Haskell; in some cases, even faster than typical C implementations, and much faster than [Char]. It uses a flexible “foreign pointer” representation, allowing the transparent use of Haskell or C code to manipulate the strings.
Data.ByteString is written in Haskell98 plus the foreign function interface and cpp. It has been tested succesfully with GHC 6.4 and 6.5, and hugs March 2005.
Many improvements have been made over the last 6 months, including the new Data.ByteString.Lazy module, successfully used on terabyte data quantities. Data.ByteString will be part of the GHC base libraries in the GHC 6.6 release.
http://www.cse.unsw.edu.au/~dons/fps.html
darcs get
Edison, a library of efficient data structures for Haskell, now has a new maintainer! A major update of the library – version 1.2 – has just been released.
Major changes from Edison version 1.1 (released in 1999), include:
http://www.eecs.tufts.edu/~rdocki01/edison.html
| Report by: | Henning Thielemann |
| Participants: | Dylan Thurston, Henning Thielemann |
| Status: | experimental, active development |
The hierarchy of numerical type classes is revised and oriented at algebraic structures. Axiomatics for fundamental operations are given as QuickCheck properties, superfluous super-classes like Show are removed, semantic and representation-specific operations are separated, the hierarchy of type classes is more fine grained, and identifiers are adapted to mathematical terms.
There are both certain new type classes representing algebraic structures and new types of mathematical objects.
Currently supported algebraic structures are
There is also a collection of mathematical object types, which is useful both for applications and testing the class hierarchy. The types are
Using the revised system requires hiding some of the standard functions provided by Prelude, which is fortunately supported by GHC (→2.1). The library has basic Cabal (→4.1.1) support.
Collect more Haskell code related to mathematics, e.g. for linear algebra. Study of alternative numeric type class proposals and common computer algebra systems. Ideally each data type resides in a separate module. However this leads to mutual recursive dependencies, which cannot be resolved if type classes are mutually recursive.
A still unsolved problem arises for e.g. residue classes, matrix computations, infinite precision numbers and fixed point numbers. It should be possible to assert statically that the arguments of a function are residue classes with respect to the same divisor, or that they are vectors of the same size. Possible ways out are encoding values in types or local type class instances. The latter one is still neither proposed nor implemented in any Haskell compiler.
An efficient implementation of ordered sequences, based on (external, node oriented) 2-3 finger search trees as described in a recent paper by Ralf Hinze (see below).
With regard to asymptotic complexity, 2-3 finger search trees seem to be the best known purely functional implementations of ordered sequences, with the following amortized time bounds:
The project started as an exercise to explore the intriguing possibilities of nested data types to statically check data-structural invariants. One of my interests was to find out how much this helps development in practice. The results are nothing less than impressive to me. I am sure I would never have been able to produce anything as complicated with such a (relatively) low effort, had not the type system constantly guided me in the right direction.
Meanwhile, I think this could evolve into a generally useful library. A lot of work remains to be done, though: currently the library provides only the basic functionality and I have just started to get into performance measurements. I suspect some optimizations are possible, but haven’t yet looked into it very deeply. The code is mostly tested (and specified, thanks to QuickCheck), but hasn’t been used in a real application.
The library is not yet released, mainly because (lacking a personal homepage) I don’t have a convenient place on the web to host it. However, I plan to release a first alpha version soon.