Вы находитесь на странице: 1из 67

Haskell Communities and Activities Report

http://www.haskell.org/communities/

Seventeenth Edition — November 2009

Janis Voigtländer (ed.)


Andy Adams-Moran Tiago Miguel Laureano Alves Krasimir Angelov
Heinrich Apfelmus Dmitry Astapov Justin Bailey
Jean-Philippe Bernardy Tobias Bexelius Joachim Breitner
Björn Buckwalter Andrew Butterfield Roman Cheplyaka
Adam Chlipala Olaf Chitil Jan Christiansen
Alberto Gómez Corona Duncan Coutts Jácome Cunha
Nils Anders Danielsson Atze Dijkstra Facundo Dominguez
Chris Eidhof Marc Fontaine Patai Gergely
Brett G. Giles Andy Gill George Giorgidze
Dmitry Golubovsky Jurriaan Hage Bastiaan Heeren
Claude Heiland-Allen Jan Martin Jansen Wolfgang Jeltsch
Florian Haftmann Christopher Lane Hinson Guillaume Hoffmann
Martin Hofmann Creighton Hogg Csaba Hruska
Liyang HU Paul Hudak Farid Karimipour
Oleg Kiselyov Lennart Kolmodin Michal Konečný
Lyle Kopnicky Eric Kow Bas Lijnse
Ben Lippmeier Andres Löh Rita Loogen
Ian Lynagh John MacFarlane Christian Maeder
José Pedro Magalhães Michael Marte Arie Middelkoop
Ivan Lazar Miljenovic Neil Mitchell Maarten de Mol
Dino Morelli Matthew Naylor Rishiyur Nikhil
Thomas van Noort Johan Nordlander Miguel Pagano
Jens Petersen Simon Peyton Jones Dan Popa
Jason Reich Claus Reinke Alberto Ruiz
David Sabel Ingo Sander Uwe Schmidt
Martijn Schrage Tom Schrijvers Paulo Silva
Axel Simon Ganesh Sittampalam Martijn van Steenbergen
Don Stewart Martin Sulzmann Doaitse Swierstra
Henning Thielemann Simon Thompson Wren Ng Thornton
Jared Updike Marcos Viera Miguel Vilaca
Sebastiaan Visser Janis Voigtländer Kim-Ee Yeoh
Brent Yorgey
Preface

This is the 17th edition of the Haskell Communities and Activities Report. As usual, fresh
entries are formatted using a blue background, while updated entries have a header with a blue
background.
The report is thinner/shorter this time, but has a good percentage of blue and semi-blue
entries. I have implemented the strategy, outlined in the May edition, of replacing with online
pointers to previous versions those entries for which I received a liveness ping, but which have
seen no essential update for a while. Entries on which no new activity has been reported for a
year or longer have been dropped completely. Please do revive such entries next time if you do
have news on them.
A call for new entries and updates to existing ones will be issued on the usual mailing lists
around April/May.
Finally, on special occasion, let me pose a prize question. It goes as follows:
How many entries in this report refer to the 2010 PEPM Workshop?
The first correct answer that reaches me wins a free copy of the ACM printed proceedings!

Janis Voigtländer, University of Bonn, Germany, hhcar@haskell.orgi

2
Contents

1 Information Sources 7
1.1 The Monad.Reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2 Haskell Wikibook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3 Oleg’s Mini tutorials and assorted small projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4 Haskell Cheat Sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.5 The Happstack Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.6 Practice of Functional Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.7 Cartesian Closed Comic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2 Implementations 10
2.1 The Glasgow Haskell Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2 The Helium compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.3 UHC, Utrecht Haskell Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.4 Haskell frontend for the Clean compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.5 SAPL, Simple Application Programming Language . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.6 The Reduceron . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.7 Platforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.7.1 Haskell in Gentoo Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.7.2 Fedora Haskell SIG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.7.3 GHC on OpenSPARC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3 Language 17
3.1 Extensions of Haskell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.1.1 Eden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.1.2 XHaskell project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.1.3 HaskellActor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.1.4 HaskellJoin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.2 Related Languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.2.1 Curry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.2.2 Agda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.2.3 Clean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.2.4 Timber . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.2.5 Ur/Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.3 Type System / Program Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.3.1 Free Theorems for Haskell (and Curry) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.3.2 The Disciplined Disciple Compiler (DDC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4 Tools 22
4.1 Transforming and Generating . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.1.1 UUAG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.1.2 AspectAG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.1.3 HFusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.1.4 Optimus Prime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.1.5 Derive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.1.6 lhs2TEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2 Analysis and Profiling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.2.1 SourceGraph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.2.2 HLint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.2.3 hp2any . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.3 Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.3.1 Hoogle — Haskell API Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.3.2 HEAT: The Haskell Educational Advancement Tool . . . . . . . . . . . . . . . . . . . . . . . . . . 25

3
4.3.3 HaRe — The Haskell Refactorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.3.4 DarcsWatch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.3.5 HSFFIG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

5 Libraries 27
5.1 Cabal and Hackage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.2 Haskell Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.3 Auxiliary Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.3.1 hmatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.3.2 hTensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.3.3 The Neon Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.3.4 leapseconds-announced . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.4 Parsing and Transforming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.4.1 ChristmasTree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.4.2 Utrecht Parser Combinator Library: New version . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.5 Mathematical Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.5.1 dimensional: Statically checked physical dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.5.2 Halculon: units and physical constants database . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.5.3 Numeric prelude . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.5.4 AERN-Real and friends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.5.5 logfloat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.5.6 fad: Forward Automatic Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.6 Data types and data structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.6.1 HList — a library for typed heterogeneous collections . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.6.2 bytestring-trie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.7 Data processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.7.1 MultiSetRewrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.7.2 Graphalyze . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.8 Generic and Type-Level Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.8.1 uniplate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.8.2 Generic Programming at Utrecht University . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.8.3 Extensible and Modular Generics for the Masses (EMGM) . . . . . . . . . . . . . . . . . . . . . . . 33
5.8.4 Optimizing generic functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.8.5 2LT: Two-Level Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.8.6 Data.Label — “atoms” for type-level programming . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.9 User interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.9.1 Gtk2Hs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.9.2 HQK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.10 Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.10.1 diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.10.2 LambdaCube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.10.3 GPipe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
5.10.4 ChalkBoard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
5.10.5 graphviz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.11 Music . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.11.1 Haskore revision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.11.2 Euterpea . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.12 Web and XML programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.12.1 Haskell XML Toolbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.12.2 tagsoup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

6 Applications and Projects 40


6.1 For the Masses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
6.1.1 Darcs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
6.1.2 xmonad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
6.2 Education . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
6.2.1 Exercise Assistants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
6.2.2 Holmes, plagiarism detection for Haskell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

4
6.2.3 INblobs — Interaction Nets interpreter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
6.2.4 Yahc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
6.2.5 grolprep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
6.3 Web Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
6.3.1 Holumbus Search Engine Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
6.3.2 HCluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
6.3.3 JavaScript Monadic Writer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
6.3.4 Haskell DOM Bindings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
6.3.5 gitit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
6.4 Data Management and Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.4.1 Pandoc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.4.2 HaExcel — From Spreadsheets to Relational Databases and Back . . . . . . . . . . . . . . . . . . . 45
6.4.3 SdfMetz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.4.4 The Proxima 2.0 generic editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.5 Functional Reactive Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
6.5.1 Functional Hybrid Modelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
6.5.2 Elerea . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
6.6 Audio and Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
6.6.1 Audio signal processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
6.6.2 easyVision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
6.6.3 photoname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
6.6.4 n-Dimensional Convex Decomposition of Polytops . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
6.6.5 DVD2473 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.6.6 Fl4m6e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.6.7 GULCI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.6.8 Reflex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.7 Proof Assistants and Reasoning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.7.1 Galculator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.7.2 Saoithín: a 2nd-order proof assistant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.7.3 Inference Services for Hybrid Logics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.7.4 HTab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
6.7.5 Sparkle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
6.7.6 Haskabelle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
6.8 Modeling and Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
6.8.1 iTasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
6.8.2 CSP-M animator and model checker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6.9 Hardware Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6.9.1 ForSyDe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6.9.2 Kansas Lava . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
6.10 Natural Language Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
6.10.1 NLP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
6.10.2 GenI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
6.10.3 Grammatical Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
6.11 Others . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
6.11.1 IgorII . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
6.11.2 Roguestar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
6.11.3 LQPL — A quantum programming language compiler and emulator . . . . . . . . . . . . . . . . . 55
6.11.4 Yogurt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
6.11.5 Dyna 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
6.11.6 Vintage BASIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
6.11.7 Bullet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
6.11.8 arbtt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
6.11.9 uacpid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

7 Commercial Users 58
7.1 Well-Typed LLP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
7.2 Credit Suisse Global Modeling and Analytics Group . . . . . . . . . . . . . . . . . . . . . . . . . . 58
7.3 Bluespec tools for design of complex chips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

5
7.4 Galois, Inc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
7.5 IVU Traffic Technologies AG Rostering Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
7.6 Tupil . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
7.7 Aflexi Content Delivery Network (CDN) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
7.8 Industrial Haskell Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
7.9 typLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

8 Research and User Groups 62


8.1 Functional Programming Lab at the University of Nottingham . . . . . . . . . . . . . . . . . . . . 62
8.2 Artificial Intelligence and Software Technology at Goethe-University Frankfurt . . . . . . . . . . . 63
8.3 Functional Programming at the University of Kent . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
8.4 Foundations and Methods Group at Trinity College Dublin . . . . . . . . . . . . . . . . . . . . . . 64
8.5 Formal Methods at DFKI Bremen and University of Bremen . . . . . . . . . . . . . . . . . . . . . 64
8.6 Haskell at K.U.Leuven, Belgium . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
8.7 Haskell in Romania . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
8.8 fp-syd: Functional Programming in Sydney, Australia. . . . . . . . . . . . . . . . . . . . . . . . . . 65
8.9 Functional Programming at Chalmers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

6
1 Information Sources
clarifications or by ruthlessly rewriting existing mate-
rial and penning new chapters.
1.1 The Monad.Reader
Thanks to the bold action of user Orzetta, the chap-
ter “Understanding monads” finally came to live. It is
Report by: Brent Yorgey
very useable now, though more work is needed to prop-
erly record the current lore about the zoo of standard
There are plenty of academic papers about Haskell and monads.
plenty of informative pages on the HaskellWiki. Unfor-
tunately, there is not much between the two extremes. Further reading
That is where The Monad.Reader tries to fit in: more
formal than a Wiki page, but more casual than a jour- ◦ http://en.wikibooks.org/wiki/Haskell
nal article. ◦ Mailing list: hwikibook@haskell.orgi
There are plenty of interesting ideas that maybe do
not warrant an academic publication—but that does 1.3 Oleg’s Mini tutorials and
not mean these ideas are not worth writing about! assorted small projects
Communicating ideas to a wide audience is much more
important than concealing them in some esoteric jour- Report by: Oleg Kiselyov
nal. Even if it has all been done before in the Journal
of Impossibly Complicated Theoretical Stuff, explain-
ing a neat idea about “warm fuzzy things” to the rest The collection of various Haskell mini tutorials and
of us can still be plain fun. assorted small projects (http://okmij.org/ftp/Haskell/)
The Monad.Reader is also a great place to write has received three additions:
about a tool or application that deserves more atten-
tion. Most programmers do not enjoy writing manuals; Typed Tagless Interpretations and Typed
writing a tutorial for The Monad.Reader, however, is Compilation
an excellent way to put your code in the limelight and
reach hundreds of potential users. This web page describes embeddings of typed domain-
Since the last HCAR there has been one new issue specific languages in Haskell, stressing type preserva-
and a change of editors, with Brent Yorgey taking over tion, typed compilation, and multiple interpretations.
editorial duties from Wouter Swierstra. The next issue Type preservation statically and patently assures that
will be published in January. interpreters never get stuck and hence run more effi-
ciently. By ‘typed compilation’ we mean a transforma-
tion from an untyped to typed tagless representations.
Further reading
The untyped form is an AST (represented as a regular
http://themonadreader.wordpress.com/ data type), which is usually the result of parsing a file
or similar plain data. The typed tagless representation
takes the form of either generalized algebraic data types
1.2 Haskell Wikibook
GADT (the initial approach), or alternatively, type-
Report by: Heinrich Apfelmus constructor-polymorphic terms (the final approach).
Participants: Orzetto, David House, Eric Kow, and Either type representation can be interpreted in var-
other contributors ious ways (e.g., evaluated, CPS-transformed, partially
Status: active development evaluated, etc). All these interpretations are assuredly
type-preserving and patently free of any ‘type errors’
such as failure to pattern-match type tags or derefer-
The goal of the Haskell wikibook project is to build a encing an unbound variable.
community textbook about Haskell that is at once free We show three examples of typed compilation:
(as in freedom and in beer), gentle, and comprehen-
sive. We think that the many marvelous ideas of lazy Staged Typed Compilation into GADT using typeclasses
functional programming can and thus should be acces- A typed compiler is the function of the signature
sible to everyone in a central place. In particular, the Expr -> Term t, where Expr is an ordinary alge-
wikibook aims to answer all those conceptual questions braic data type of untyped first-order source terms
that are frequently asked on the Haskell mailing lists. and Term t is a GADT. The result type t is a
Everyone including you, dear reader, are invited to function of the value of Expr. Thus we demonstrate
contribute, be it by spotting mistakes and asking for the Haskell solution of the truly dependent-type

7
problem. We use template Haskell to implement the bit strings. Furthermore, for so-called sparse predi-
compiler, so that we get the Haskell type checker cates, Martín Escardó’s technique is very fast.
itself to type check the embedded DSL. We re-formulate the problem in terms of streams and
depth-limited depth-first search, and thus cast off the
Typed compilation to tagless-final HOAS The embed- mystery of deciding the satisfiability of a total com-
ded DSL is now higher-order: it is simply-typed putable predicate over the set of all Cantor numerals.
lambda-calculus with the fixpoint and constants — As an additional contribution, we show how to write
essentially, PCF. We no longer use staging. Rather, functions over Cantor numerals in a ‘natural’ monadic
we compile to tagless-final representation, which can style so that those functions become self-partially eval-
be interpreted by different interpreters. Regardless uating. The instantiation of the functions in an appro-
of the number of interpretations of a term, the type priate pure monad gives us transparent memoization,
checking happens only once. We build our own Dy- without any changes to the functions themselves. The
namics to encapsulate typed terms and represent monad in question is pure and involves no reference
their types. cells. The code is in Haskell 98.
Typed compilation via GADTs This time, we compile http://okmij.org/ftp/Algorithms.html#total-sp
the same higher-order DSL to the HOAS tagless-
initial representation: GADT. The compiler itself is
implemented via GADTs.
1.4 Haskell Cheat Sheet

The web page also relates Final and Initial typed Report by: Justin Bailey
tagless representations: they are related by bijection.
http://okmij.org/ftp/Computation/tagless-typed.html
The “Haskell Cheat Sheet” covers the syntax, key-
words, and other language elements of Haskell 98. It
Delimited continuations with effect typing, full is intended for beginning to intermediate Haskell pro-
soundness, answer-type modification and grammers and can even serve as a memory aid to ex-
polymorphism perts. The cheat sheet is distributed as a PDF and lit-
erate source file. A Spanish translation is also available.
We describe the implementations of Asai and
Kameyama’s calculus of polymorphic delimited con-
tinuations with effect typing, answer-type modification Further reading
and polymorphism. The calculus has greatly desirable
properties of strong soundness (well-typed terms do not http://cheatsheet.codeslower.com
give any run-time exceptions), principal types, type
inference, preservation of types and equality through
CPS translation, confluence, and strong normalization 1.5 The Happstack Tutorial
for the subcalculus without fix.
Our Haskell 98 code is the first implementation of Report by: Creighton Hogg
delimited continuations with answer-type modification,
The Happstack Tutorial aims to be a definitive, up-to-
polymorphism, effect typing, and type inference in
date, resource for how to use the Happstack libraries.
a widely available language. Thanks to parameter-
I have recently taken over the project from Thomas
ized (generalized) monads the implementation is the
Hartman. An instance of the Happstack Tutorial is
straightforward translation of the rules of the calculus.
running as a stand-alone website, but in order to truly
Matthieu Sozeau has defined a generalized monad type-
dig into writing Happstack applications you can cabal
class in the recent version of Coq and so implemented
install it from Hackage and experiment with it locally.
the calculus along with the type-safe sprintf in Coq.
Happstack Tutorial is updated along with the Happ-
http://okmij.org/ftp/Continuations.html#genuine-shift stack Hackage releases, but the darcs head is generally
compatible with the darcs head of Happstack.
Total stream processors and their applications to all I am adding a few small tutorials to the package with
infinite streams every release and am always looking for more feedback
from beginning Happstack users.
In the article on seemingly impossible functional pro-
grams, Martín Escardó wrote about decidable checking
of satisfaction of a total computable predicate on Can- Further reading
tor numerals. The latter represent infinite bit strings,
or all real numbers within [0,1]. Martín Escardó’s tech- ◦ http://tutorial.happstack.com
nique can tell, in finite time, if a given total com- ◦ http://patch-tag.com/repo/happstack-tutorial
putable predicate is satisfied over all possible infinite

8
1.6 Practice of Functional Programming

Report by: Dmitry Astapov


Participants: Lev Walkin, Roman Dushkin, Eugene
Kirpichov, Alex Ott, Alex Samoylovich,
Kirill Zaborski, Serguey Zefirov, Dmitry
Zuikov
Status: collecting materials for issue #3
Further reading
http://ro-che.info/ccc/

“Practice of Functional Programing” is a Russian elec-


tronic magazine promoting functional programming,
with articles that cover both theoretical and practical
aspects of the craft. Most of the material of the already
published issues is directly related to Haskell.
The magazine aims to have a bi-monthly release
schedule, with Issue #3 slated for release at the end
of November 2009.
Full contents of current and past issues are available
in PDF from the official site of the magazine free of
charge.
Articles are in Russian, with English annotations.

Further reading
http://fprog.ru for issues #1 and #2

1.7 Cartesian Closed Comic


Report by: Roman Cheplyaka
Participants: Maria Kovalyova
Cartesian Closed Comic, or CCC, is a webcomic about
Haskell, the Haskell community, and anything else re-
lated to Haskell. It is published irregularly. The comic
is often inspired by “Quotes of the week” published in
Haskell Weekly News. New strips are posted to the
Haskell reddit and Planet Haskell. The archives are
also available.
Here goes a special edition of the CCC devoted to
the Haskell Communities and Activities Report.

9
2 Implementations

◦ The I/O libraries are now Unicode-aware, so your


Haskell programs should now handle text files con-
2.1 The Glasgow Haskell Compiler
taining non-ascii characters, without special effort.
Report by: Simon Peyton Jones ◦ The package system has been made more robust,
Participants: many others by associating each installed package with a unique
identifier based on its exposed ABI. Now, cases where
We are just about to make our annual major release, of the user re-installs a package without recompiling
GHC 6.12.1 (in the following we will say “GHC 6.12” packages that depend on it will be detected, and the
to refer to GHC 6.12.1 and future patch-level releases packages with broken dependencies will be disabled.
along the 6.12 branch). Previously, this would lead to obscure compilation
GHC continues to be very active, with many oppor- errors, or worse, segfaulting programs.
tunities for others to get involved. We are particularly This change involved a lot of internal restructuring,
eager to find partners who are willing to take respon- but it paves the way for future improvements to the
sibility for a particular platform (e.g. Sparc/Solaris, way packages are handled. For instance, in the future
currently maintained by Ben Lippmeier); see http: we expect to track profiled packages independently
//hackage.haskell.org/trac/ghc/wiki/Platforms. of non-profiled ones, and we hope to make it possi-
ble to upgrade a package in an ABI-compatible way,
The GHC 6.12 release without recompiling the packages that depend on it.
This latter facility will be especially important as we
We usually try to make a major release of GHC im-
move towards using more shared libraries.
mediately after ICFP. It has been somewhat delayed
this year, but we expect to release GHC 6.12 during ◦ There are a variety of small language changes, in-
November or December 2009. Apart from the myriad cluding
of new bug fixes and minor enhancements, the big new
– Some improvements to data types: record pun-
things in 6.12 are:
ning, declaring constructors with class con-
◦ Considerably improved support for parallel execu- straints, GADT syntax for type families etc.
tion. GHC 6.10 would execute parallel Haskell pro- – You can omit the “$” in a top-level Template
grams, but performance was often not very good. Si- Haskell splice, which makes the TH call look
mon Marlow has done lots of performance tuning in more like an ordinary top-level declaration with
6.12, removing many of the accidental (and largely a new keyword.
invisible) gotchas that made parallel programs run – We are are deprecating mdo for recursive do-
slowly. notation, in favour of the more expressive rec
◦ As part of this parallel-performance tuning, Satnam statement.
Singh and Simon Marlow have developed Thread- – We have concluded that the implementation
Scope, a GUI that lets you see what is going on inside of impredicative polymorphism is unsustainably
your parallel program. It is a huge step forward from complicated, so we are re-trenching. It will be
“It takes 4 seconds with 1 processor, and 3 seconds deprecated in 6.12 (but will still work), and will
with 8 processors; now what?”. ThreadScope will be be either removed or replaced with something
released separately from GHC, but at more or less simpler in 6.14.
the same time as GHC 6.12.
For more detail, see the release notes in the 6.12
◦ Dynamic linking is now supported on Linux, and User manual (http://www.haskell.org/ghc/dist/current/
support for other platforms will follow. Thanks for docs/html/users_guide/index.html), which mention
this most recently go to the Industrial Haskell Group many things skipped over here.
(→ 7.8) who pushed it into a fully-working state; dy- Internally, GHC 6.12 has a totally re-engineered
namic linking is the culmination of the work of sev- build system, with much-improved dependency
eral people over recent years. One effect of dynamic tracking (http://hackage.haskell.org/trac/ghc/wiki/
linking is that binaries shrink dramatically, because Building). While there have been lots of teething
the run-time system and libraries are shared. Per- problems, things are settling down and the new system
haps more importantly, it is possible to make dy- is a huge improvement over the old one. The main
namic plugins from Haskell code that can be used improvement is that you can usually just say make,
from other applications. and everything will be brought up to date (before it

10
was often necessary to make clean first). Another and the newtype-deriving can persuade GHC to gener-
improvement is that the new system exposes much ate type-unsound code. It has remained un-fixed be-
more parallelism in the build, so GHC builds faster on cause the obvious approaches seem to be hacks, so the
multicores. cure was as bad as the disease. We think we are on to
something; stay tuned.
GHC and the Haskell platform
Intermediate language and optimisation
Another big change with GHC 6.12 is that Hackage
and the Haskell Platform are allowing GHC HQ to get Although it is, by design, invisible to users, GHC’s in-
out of the libraries business. So the plan is: termediate language and optimisation passes have been
receiving quite a bit of attention. Some highlights:
◦ We release GHC 6.12 with very few libraries.
◦ Read Max Bolingbroke’s paper on Strict Core
◦ Bill Library Author downloads GHC 6.12 and tests [MaxB], a possible new intermediate language for
his libraries. GHC. Adopting Strict Core would be a Big Change,
◦ The next Haskell Platform release packages GHC however, and we have not decided to do so (yet).
6.12 with these tested libraries. ◦ Simon PJ totally re-engineered the way that
◦ Joe User downloads the Haskell Platform. INLINE pragmas are implemented, with the
goal of making them more robust and pre-
◦ Four months later there is a new HP release, still dictable (http://www.haskell.org/pipermail/cvs-ghc/
with GHC 6.12, but with more or better libraries. 2009-October/050881.html). There is a new CON-
The HP release cycle is decoupled from GHC. LIKE pragma which affects rule matching.
So if you are Joe User, you want to wait for the HP re- ◦ Peter Jonsson did an internship in which he made
lease. Do not grab the GHC 6.12 release. It will be per- a start on turning GHC into a supercompiler. Neil
fectly usable, but only if you use (an up to date) cabal- Mitchell’s terrific PhD thesis suggested that super-
install to download libraries, and accept that they may compliation works well for Haskell [NeilM], and Pe-
not be tested with GHC 6.12. ter has been working on supercompilation for Tim-
ber (→ 3.2.4) as part of his own PhD [PeterJ]. The
What is hot for the next year GHC version is not ready for prime time yet, but
Simon PJ (now educated by Peter and Neil) is keen
GHC continues to be a great substrate for research. to pursue it.
Here are the main things we are working on at the
moment. ◦ An internal change in GHC 6.12 is the addition
of “annotations”, a general-purpose way for a pro-
Type systems grammer to add annotations to top-level definitions
that can be consulted by a core-to-core pass, and
Type families have proved a great success. From the for a core-to-core pass to pass information to its
outside it might seem that they are done — after all, successors (http://hackage.haskell.org/trac/ghc/wiki/
they are in GHC 6.10 — but the internals are quite frag- Annotations). We expect to use these annotations in-
ile and it is amazing that it all works as well as it does. creasingly in GHC itself.
(Thanks to Manuel’s work.) Tom Schrijvers, Dimitrios
Vytiniotis, Martin Sulzmann, and Manuel Chakravarty
Parallelism
have been working with Simon PJ to understand the
fundamentals and, in the light of that insight, to re- Most of the changes in this area in GHC 6.12.1 were
engineer the implementation into something more ro- described in our ICFP’09 paper “Runtime Support for
bust. We have developed the “OutsideIn” algorithm, Multicore Haskell” [ICFP09b]. The highlights:
which gives a much nicer account of type inference than
our previous story of type inference. The new approach ◦ Load-balancing of sparks is now based on lock-free
is described in “Complete and Decidable Type Infer- work-stealing queues.
ence for GADTs” [ICFP09a]. More controversially, we ◦ The overhead for running a spark is significantly less,
now believe that local let/where bindings should not be so GHC can take advantage of finer-grained paral-
generalised — see “Let should not be generalised” [Let- lelism
Gen]. Dimitrios is building a prototype that embodies
these ideas, which we will then transfer into GHC. ◦ The parallel GC is now much more locality-aware.
Meanwhile, Dimitrios, Simon, and Stephanie Weirich We now do parallel GC in young-generation collec-
are also working on fixing one of GHC’s more em- tions by default, mainly to avoid destroying locality
barrassing bugs (http://hackage.haskell.org/trac/ghc/ by moving data out of the CPU cache on which it
ticket/1496), whereby an interaction of type families is needed. Young-generation collections are parallel

11
but not load-balanced. There are new RTS flags to Code generation
control parallel GC behaviour.
For the last two years we have been advertising a major
◦ Various other minor performance tweaks. upheaval in GHC’s back end. Currently a monolithic
“code generator” converts lambda code (the STG lan-
In the future we plan to focus on the GC, with the main guage) into flat C–; “flat” in the sense that the stack
goal being to implement independent per-CPU collec- is manifested, and there are no function calls. The
tion. The other area we plan to look at is changing the upheaval splits this into a pipeline of passes, with a
GC policy for sparks, as described in our ICFP’09 pa- relatively-simple conversion of lambda code into C–
per; this will need a corresponding change to the Strate- (with function calls), followed by a succession of passes
gies library to avoid relying on the current “sparks are that optimise this code, and flatten it (by manifesting
roots” GC policy, which causes difficulties for writing the stack and removing calls).
parallel code that exploits speculation. John Dias is the principal architect of this new path,
and it is in GHC already; you can switch it on by say-
Data Parallelism ing -fnew-codegen. What remains is (a) to make it
Data Parallel Haskell has seen few user-visible changes work 100% (currently 99%, which is not good enough);
since the last report. Nevertheless, Roman Leshchin- (b) commit to it, which will allow us to remove gar-
skiy has been busy improving many of the fundamen- gantuan quantities of cruft; (c) exploit it, by imple-
tal building blocks behind the scenes. These changes menting cool new optimisations at the C– level; (d)
were necessary as DPH was able to generate very fast take it further by integrating the native code gen-
parallel code for simple examples, but the optimisa- erators into the same pipeline. You can read more
tion infrastructure was too fragile — i.e., small changes on the wiki (http://hackage.haskell.org/trac/ghc/wiki/
to other parts of GHC (most notably, the Simplifier) Commentary/Compiler/NewCodeGenPipeline).
or to the DPH libraries could lead to dramatic per- Several passes of the new code generation pipeline
formance regressions. Over the last few months, Ro- are supported by Hoopl, a Haskell library that makes
man has been working on making the system more it easy to write dataflow analyses and optimisations
robust, while Simon PJ improved and extended parts over C– code [Hoopl]. We think Hoopl is pretty cool,
of GHC’s existing optimisation infrastructure (such as and have well-advanced ideas for how to improve it a
the Inliner and other aspects of the Simplifier) to sup- lot more.
port Roman’s efforts. As a first consequence of this All of this has taken longer than we hoped. Once
recent work, the divide-and-conquer quickhull bench- the new pipeline is in place we hope that others will
mark (computing a convex hull) is now significantly join in. For example, David Terei did an interesting
faster than the corresponding list-based implementa- undergraduate project on using LLVM as a back end
tion (http://darcs.haskell.org/packages/dph/examples/ for GHC [Terei], and Krzysztof Wos is just beginning
quickhull/QuickHullVect.hs). This is an important mile- an undergraduate project on optimisation in the new
stone as quickhull uses dynamically nested parallelism pipeline. We are particularly grateful to Ben Lippmeier
whose depth is not statically bound. for his work on the SPARC native code generator.
Gabriele Keller implemented a first prototype of a
new library API for regular multi-dimensional arrays Bibliography
to complement the existing irregular, nested arrays.
For regular computations on dense matrices, relax- ICFP09a Complete and Decidable Type Inference for
ation methods and similar, regular arrays (as opposed GADTs. Tom Schrijvers, Simon Peyton Jones, Mar-
to nested arrays) are more convenient and expose ad- tin Sulzmann, and Dimitrios Vytiniotis. ICFP’09.
ditional opportunities for optimisation. Gabriele ob- http://research.microsoft.com/~simonpj/papers/gadt
tained very encouraging first results with a sequential ICFP09b Runtime Support for Multicore Haskell. Si-
version that uses a new fusion technique, which we are mon Marlow, Satnam Singh, and Simon Peyton
calling delayed arrays [RegLibBench]. Jones. ICFP’09. http://www.haskell.org/~simonmar/
In parallel with the implementation of regular, bib/multicore-ghc-09_abstract.html
multi-dimensional arrays as part of DPH, Sean
Lee and Manuel Chakravarty are implementing al- LetGen Let should not be generalized. Dimitrios Vy-
most the same regular-array API as an EDSL in tiniotis, Simon Peyton Jones, and Tom Schrijvers.
Data.Array.Accelerate. The EDSL implementation re- TLDI’10. http://research.microsoft.com/~simonpj/
stricts the expressiveness of the array language, but at papers/constraints/index.htm
the same time enables us to experiment with more am-
bitious backends — especially with GPU code genera- Hoopl Hoopl: dataflow optimisation made simple.
tion via CUDA and related technologies. More details Norman Ramsey, John Dias, and Simon Peyton
are in the video of Manuel’s talk from the Haskell Im- Jones. Rejected by POPL’10. http://research.
plementors Workshop in Edinburgh [AccelerateTalk]. microsoft.com/~simonpj/papers/c--

12
Terei Low Level Virtual Machine for Glasgow Haskell type inferencing and code generating still need to be
Compiler. David A. Terei, BSc Thesis. http://www. added. The work on the documentation has progressed
cse.unsw.edu.au/~pls/thesis/davidt-thesis.pdf quite a bit, but there has been little testing thus far,
especially on a platform such as Windows.
MaxB Types are calling conventions. Max Boling-
broke and Simon Peyton Jones. Haskell Sym-
posium 2009. http://www.cl.cam.ac.uk/~mb566/ 2.3 UHC, Utrecht Haskell Compiler
papers/tacc-hs09.pdf
Report by: Atze Dijkstra
NeilM Transformation and Analysis of Functional Pro- Participants: Jeroen Fokker, Doaitse Swierstra, Arie
grams. Neil Mitchell, PhD thesis, University of York, Middelkoop, Lucília Camarão de
2009. http://community.haskell.org/~ndm/thesis/ Figueiredo, Carlos Camarão de Figueiredo,
Vincent van Oostrum, Clemens
PeterJ Positive supercompliation for a higher order Grabmayer, Tom Lokhorst, Jeroen
call-by-value language. Peter Jonsson and Johan Leeuwestein, Atze van der Ploeg, Paul van
Nordlander. POPL’09. http://www.csee.ltu.se/~pj/ der Ende
papers/scp/index.html Status: active development

RegLibBench Dense matrix-matrix multiplica-


tion benchmark with delayed, regular ar- UHC, what is new? UHC is the Utrecht Haskell
rays. http://www.scribd.com/doc/22091707/ Compiler, supporting almost all Haskell 98 features
Delayed-Regular-Arrays-Sep09 plus experimental extensions. The first release of UHC
was announced on April 18, 2009, at the 5th Haskell
AccelerateTalk Haskell Array, Accelerated (Using Hackathon, held in Utrecht.
GPUs). Manuel M T Chakravarty, presented Since then we have been working on:
at the Haskell Implementors Workshop 2009,
Edinburgh. http://justtesting.posterous.com/ ◦ A new garbage collector (GC) to replace the Boehm
running-haskell-array-computations-on-a-gpu GC we have been using. The new GC is constructed
relatively independent of the UHC runtime system,
so as to allow multiple backends to plugin backend
specific info, e.g., about the memory layout of mem-
2.2 The Helium compiler ory cells. The new GC is used by the bytecode in-
terpreter backend (Atze Dijkstra).
Report by: Jurriaan Hage
Participants: Bastiaan Heeren, Arie Middelkoop ◦ Making nofib testsuite examples run. This also has
Helium is a compiler that supports a substantial sub- been the driving force and testbed for the new GC
set of Haskell 98 (but, e.g., n+k patterns are missing). (Jeroen Fokker).
Type classes are restricted to a number of built-in type ◦ Typed core, which combines GHC’s core language
classes and all instances are derived. The advantage of with Henk and recent work on types as calling con-
Helium is that it generates novice friendly error feed- ventions (Atze Dijkstra).
back. The latest versions of the Helium compiler are
available for download from the new website located
UHC, what do we plan? Soon we start working on
at http://www.cs.uu.nl/wiki/Helium. This website also
the research grant for “Realising Optimal Sharing”,
explains in detail what Helium is about, what it offers,
based on work by Vincent van Oostrum and Clemens
and what we plan to do in the near and far future.
Grabmayer.
We are still working on making version 1.7 available,
We plan a next release of UHC with the new garbage
mainly a matter of updating the documentation and
collector and various bugfixes. We had hoped to offer
testing the system. Internally little has changed, but
a complete Haskell 98 library and Cabal support, but
the interface to the system has been standardized, and
likely this will have to wait for a subsequent release.
the functionality of the interpreters has been improved
Furthermore, the following student projects are un-
and made consistent. We have made new options avail-
derway or soon start:
able (such as those that govern where programs are
logged to). The use of Helium from the interpreters is ◦ Various static analyses on typed core (Tom
now governed by a configuration file, which makes the Lokhorst).
use of Helium from the interpreters quite transparent
for the programmer. It is also possible to use differ- ◦ Incrementalization of whole program analysis
ent versions of Helium side by side (motivated by the (Jeroen Leeuwestein).
development of Neon (→ 5.3.3)). ◦ Lazy closures (Atze van der Ploeg).
A student has added parsing and static checking for
type class and instance definitions to the language, but ◦ GC & LLVM (Paul van der Ende).

13
Finally, still going on are the following: ◦ Shuffle: http://www.cs.uu.nl/wiki/Ehc/Shuffle
◦ Ruler: http://www.cs.uu.nl/wiki/Ehc/Ruler
◦ GRIN backend, whole program analysis (Jeroen
Fokker).
2.4 Haskell frontend for the Clean
◦ Type system formalization and automatic generation compiler
from type rules (Lucília Camarão de Figueiredo, Arie
Middelkoop). Report by: Thomas van Noort
Participants: John van Groningen, Rinus Plasmeijer
Background info UHC actually is a series of com- Status: active development
pilers of which the last is UHC, plus an aspectwise We are currently working on a frontend for the Clean
organized infrastructure for facilitating experimenta- compiler (→ 3.2.3) that supports a subset of Haskell 98.
tion and extension. The end-user will probably only be This will allow Clean modules to import Haskell mod-
aware of UHC as a Haskell compiler, whereas compiler ules, and vice versa. Furthermore, we will be able to
writers will be more aware of the internals of UHC. use some of Clean’s features in Haskell code, and vice
For the description of UHC an Attribute Grammar versa. For example, we could define a Haskell module
system (→ 4.1.1) is used as well as other formalisms al- which uses Clean’s uniqueness typing, or a Clean mod-
lowing compact notation like parser combinators. For ule which uses Haskell’s newtypes. The possibilities are
the description of type rules, and the generation of an endless!
AG implementation for those type rules, we use the
Ruler system. For source code management we use Future plans
Shuffle, which allows partitioning the system into a se-
quence of steps and aspects. (Both Ruler and Shuffle Although a beta version of the new Clean compiler is
are included in UHC). released early this year to the institution in Nijmegen,
The implementation of UHC also tackles other issues: there is still a lot of work to do before we are able to
release it to the outside world. So we cannot make any
◦ To deal with the inherent complexity of a compiler, promises regarding the release date. Just keep an eye
the implementation of UHC is organized as a series on the Clean mailing lists for any important announce-
of increasingly complex steps. Each step corresponds ments!
to a Haskell subset which itself is an extension of the
previous step. The first step starts with the essen- Further reading
tials, namely typed lambda calculus; the last step
corresponds to UHC. http://wiki.clean.cs.ru.nl/Mailing_lists

◦ Independent of each step the implementation is or-


ganized into a set of aspects. Currently the type 2.5 SAPL, Simple Application
system and code generation are defined as aspects, Programming Language
which can then be left out so the remaining part can
be used as a barebones starting point. Report by: Jan Martin Jansen
Status: experimental, active development
◦ Each combination of step + aspects corresponds to SAPL is an experimental interpreter for a lazy func-
an actual, that is, an executable compiler. Each of tional intermediate language. The language is more or
these compilers is a compiler in its own right. less equivalent to the core language of Clean (→ 3.2.3).
◦ The description of the compiler uses code fragments SAPL implementations in C and Java exist. It is possi-
which are retrieved from the source code of the com- ble the write SAPL programs directly, but the preferred
pilers. In this way the description and source code use is to generate SAPL. We already implemented an
are kept synchronized. experimental version of the Clean compiler that gen-
erates SAPL as well. The Java version of the SAPL
Part of the description of the series of EH compilers interpreter can be loaded as a PlugIn in web applica-
is available as a PhD thesis. tions. Currently we use it to evaluate tasks from the
iTask system (→ 6.8.1) at the client side and to handle
Further reading (mouse) events generated by a drawing canvas PlugIn.

◦ UHC Homepage: http://www.cs.uu.nl/wiki/UHC/


Future plans
WebHome
◦ Attribute grammar system: http://www.cs.uu.nl/ For the near future we have planned to make the Clean
wiki/HUT/AttributeGrammarSystem to SAPL compiler available in the standard Clean dis-
◦ Parser combinators: http://www.cs.uu.nl/wiki/HUT/ tribution. Also some further performance improve-
ParserCombinators ments of SAPL are planned.

14
Further reading There is also a Haskell overlay providing another 300
packages. Thanks to the haskell developers using Cabal
◦ http://home.hetnet.nl/~janmartinjansen/saplinter
and Hackage (→ 5.1), we have been able to write a
◦ http://home.hetnet.nl/~janmartinjansen/lambda
tool called “hackport” (initiated by Henning Günther)
◦ http://www.st.cs.ru.nl/Onderzoek/Publicaties/
to generate Gentoo packages that rarely need much
publicaties.html
tweaking.
Read about the Gentoo Haskell Overlay at http://
2.6 The Reduceron haskell.org/haskellwiki/Gentoo. Using Darcs (→ 6.1.1),
it is easy to keep updated and send patches. It is
Report by: Matthew Naylor also available via the Gentoo overlay manager “lay-
Participants: Colin Runciman, Jason Reich man”. If you choose to use the overlay, then problems
Status: experimental should be reported on IRC (#gentoo-haskell on freen-
ode), where we coordinate development, or via email
Over the past year, work on the Reduceron has contin- hhaskell@gentoo.orgi.
ued, and we have reached our goal of improving runtime Through recent efforts we have devoped a tool called
performance by a factor of six! This has been achieved “haskell-updater” http://www.haskell.org/haskellwiki/
through many small improvements, spanning architec- Gentoo#haskell-updater. It helps the user when up-
tural, runtime, and compiler-level advances. grading GHC versions, fixes breakages from library up-
Two main by-products have emerged from the work. grades, etc.
First, York Lava, now available from Hackage, is the As always we are happy to get help hacking on the
HDL we use. It is very similar to Chalmers Lava, Gentoo Haskell framework, hackport, writing ebuilds,
but supports a greater variety of primitive components, and supporting users. Please contact us on IRC or
behavioural description, number-parameterised types, email if you are interested!
and a first attempt at a Lava prelude. Second, F-lite is
our subset of Haskell, with its own lightweight toolset. 2.7.2 Fedora Haskell SIG
There remain some avenues for exploration. We have
Report by: Jens Petersen
taken a step towards parallel reduction in the form of
Participants: Bryan Sullivan, Yaakov Nemoy, Zach
speculative evaluation of primitive redexes, but have Oglesby, Conrad Meyer, Fedora Haskell
not yet attempted the Reducera — multiple Reducerons SIG
running in parallel. And recently, Jason has been con- Status: on-going
tinuing his work on the F-lite supercompiler (→ 4.1.4),
which is now producing some really nice results.
Alas, the time to take stock and publish a full ac- The Fedora Haskell SIG is an effort to provide good
count of what we have already done is rapidly ap- support for Haskell in Fedora.
proaching! Fedora 12 has just shipped with ghc-6.10.4, haskell-
platform-2009.2.0.2, xmonad, and various new libraries
Further reading (cgi, editline, fgl, GLUT, network, OpenGL, tar, time,
utf8-string, X11-xft, xmonad-contrib).
◦ http://www.cs.york.ac.uk/fp/reduceron/ Fedora 13 is expected to ship with ghc-6.12 with
◦ http://hackage.haskell.org/package/york-lava/ shared libraries, and more new packages in about 6
months.
2.7 Platforms Contributions to Fedora Haskell are welcome: join
us on #fedora-haskell on Freenode IRC.
2.7.1 Haskell in Gentoo Linux
Further reading
Report by: Lennart Kolmodin
◦ http://fedoraproject.org/wiki/SIGs/Haskell
◦ http://fedoraproject.org/wiki/Documentation_
Gentoo Linux currently supports GHC 6.10.4, includ- Development_Tools_Beat#Haskell
ing the latest Haskell Platform (→ 5.2) for x86 and
amd64. For previous GHC versions we have binaries 2.7.3 GHC on OpenSPARC
available for alpha, amd64, hppa, ia64, sparc, and x86.
Browse the packages in portage at http://packages. Report by: Ben Lippmeier
gentoo.org/category/dev-haskell?full_cat. Participants: Duncan Coutts, Darryl Gove, Roman
The GHC architecture/version matrix is available at Leshchinskiy
Status: winding down
http://packages.gentoo.org/package/dev-lang/ghc.
Please report problems in the normal Gentoo bug Through January–April this year I repaired GHC’s
tracker at bugs.gentoo.org. back end support for the SPARC architecture, and

15
benchmarked its performance on haskell.org’s shiny
new SPARC T2 server. I also spent time refactoring
GHC’s native code generator to make it easier to un-
derstand and maintain, and thus less likely for pieces
to suffer bit-rot in the future.
The T2 architecture is interesting to functional pro-
grammers because of its highly multi-threaded nature.
The T2 has eight cores with eight hardware threads
each, for a total of 64 threads per processor. When one
of the threads suffers a cache miss, another can continue
on with little context switching overhead. All threads
on a particular core also share the same L1 cache, which
supports fast thread synchronization. This is a perfect
fit for parallel lazy functional programs, where mem-
ory traffic is high, but new threads are only a par
away. The following graph shows the performance of
the sumeuler benchmark from the nofib suite when run-
ning on the T2. Note that the performance scales al-
most linearly (perfectly) right up to the point where it
runs out of hardware threads.

The project is nearing completion, pending tying up


some loose ends, but the port is fully functional and
available in the current head branch. More informa-
tion, including benchmarking is obtainable form the
link below. The GHC on OpenSPARC project was gen-
erously funded by Sun Microsystems.

Further reading
http://ghcsparc.blogspot.com

16
3 Language

3.1 Extensions of Haskell various activities and develop the common parallel run-
time environment further.
3.1.1 Eden Parallel program executions can be visualized using
the Eden trace viewer tool EdenTV. Recent results
Report by: Rita Loogen show that the Eden system behaves equally well on
Participants: in Madrid: Ricardo Peña, Yolanda workstation clusters and on multi-core machines.
Ortega-Mallén, Mercedes Hidalgo,
Fernando Rubio, Alberto de la Encina,
Lidia Sánchez-Gil Recent and Forthcoming Publications
in Marburg: Jost Berthold, Mischa
◦ Mischa Dieterle, Thomas Horstmeyer, Rita Loogen:
Dieterle, Thomas Horstmeyer, Oleg
Skeleton Composition Using Remote Data, in: Prac-
Lobachev, Rita Loogen
Status: ongoing tical Aspects of Declarative Programming 2010
(PADL’10), Madrid, Spain, January 2010, Springer
LNCS, to appear.
Eden extends Haskell with a small set of syntactic con- ◦ Alberto de la Encina, I. Rodríguez, Fernando Ru-
structs for explicit process specification and creation. bio: pHood: A Tool to Analyze Parallel Func-
While providing enough control to implement paral- tional Programs, in: Symposium on the Implementa-
lel algorithms efficiently, it frees the programmer from tion and Application of Functional Languages (IFL)
the tedious task of managing low-level details by intro- 2009, Technical Report, SHU-TR-CS-2009-09-1, Se-
ducing automatic communication (via head-strict lazy ton Hall University, New York, USA, September
lists), synchronization, and process handling. 2009, 85–99.
Eden’s main constructs are process abstractions and ◦ Jost Berthold, Mischa Dieterle, and Rita Loogen:
process instantiations. The function process :: (a Implementing Parallel Google Map-Reduce in Eden,
-> b) -> Process a b embeds a function of type (a in: EuroPar 2009, Delft, NL, Springer LNCS 5704,
-> b) into a process abstraction of type Process a b 990–1002.
which, when instantiated, will be executed in paral- ◦ Jost Berthold, Mischa Dieterle, Oleg Lobachev, Rita
lel. Process instantiation is expressed by the prede- Loogen: Parallel FFT With Eden Skeletons, in
fined infix operator ( # ) :: Process a b -> a -> PaCT 2009, Novosibirsk, Russia, Springer LNCS
b. Higher-level coordination is achieved by defining 5698, 73–83.
skeletons, ranging from a simple parallel map to so- ◦ Jost Berthold, Simon Marlow, Abyd Al Zain, and
phisticated replicated-worker schemes. They have been Kevin Hammond: Comparing and optimising par-
used to parallelize a set of non-trivial benchmark pro- allel Haskell implementations on multicore, In To-
grams. moya Enokido et al.,editors, 3rd Int. Workshop on
Advanced Distributed and Parallel Network Applica-
tions (ADPNA-2009) IEEE Computer Society, 2009.
Survey and standard reference ◦ Lidia Sánchez-Gil, Mercedes Hidalgo-Herrero,
Rita Loogen, Yolanda Ortega-Mallén, and Ri- Yolanda Ortega-Mallén: An Operational Semantics
cardo Peña: Parallel Functional Programming in Eden, for Distributed Lazy Evaluation, Trends in Func-
Journal of Functional Programming 15(3), 2005, pages tional Programming, Volume 10, Intellect 2009, to
431–475. appear.
◦ Thomas Horstmeyer, Rita Loogen: Grace — Graph-
based Communication in Eden, Trends in Functional
Implementation Programming, Volume 10, Intellect 2009, to appear.
A major revision of the parallel Eden runtime envi-
ronment for GHC 6.8.1 is available from the Mar- Further reading
burg group on request. Support for Glasgow parallel http://www.mathematik.uni-marburg.de/~eden
Haskell (http://haskell.org/communities/05-2009/html/
report.html#sect3.1.2) is currently being added to this
version of the runtime environment. It is planned for 3.1.2 XHaskell project
the future to maintain a common parallel runtime en-
Report by: Martin Sulzmann
vironment for Eden, GpH, and other parallel Haskells. Participants: Kenny Zhuo Ming Lu
A parallel Haskell Hackathon will take place in St An- Status: stable
drews from December 10th till 12th, 2009 to join the

17
XHaskell is an extension of Haskell which combines Latest developments
parametric polymorphism, algebraic data types, and
type classes with XDuce style regular expression types, In this honors thesis, Olivier Pernet (a student of Susan
subtyping, and regular expression pattern matching. Eisenbach) provides a nicer monadic interface to the
The latest version can be downloaded via http://code. HaskellJoin library.
google.com/p/xhaskell/
Further reading
Latest developments http://sulzmann.blogspot.com/2008/12/
parallel-join-patterns-with-guards-and.html
The latest version of the library-based regular expres-
sion pattern matching component is available via the
google code web site. We are currently working on a 3.2 Related Languages
paper describing the key ideas of the approach.
3.2.1 Curry
3.1.3 HaskellActor Report by: Jan Christiansen
Participants: Bernd Braßel, Michael Hanus, Wolfgang
Report by: Martin Sulzmann
Lux, Sebastian Fischer, and others
Status: stable
Status: active development
Curry is a functional logic programming language with
The focus of the HaskellActor project is on Haskell syntax. In addition to the standard features of
Erlang-style concurrency abstractions. See for functional programming like higher-order functions and
details: http://sulzmann.blogspot.com/2008/10/ lazy evaluation, Curry supports features known from
actors-with-multi-headed-receive.html. logic programming. This includes programming with
Novel features of HaskellActor include non-determinism, free variables, constraints, declara-
tive concurrency, and the search for solutions. Al-
◦ Multi-headed receive clauses, with support for though Haskell and Curry share the same syntax, there
is one main difference with respect to how function dec-
◦ guards, and larations are interpreted. In Haskell the order in which
different rules are given in the source program has an
◦ propagation
effect on their meaning. In Curry, in contrast, the rules
The HaskellActor implementation (as a library ex- are interpreted as equations, and overlapping rules in-
tension to Haskell) is available via http://hackage. duce a non-deterministic choice and a search over the
haskell.org/cgi-bin/hackage-scripts/package/actor. resulting alternatives. Furthermore, Curry allows to
call functions with free variables as arguments so that
The implementation is stable, but there is plenty of
they are bound to those values that are demanded for
room for optimizations and extensions (e.g. regular
evaluation, thus providing for function inversion.
expressions in patterns). If this sounds interesting to
There are three major implementations of Curry.
anybody (students!), please contact me.
While the original implementation PAKCS (Portland
Aachen Kiel Curry System) compiles to Prolog, MCC
Latest developments (Münster Curry Compiler) generates native code via a
standard C compiler. The Kiel Curry System (KiCS)
We are currently working towards a distributed ver-
compiles Curry to Haskell aiming to provide nearly
sion of Haskell actor following the approach of Frank
as good performance for the purely functional part as
Huch, Ulrich Norbisrath: Distributed Programming in
modern compilers for Haskell do. From these imple-
Haskell with Ports, IFL’00.
mentations only MCC will provide type classes in the
near future. Type classes are not part of the current
3.1.4 HaskellJoin definition of Curry, though there is no conceptual con-
flict with the logic extensions.
Report by: Martin Sulzmann Recently, new compilation schemes for translating
Status: stable
Curry to Haskell have been developed that promise sig-
HaskellJoin is a (library) extension of Haskell to sup- nificant speedups compared to both the former KiCS
port join patterns. Novelties are implementation and other existing implementations of
Curry.
◦ guards and propagation in join patterns, There have been research activities in the area of
functional logic programming languages for more than
◦ efficient parallel execution model which exploits mul- a decade. Nevertheless, there are still a lot of inter-
tiple processor cores. esting research topics regarding more efficient compila-

18
tion techniques and even semantic questions in the area making real-world applications. Clean is the only func-
of language extensions like encapsulation and function tional language in the world which offers uniqueness
patterns. Besides activities regarding the language it- typing. This type system makes it possible in a pure
self, there is also an active development of tools con- functional language to incorporate destructive updates
cerning Curry (e.g., the documentation tool Curry- of arbitrary data structures (including arrays) and to
Doc, the analysis environment CurryBrowser, the ob- make direct interfaces to the outside imperative world.
servation debuggers COOSy and iCODE, the debugger Here is a short list with notable features:
B.I.O. (http://www-ps.informatik.uni-kiel.de/currywiki/
tools/oracle_debugger), EasyCheck (http://haskell.org/ ◦ Clean is a lazy, pure, and higher-order functional pro-
communities/05-2009/html/report.html#sect4.3.2), and gramming language with explicit graph rewriting se-
CyCoTest). Because Curry has a functional subset, mantics.
these tools can canonically be transferred to the func-
◦ Although Clean is by default a lazy language, one can
tional world.
smoothly turn it into a strict language to obtain op-
timal time/space behavior: functions can be defined
Further reading lazy as well as (partially) strict in their arguments;
any (recursive) data structure can be defined lazy as
◦ http://www.curry-language.org/
well as (partially) strict in any of its arguments.
◦ http://wiki.curry-language.org/
◦ Clean is a strongly typed language based on an ex-
3.2.2 Agda tension of the well-known Milner/Hindley/Mycroft
type inferencing/checking scheme including the com-
Report by: Nils Anders Danielsson mon higher-order types, polymorphic types, abstract
Participants: Ulf Norell and many others types, algebraic types, type synonyms, and existen-
Status: actively developed tially quantified types.
◦ The uniqueness type system in Clean makes it possi-
Agda is a dependently typed functional programming ble to develop efficient applications. In particular, it
language (developed using Haskell). A central feature allows a refined control over the single threaded use
of Agda is inductive families, i.e. GADTs which can be of objects which can influence the time and space
indexed by values and not just types. The language behavior of programs. The uniqueness type system
also supports coinductive types, parameterized mod- can be also used to incorporate destructive updates
ules, and mixfix operators, and comes with an interac- of objects within a pure functional framework. It al-
tive interface—the type checker can assist you in the lows destructive transformation of state information
development of your code. and enables efficient interfacing to the non-functional
A lot of work remains in order for Agda to become a world (to C but also to I/O systems like X-Windows)
full-fledged programming language (good libraries, ma- offering direct access to file systems and operating
ture compilers, documentation, etc.), but already in its systems.
current state it can provide lots of fun as a platform
for experiments in dependently typed programming. ◦ The Clean type system supports dynamic types, al-
New since last time: lowing values of arbitrary types to be wrapped in a
uniform package and unwrapped via a type anno-
◦ Version 2.2.4 has been released. tation at run-time. Using dynamics, code and data
can be exchanged between Clean applications in a
◦ Agda is now available in Ubuntu. flexible and type-safe way.
◦ Darin Morrison is currently extending Cabal to sup- ◦ Clean supports type classes and type constructor
port Agda code. classes to make overloaded use of functions and op-
erators possible.
Further reading
◦ Clean offers records and (destructively updateable)
The Agda Wiki: http://wiki.portal.chalmers.se/agda/ arrays and files.
◦ Clean has pattern matching, guards, list comprehen-
3.2.3 Clean sions, array comprehensions and a lay-out sensitive
Report by: Thomas van Noort
mode.
Participants: Rinus Plasmeijer, John van Groningen◦ Clean offers a sophisticated I/O library with which
Status: active development
window based interactive applications (and the han-
Clean is a general purpose, state-of-the-art, pure and dling of menus, dialogs, windows, mouse, keyboard,
lazy functional programming language designed for timers, and events raised by sub-applications) can

19
be specified compactly and elegantly on a very high timber-lang.org. A bug-fix release (v 1.0.3) was made
level of abstraction. available in May 2009.
The current source code repository (also available
◦ There is a Clean IDE and there are many libraries on-line) includes a new way of organizing external in-
available offering additional functionality. terfaces, which separates access to OS, hardware or li-
brary services from the definition of a particular run-
Future plans time system. This move greatly simplifies the construc-
tion of both external bindings and cross-compilation
Please see the entry on a Haskell frontend for the Clean targets, which is utilized in on-going development of
compiler (→ 2.4) for the future plans. Xlib, OpenGL, iPhone as well as ARM7 support.
Other active projects include interfacing the compiler
Further reading to memory and execution-time analysis tools, extend-
ing it with a supercompilation pass, and taking a fun-
◦ http://clean.cs.ru.nl/
damental grip on the generation of type error messages.
◦ http://wiki.clean.cs.ru.nl/
The latter work will be based on principles developed
for the Helium compiler (→ 2.2).
3.2.4 Timber
Report by: Johan Nordlander Further reading
Participants: Björn von Sydow, Andy Gill, Magnus
Carlsson, Per Lindgren, Thomas Hallgren, http:://timber-lang.org
and others
Status: actively developed 3.2.5 Ur/Web

Report by: Adam Chlipala


Timber is a general programming language derived Status: beta release
from Haskell, with the specific aim of supporting devel-
opment of complex event-driven systems. It allows pro- Ur/Web is a domain-specific language for building
grams to be conveniently structured in terms of objects modern web applications. It is built on top of the
and reactions, and the real-time behavior of reactions Ur language as a custom standard library with special
can furthermore be precisely controlled via platform- compiler support. Ur draws inspiration from a num-
independent timing constraints. This property makes ber of sources in the world of statically-typed func-
Timber particularly suited to both the specification and tional programming. From Haskell, Ur takes purity,
the implementation of real-time embedded systems. type classes, and monadic IO. From ML, Ur takes ea-
Timber shares most of Haskell’s syntax but intro- gerness and a module system with functors and type
duces new primitive constructs for defining classes of re- abstraction. From the world of dependently-typed pro-
active objects and their methods. These constructs live gramming, Ur takes a rich notion of type-level compu-
in the Cmd monad, which is a replacement of Haskell’s tation.
top-level monad offering mutable encapsulated state, The Ur/Web extensions support the core features
implicit concurrency with automatic mutual exclusion, of today’s web applications: “Web 1.0” programming
synchronous as well as asynchronous communication, with links and forms, “Web 2.0” programming with
and deadline-based scheduling. In addition, the Tim- non-trivial client-side code, and interaction with SQL
ber type system supports nominal subtyping between database backends. Considering programmer produc-
records as well as datatypes, in the style of its precursor tivity, security, and scalability, Ur/Web has signifi-
O’Haskell. cant advantages over the mainstream web frameworks.
A particularly notable difference between Haskell Novel facilities for statically-typed metaprogramming
and Timber is that Timber uses a strict evaluation or- enable new styles of abstraction and modularity. The
der. This choice has primarily been motivated by a type system guarantees that all kinds of code inter-
desire to facilitate more predictable execution times, pretable by browsers or database servers are treated as
but it also brings Timber closer to the efficiency of tra- richly-typed syntax trees (along the lines of familiar ex-
ditional execution models. Still, Timber retains the amples of GADTs), rather than as “strings”, thwarting
purely functional characteristic of Haskell, and also code injection attacks. The whole-program optimizing
supports construction of recursive structures of arbi- compiler generates fast native code which does not need
trary type in a declarative way. garbage collection.
The first public release of the Timber compiler was The open source toolset is in beta release now and
announced in December 2008. It uses the Gnu C should be usable for real projects. I expect the core
compiler as its back-end and targets POSIX-based feature set to change little in the near future, and the
operating systems. Binary installers for Linux and next few releases will probably focus on bug fixes and
MacOS X can be downloaded from the Timber web site browser compatibility.

20
Further reading 3.3.2 The Disciplined Disciple Compiler (DDC)

http://www.impredicative.com/ur/ Report by: Ben Lippmeier


Status: alpha, active
See: http://haskell.org/communities/05-2009/html/
3.3 Type System / Program Analysis report.html#sect3.3.2.

3.3.1 Free Theorems for Haskell (and Curry)

Report by: Janis Voigtländer


Participants: Daniel Seidel, Jan Christiansen

Free theorems are statements about program behav-


ior derived from (polymorphic) types. Their origin is
the polymorphic lambda-calculus, but they have also
been applied to programs in more realistic languages
like Haskell. Since there is a semantic gap between the
original calculus and modern functional languages, the
underlying theory (of relational parametricity) needs
to be refined and extended. We aim to provide such
new theoretical foundations, as well as to apply the
theoretical results to practical problems. Recent pub-
lications are “Taming Selective Strictness” (ATPS’09)
and “Free Theorems for Functional Logic Programs”
(PLPV’10). The latter, joint work with Jan Chris-
tiansen, considers the situation when moving from
Haskell to Curry (→ 3.2.1).
On the practical side, we maintain a library and tools
for generating free theorems from Haskell types, origi-
nally implemented by Sascha Böhme and with contri-
butions from Joachim Breitner. Both the library and
a shell-based tool are available from Hackage (as free-
theorems and ftshell, respectively). There is also a web-
based tool at http://linux.tcs.inf.tu-dresden.de/~voigt/
ft. General features include:

◦ three different language subsets to choose from

◦ equational as well as inequational free theorems

◦ relational free theorems as well as specializations


down to function level

◦ support for algebraic data types, type synonyms and


renamings, type classes

While the web-based tool is restricted to algebraic data


types, type synonyms, and type classes from Haskell
standard libraries, the shell-based tool also enables the
user to declare their own algebraic data types and so
on, and then to derive free theorems from types involv-
ing those. A distinctive feature of the web-based tool
is to export the generated theorems in PDF format.
By popular demand (≥ 1 person), now also the LATEX
source for that PDF can be obtained as output.

Further reading
http://www.iai.uni-bonn.de/~jv/project/

21
4 Tools
4.1 Transforming and Generating types, avoid the trade-off which arises when building
software incrementally: should it be easy to add new
4.1.1 UUAG data types and data type alternatives or to add new
operations on existing data types? However, AGs are
Report by: Arie Middelkoop
Participants: ST Group of Utrecht University usually implemented as a pre-processor, leaving e.g.
Status: stable, maintained type checking to later processing phases and making
interactive development, proper error reporting and
debugging difficult. Embedding AG into Haskell as
UUAG is the Utrecht University Attribute Grammar a combinator library solves these problems. Previ-
system. It is a preprocessor for Haskell which makes ous attempts at embedding AGs as a domain-specific
it easy to write catamorphisms (that is, functions that language were based on extensible records and thus
do to any datatype what foldr does to lists). You can exploiting Haskell’s type system to check the well-
define tree walks using the intuitive concepts of inher- formedness of the AG, but fell short in compactness
ited and synthesized attributes, while keeping the full and the possibility to abstract over oft occurring AG
expressive power of Haskell. The generated tree walks patterns. Other attempts used a very generic map-
are efficient in both space and time. ping for which the AG well-formedness could not be
Idiomatic tree computations are neatly expressed in statically checked. We present a typed embedding of
terms of copy, default, and collection rules. Computed AG in Haskell satisfying all these requirements. The
results can masquerade as subtrees and be analyzed key lies in using HList-like typed heterogeneous collec-
accordingly. The order in which to visit the tree is tions (extensible polymorphic records) and expressing
derived automatically from the attribute computations; AG well-formedness conditions as type-level predicates
the tree walk is a single traversal from the perspective (i.e., typeclass constraints). By further type-level pro-
of the programmer. gramming we can also express common programming
The system is in use by a variety of large and small patterns, corresponding to the typical use cases of mon-
projects, such as the Utrecht Haskell Compiler UHC, ads such as Reader, Writer, and State. The paper
the editor Proxima for structured documents, the He- presents a realistic example of type-class-based type-
lium compiler (→ 2.2), the Generic Haskell compiler, level programming in Haskell.
and UUAG itself. The current version is 0.9.12 (Oc-
tober 2010), is extensively tested, and is available on Background
Hackage.
We recently added support for building AG files The approach taken in AspectAG was proposed by
through Cabal. A small Cabal plugin is installed upon Marcos Viera, Doaitse Swierstra, and Wouter Swier-
installation of UUAG, which provides a userhook that stra in the ICFP 2009 paper “Attribute Grammars Fly
deals with AG files and their dependencies. First-Class: How to do aspect oriented programming
in Haskell”.

Further reading
Further reading
◦ http://www.cs.uu.nl/wiki/bin/view/HUT/
http://www.cs.uu.nl/wiki/bin/view/Center/AspectAG
AttributeGrammarSystem
◦ http://hackage.haskell.org/package/uuagc-0.9.12
4.1.3 HFusion
4.1.2 AspectAG Report by: Facundo Dominguez
Participants: Alberto Pardo
Report by: Marcos Viera
Status: experimental
Participants: Doaitse Swierstra, Wouter Swierstra
Status: experimental
HFusion is an experimental tool for optimizing Haskell
AspectAG is a library of strongly typed Attribute programs. It is based on an algebraic approach where
Grammars implemented using type-level programming. functions are internally represented in terms of a recur-
sive program scheme known as hylomorphism. The tool
performs source to source transformations by the ap-
Introduction
plication of a program transformation technique called
Attribute Grammars (AGs), a general-purpose formal- fusion. The aim of fusion is to reduce memory manage-
ism for describing recursive computations over data ment effort by eliminating the intermediate data struc-

22
tures produced in function compositions. gains from mechanisms such as speculative evaluation
We offer a web interface to test the technique on user- of primitive redexes on the Reduceron architecture.
supplied recursive definitions. The user can ask HFu- Optimus Prime supercompilation has led to a 74%
sion to transform a composition of two functions into reduction in the number of Reduceron clock-cycles re-
an equivalent program which does not build the inter- quired to execute some micro-examples.
mediate data structure involved in the composition. In Work continues on improving the execution time
future developments of the tool we plan to find fusable of the supercompilation transformation and improving
compositions within programs automatically. the performance of the supercompiled programs.
In its current state, HFusion is able to fuse composi-
tions of general recursive functions, including primitive Contact
recursive functions like dropWhile or factorial, func-
tions that make recursion over multiple arguments like http://www.cs.york.ac.uk/people/?username=jason
zip, zipWith or equality predicates, mutually recursive
functions, and (with some limitations) functions with Further reading
accumulators like foldl. In general, HFusion is able to http://optimusprime.posterous.com/
eliminate intermediate data structures of regular data
types (sum-of-product types plus different forms of gen-
eralized trees). 4.1.5 Derive
Report by: Neil Mitchell
Status: v2.0
The Derive tool is used to generate formulaic instances
for data types. For example given a data type, the De-
rive tool can generate over 25 instances, including the
standard ones (Eq, Ord, Enum etc.) and others such
as Binary and Functor. Derive can be used with SYB,
Template Haskell or as a standalone preprocessor. This
tool serves a similar role to DrIFT, but with additional
features.

Further reading
http://community.haskell.org/~ndm/derive/

4.1.6 lhs2TEX
Further reading
Report by: Andres Löh
◦ Documentation about the tool can be found in HFu- Status: stable, maintained
sion home
◦ HFusion web interface is available from this URL
This tool by Ralf Hinze and Andres Löh is a pre-
processor that transforms literate Haskell code into
4.1.4 Optimus Prime LATEX documents. The output is highly customizable
by means of formatting directives that are interpreted
Report by: Jason Reich
Participants: Colin Runciman, Matthew Naylor by lhs2TEX. Other directives allow the selective inclu-
Status: experimental sion of program fragments, so that multiple versions
of a program and/or document can be produced from
Optimus Prime is project developing a supercompiler a common source. The input is parsed using a lib-
for programs written in F-lite, the subset of Haskell eral parser that can interpret many languages with a
used by the Reduceron (→ 2.6). It draws heavily on Haskell-like syntax, and does not restrict the user to
Neil Mitchell’s work on the Supero supercompiler for Haskell 98.
YHC Core. The program is stable and can take on large docu-
The project is still at the highly experimental stage ments.
but preliminary results are very encouraging. The pro- The current version is 1.14 and is soon going to be
cess appears to produce largely deforested programs replaced with 1.15, a maintenance release that fixes
where higher-order functions have been specialised. some problems mainly with the Windows version, but
This, as a consequence, appears to enable further will not introduce any new features.

23
Since version 1.14, lhs2TEX has an experimental because there are several distinct groupings of func-
mode for typesetting Agda code. tions, when that module contains common utility func-
tions that are placed together to form a library module
Further reading (e.g., the Prelude).
Sample SourceGraph analysis reports can be
http://www.cs.uu.nl/~andres/lhs2tex found at http://code.haskell.org/~ivanm/Sample_
SourceGraph/SampleReports.html. A tool paper on
SourceGraph has been accepted for the ACM SIG-
4.2 Analysis and Profiling
PLAN 2010 Workshop on Partial Evaluation and
Program Manipulation.
4.2.1 SourceGraph

Report by: Ivan Lazar Miljenovic


Status: version 0.5.5.0

SourceGraph is a utility program aimed at helping


Haskell programmers visualize their code and perform
simple graph-based analysis (representing entities as
nodes in the graphs and function calls as directed
edges). It is a sample usage of the Graphalyze li-
brary (→ 5.7.2), which is designed as a general-purpose Further reading
graph-theoretic analysis library. These two pieces of
software were originally developed as the focus of my ◦ http://hackage.haskell.org/package/SourceGraph
mathematical honors thesis, “Graph-Theoretic Analy- ◦ http://ivanmiljenovic.files.wordpress.com/2008/11/
sis of the Relationships Within Discrete Data”. honoursthesis.pdf
Whilst fully usable, SourceGraph is currently lim-
ited in terms of input and output. It analyses all .hs 4.2.2 HLint
and .lhs files recursively found in the provided di-
rectory, parsing most aspects of Haskell code (cannot Report by: Neil Mitchell
Status: v1.6
parse Haskell code using CPP, HaRP, TH, FFI and
XML-based Haskell code; difficulty parsing Data Fam-
ily instances, unknown modules and record puns and HLint is a tool that reads Haskell code and suggests
wildcards). The results of the analysis are created in changes to make it simpler. For example, if you call
an Html file in a “SourceGraph” subdirectory of the maybe foo id it will suggest using fromMaybe foo in-
project’s root directory. stead. HLint is compatible with almost all Haskell ex-
Changes since the previous release of HCAR include: tensions, and can be easily extended with additional
hints.
◦ Can now analyse a project from the Cabal file or an
There have been numerous feature improvements
overall base module.
since the last HCAR. HLint can now spot where you
◦ Now parses data definitions and class/instance dec- have used a map or fold, gives many more hints, warns
larations. about redundant extensions etc. HLint is now used by
the Darcs team and is one of the most popular appli-
◦ Usage of colour and shapes to indicate different types cations on Hackage.
of entities and entity relationships with a legend to
explain the differences. Further reading
◦ Removal of the Relative Neighbourhood clustering http://community.haskell.org/~ndm/hlint/
algorithm (as it didn’t provide much useful informa-
tion). 4.2.3 hp2any
Current analysis algorithms utilized include: alter- Report by: Patai Gergely
native module groupings, whether a module should be Status: experimental, on hold
split up, root analysis, clique and cycle detection as well
as finding functions which can safely be compressed
down to a single function. Please note however that This project was born during the 2009 Google Summer
SourceGraph is not a refactoring utility, and that its of Code under the name “Improving space profiling ex-
analyses should be taken with a grain of salt: for exam- perience”. The name hp2any covers a set of tools and
ple, it might recommend that you split up a module, libraries to deal with heap profiles of Haskell programs.

24
At the present moment, the project consists of three ◦ If compilation yields an error, then the source line
packages: is highlighted and additional error explanations are
provided.
◦ hp2any-core: a library offering functions to read
heap profiles during and after run, and to perform ◦ Shows a program summary in a tree structure, giving
queries on them. definitions of types and types of functions . . .
◦ hp2any-graph: an OpenGL-based live grapher that ◦ Automatic checking of all (Boolean) properties of a
can show the memory usage of local and remote pro- program; results shown in summary.
cesses (the latter using a relay server included in the
package), and a library exposing the graphing func- Over the summer 2009 Heat was completely re-
tionality to other applications. engineered to provide a simple and clean internal struc-
ture for future development. This new version still
◦ hp2any-manager: a GTK application that can dis- misses a few features compared to the current 3.1 ver-
play graphs of several heap profiles from earlier runs. sion and hence a new release will only appear in 2010.

The project also aims at replacing hp2ps by reimple-


menting it in Haskell and possibly adding new output Further reading
formats. The manager application shall be extended
http://www.cs.kent.ac.uk/projects/heat/
to display and compare the graphs in more ways, to
export them in other formats and also to support live
profiling right away instead of delegating that task to 4.3.3 HaRe — The Haskell Refactorer
hp2any-graph.
Report by: Simon Thompson
Participants: Huiqing Li, Chris Brown, Chaddaï Fouché,
Further reading Claus Reinke
http://www.haskell.org/haskellwiki/Hp2any
Refactorings are source-to-source program transforma-
4.3 Development tions which change program structure and organiza-
tion, but not program functionality. Documented in
4.3.1 Hoogle — Haskell API Search catalogs and supported by tools, refactoring provides
the means to adapt and improve the design of existing
Report by: Neil Mitchell
code, and has thus enabled the trend towards modern
Status: v4.0
agile software development processes.
See: http://haskell.org/communities/05-2009/html/ Our project, Refactoring Functional Programs, has
report.html#sect4.4.1. as its major goal to build a tool to support refactor-
ings in Haskell. The HaRe tool is now in its fifth major
4.3.2 HEAT: The Haskell Educational release. HaRe supports full Haskell 98, and is inte-
Advancement Tool grated with Emacs (and XEmacs) and Vim. All the
refactorings that HaRe supports, including renaming,
Report by: Olaf Chitil scope change, generalization and a number of others,
Status: active
are module aware, so that a change will be reflected in
all the modules in a project, rather than just in the
Heat is an interactive development environment (IDE) module where the change is initiated. The system also
for learning and teaching Haskell. Heat was designed contains a set of data-oriented refactorings which to-
for novice students learning the functional program- gether transform a concrete data type and associated
ming language Haskell. Heat provides a small num- uses of pattern matching into an abstract type and calls
ber of supporting features and is easy to use. Heat is to assorted functions. The latest snapshots support the
portable, small and works on top of the Haskell inter- hierarchical modules extension, but only small parts of
preter Hugs. the hierarchical libraries, unfortunately.
Heat provides the following features: In order to allow users to extend HaRe themselves,
HaRe includes an API for users to define their own
◦ Editor for a single module with syntax-highlighting program transformations, together with Haddock doc-
and matching brackets. umentation. Please let us know if you are using the
◦ Shows the status of compilation: non-compiled; com- API.
piled with or without error. Snapshots of HaRe are available from our webpage,
as are related presentations and publications from
◦ Interpreter console that highlights the prompt and the group (including LDTA’05, TFP’05, SCAM’06,
error messages. PEPM’08, PEPM’10, Huiqing’s PhD thesis and Chris’s

25
PhD thesis). The final report for the project appears Preprocessor are used. Auto-generated Haskell mod-
there, too. ules may be imported into applications to access the
Chris Brown has precently passed his PhD; his PhD foreign library’s functions and variables.
thesis entitled “Tool Support for Refactoring Haskell HSFFIG has been in development since 2005, and
Programs” is available from our webpage. was recently released on Hackage. The current version
is 1.1.2 which is mainly a bug-fix release for the version
Recent developments 1.1.
The package provides a small library to link with
◦ More structural and datatype-based refactorings programs using auto-generated imports, and two exe-
have been studied by Chris Brown, including trans- cutable programs:
formation between let and where, generative fold-
ing, introducing pattern matching, and introducing ◦ hsffig: a filter program which reads pre-processed
case expressions; include files from standard input, and produces one
◦ Clone detection and elimination support has been large .hsc file;
added, to allow the automatic detection and semi-
automatic elimination of duplicated code in Haskell. ◦ ffipkg: a program which automates the process of
building a Cabal package out of C include files by the
means of automated running hsffig and other tools
Further reading necessary to build a Haskell package.
http://www.cs.kent.ac.uk/projects/refactor-fp/
Further reading
4.3.4 DarcsWatch ◦ The HSFFIG package on Hackage
http://hackage.haskell.org/package/HSFFIG
Report by: Joachim Breitner
◦ The HSFFIG Tutorial
Status: working
http://www.haskell.org/haskellwiki/HSFFIG/Tutorial
◦ The FFI Imports Packaging Utility
DarcsWatch is a tool to track the state of Darcs (→ http://www.haskell.org/haskellwiki/FFI_imports_
6.1.1) patches that have been submitted to some packaging_utility
project, usually by using the darcs send command.
It allows both submitters and project maintainers to
get an overview of patches that have been submitted
but not yet applied.
The DarcsWatch internals were changed during the
Darcs hacking sprint in Vienna, to allow for a deeper in-
tegration into the roundup bug tracking instance used
by the Darcs projects. Also, other extensions of darc-
swatch are easier now. DarcsWatch continues to be
used by the xmonad project (→ 6.1.2) and a few de-
velopers. At the time of writing, it was tracking 41
repositories and 2627 patches submitted by 162 users.

Further reading
◦ http://darcswatch.nomeata.de/
◦ http://darcs.nomeata.de/darcswatch/documentation.
html

4.3.5 HSFFIG
Report by: Dmitry Golubovsky
Status: release
Haskell FFI Binding Modules Generator (HSFFIG) is
a tool which parses C include files (.h) and generates
Haskell Foreign Functions Interface import declarations
for all functions, #define’d constants (where possible),
enumerations, and structures/unions (to access their
members). It is assumed that the GNU C Compiler and

26
5 Libraries
quests. Many of these would require relatively little
time for any competent Haskell hacker.
5.1 Cabal and Hackage
The other important project that people should con-
Report by: Duncan Coutts
sider helping out with is the new Hackage server im-
plementation, based on Happstack. The current Hack-
age server has several widely acknowledged limitations.
Background The new design should enable us to add many of the
new features that users so frequently request. There
Cabal is the Common Architecture for Building Appli- has been some progress on this in the last few months
cations and Libraries. It defines a common interface but it needs some more work before we can consider a
for defining and building Haskell packages. It is imple- transition.
mented as a Haskell library and associated tools which
allow developers to easily build and distribute pack- Further reading
ages.
Hackage is a distribution point for Cabal packages. ◦ Cabal homepage: http://www.haskell.org/cabal
It is an online database of Cabal packages which can be ◦ Hackage package collection: http://hackage.haskell.
queried via the website and client-side software such as org/
cabal-install. Hackage enables end-users to download ◦ Bug tracker: http://hackage.haskell.org/trac/
and install Cabal packages. hackage/
cabal-install is the command line interface for the
Cabal and Hackage system. It provides a command line 5.2 Haskell Platform
program cabal which has sub-commands for installing
and managing Haskell packages. Report by: Duncan Coutts

Recent progress
Background
There have been no new releases since the last HCAR, The Haskell Platform (HP) is the name of a new
however there will soon be a release of Cabal-1.8 and “blessed” set of libraries and tools on which to build fur-
a corresponding release of cabal-install. The primary ther Haskell libraries and applications. It takes the best
change is that these releases will work with GHC 6.12. packages from the more than 1500 on Hackage (→ 5.1).
There is also a new “cabal init” command to help users It is intended to provide a comprehensive, stable, and
create an initial “.cabal” file and a feature to maintain quality tested base for Haskell projects to work from.
an HTML contents page for the Haddock documenta- Historically, GHC has shipped with a collection of
tion for all installed packages. packages under the name extralibs. As of GHC 6.12
In addition there will be a minor release of cabal- the task of shipping an entire platform is being trans-
install-0.6.x for users of GHC-6.10; the main change ferred to the Haskell Platform.
being a slight tweak in behaviour that should help with
the general push to get packages to transition from base
3 to base 4. Recent progress
Since the last report, cabal-install is now in wider use
We had the first major release of the platform earlier
thanks to being included in the Haskell Platform (→ this year and followed that up with 2 further minor re-
5.2) and being packaged by various Linux distributions.
leases. The last of these uses GHC 6.10.4 and is avail-
Hackage growth continues to be strong. For the sec-
able on Windows, OS X, as a generic Unix tarball and
ond 6-month period in a row there has been 50% growthis included in several Linux distributions.
in the number of packages. There are now well over We established a steering committee to guide the dis-
1,500 different packages. cussions on the libraries mailing list to ensure that the
necessary decisions do actually get made, recorded and
Looking forward communicated to the release engineering team.
The steering committee drafted a new procedure for
As ever, there are many improvements we want to make adding packages to the Haskell Platform and this has
to Cabal, cabal-install and Hackage but our limiting now been ratified by the libraries mailing list. The
factor is the amount of volunteer development time. new procedure involves writing a package proposal and
We have over 100 open bugs and 150 open feature re- discussing it on the libraries mailing list with the aim

27
of reaching a consensus. Details of the procedure are (indices) are selected by name in expressions and Ein-
on the development wiki. stein’s summation convention for repeated indices is au-
tomatically applied. We provide two main data types:
Looking forward simple arrays in which contractions only require equal
dimension size, and tensors, whose indices are labeled
There had been a plan for a second major release of the as covariant or contravariant (subindex or superindex),
platform using GHC 6.10, however that has now been and contractions can only be done on pairs of comple-
shelved and the next major release will be in January mentary indices. Arguments are automatically made
and will use GHC 6.12. In the meantime, for people conformant by replicating them along extra dimensions
testing their packages with the GHC 6.12 release can- appearing in an operation. There is also preliminary
didates, there will be a source-only beta version avail- support for geometric algebra and tensor decomposi-
able. tions.
Future major releases will be on a 6 month schedule. The library has a purely functional interface: ar-
Major releases may include new and updated packages rays are immutable, and operations typically work on
while minor releases will only contain bug fixes and whole structures which can be assembled and decom-
fixes for packaging problems. posed using simple primitives. It is built on top of
We would like to invite package authors to pro- hmatrix (→ 5.3.1), so coordinates are internally stored
pose new packages for the upcoming major releases. in C arrays and tensor products are implemented using
We also invite the rest of the community to take BLAS. Therefore, big arrays can in principle be effi-
part in the review process on the libraries mailing list ciently processed, although some functions are naively
libraries@haskell.org. defined and not optimized. Consistency of dimension
sizes is currently checked at run time. Future work in-
Further reading cludes static checking of conformability and a GUI for
tensor diagrams.
http://haskell.org/haskellwiki/Haskell_Platform A tutorial can be found in the project’s web page.
◦ Download: http://hackage.haskell.org/platform/
◦ Wiki: http://trac.haskell.org/haskell-platform/ Further reading
◦ Adding packages: http://trac.haskell.org/
haskell-platform/wiki/AddingPackages http://perception.inf.um.es/tensor

5.3 Auxiliary Libraries 5.3.3 The Neon Library

Report by: Jurriaan Hage


5.3.1 hmatrix
As part of his master thesis work, Peter van Keeken im-
Report by: Alberto Ruiz plemented a library to data mine logged Helium (→ 2.2)
Status: stable, maintained programs to investigate aspects of how students pro-
gram Haskell, how they learn to program, and how
good Helium is in generating understandable feedback
The hmatrix library is a purely functional interface to
and hints. The software can be downloaded from http:
numerical linear algebra, internally implemented using
//www.cs.uu.nl/wiki/bin/view/Hage/Neon, which also
GSL, BLAS, and LAPACK. The latest stable version
gives some examples of output generated by the sys-
is available from Hackage.
tem. The downloads only contain a small sample of
Recent work includes the experimental library hTen- loggings, but it will allow programmers to play with it.
sor (→ 5.3.2) for multidimensional arrays and simple The recent news is that a paper about Neon will
tensor computations. be published at SLE (1st Conference on Software Lan-
guage Engineering), where it came under the heading
Further reading of Tools for Language Usage.
On that note, there has been a posting by Simon
http://www.hmatrix.googlepages.com Thompson, Sally Fincher and myself for a PhD stu-
dent to work on understanding how students learn to
5.3.2 hTensor program (in Haskell), in Kent. Also, recently I acquired
Report by: Alberto Ruiz a new master student to continue to the work of Pe-
Status: experimental, active development ter van Keeken. One of this tasks will be to investigate
the kind of parse errors students make, and continue to
hTensor is an experimental library for multidimen- make. In the process, he shall add context properties
sional arrays, oriented to support simple tensor com- (did the student pass or fail, what kind of programming
putations and multilinear algebra. Array dimensions background can we expect him or her to have) to our

28
database so that they can be employed by queries to ◦ Online result production, error recovery, combina-
increase external validity. tors for parsing ambiguous grammars, an applicative
interface, a monadic interface.
5.3.4 leapseconds-announced
◦ Scanners can be switched dynamically, so several dif-
Report by: Björn Buckwalter ferent languages can occur intertwined in a single in-
Status: stable, maintained put file.
The leapseconds-announced library provides an easy to ◦ Fixes a potential black hole which went unnoticed for
use static LeapSecondTable with the leap seconds an- years in the code for the monadic bind as presented
nounced at library release time. It is intended as a by Swierstra and Hughes in the ICFP 2003 paper:
quick-and-dirty leap second solution for one-off anal- Polish Parsers: Step by Step.
yses concerned only with the past and present (i.e.
up until the next as of yet unannounced leap second), A first version of the new library was recently re-
or for applications which can afford to be recompiled leased as the uu-parsinglib library, which has found its
against an updated library as often as every six months. place in the Text.ParserCombinators category on Hack-
Version 2009 of leapseconds-announced contains all age.
leap seconds up to 2009-01-01. A new version will be
uploaded if/when the iers announces a new leap sec- Future plans
ond.
The final library, with an abstract interpretation part
Further reading in order to get the parsing speed we got used to, will
be release on Hackage again. We plan to extend the
◦ http://hackage.haskell.org/cgi-bin/hackage-scripts/ short tutorial which will appear in the LNCS series (45
package/leapseconds-announced pages) into a long tutorial.
◦ http://github.com/bjornbm/leapseconds-announced Since many aspects of the old library, such as its
applicative interface and the possibility to build e.g.
5.4 Parsing and Transforming parser for permutation phrases, have now come avail-
able elsewhere in other packages, we will also try to
5.4.1 ChristmasTree make the new library to conform as much as possible
with these new developments.
Report by: Marcos Viera
Participants: Doaitse Swierstra, Eelco Lempsink
Status: experimental Contact
See: http://haskell.org/communities/05-2009/html/ If you are interested in using the current version of the
report.html#sect5.5.7. library in order to provide feedback on the provided
interface, contact hdoaitse@swierstra.neti.
5.4.2 Utrecht Parser Combinator Library: New
version 5.5 Mathematical Objects
Report by: Doaitse Swierstra
Status: actively developed 5.5.1 dimensional: Statically checked physical
dimensions
The Utrecht Parser Combinator library has remained
largely unmodified for the last five years, and has served Report by: Björn Buckwalter
us well. Over the years, however, new insights have Status: active, mostly stable
grown, and with the advent of GADTs some internals See: http://haskell.org/communities/11-2008/html/
could be simplified considerably. The Lernet summer report.html#sect5.6.1.
school in February 2008 (http://www.fing.edu.uy/inco/
eventos/lernet2008/) provided an incentive to start a
5.5.2 Halculon: units and physical constants
rewrite of the library; a newly written tutorial will ap-
database
pear in the lecture notes, which will be published by
Springer in the LNCS series. The text is also available Report by: Jared Updike
as a technical report at http://www.cs.uu.nl/research/ Status: web application in beta, database stable
techreps/UU-CS-2008-044.html
A number of Haskell libraries can represent numeri-
Features
cal values with physical dimensions that are checked
◦ Much simpler internals than the old li- at runtime or compile time (including dimensional and
brary (http://haskell.org/communities/05-2009/ the Numeric Prelude), but neither provide an exhaus-
html/report.html#sect5.5.8). tive, searchable, annotated database of units, measures,

29
and physical constants. Halculon is an interactive unit AERN stands for Approximating Exact Real Numbers.
database of 4,250 units, with a sample Haskell AJAX We are developing a family of the following libraries for
web application, based on the units database created by fast exact real number arithmetic:
Alan Eliasen for the wonderful physical units program-
◦ AERN-Real: arbitrary precision safely rounded
ming language Frink. (Because each unit in Frink’s
interval arithmetic with multiple backends (pure
unit.txt database is defined in terms of more basic
Haskell floating point numbers, MPFR, machine
unit definitions — an elegant approach in general —
doubles) and with support for inner rounding, anti-
units.txt is inconvenient for looking up a single random
consistent intervals and Kaucher arithmetic
unit; the entire file might need to be parsed to repre-
sent any given constant solely in terms of the base SI ◦ AERN-RnToRm: arbitrary precision safely-rounded
units, which is precisely what the Halculon database arithmetic of piece-wise polynomial function en-
provides.) closures (PFEs) for functions over n-dimensional
Halculon also provides a carefully tuned, user- and real intervals with support for inner rounding,
developer-friendly search string database that aims to anti-consistent intervals and approximated Kaucher
make interactive use pleasant. The database tables are arithmetic
available online and downloadable as UTF-8 text.
The example web application now has a mobile ver- ◦ AERN-RnToRm-Plot: GTK window for inspecting
sion available (tested in iPhone OS 3.1, Safari 3.0, and the graphs of PFEs in one variable (see figure below,
Firefox 2.0). For best results on the iPhone or iPod showing a screenshot of an AERN-RnToRm-Plot
touch, Add to Home Screen to use the application in window exploring an enclosure of cos(10x) (blue) and
full screen. The calculator works offline, too. an enclosure of its primitive function (red))
◦ AERN-Net: an implementation of distributed query-
based (i.e., lazy) computation over analytical and ge-
ometrical objects

Further reading
◦ http://www.updike.org/articles/Units
◦ http://www.updike.org/halculon/
The development is driven mainly by the needs of our
◦ http://www.updike.org/halcmobile/
two research projects. We use the libraries extensively
to:
5.5.3 Numeric prelude
◦ prototype algorithms for reliable and ultimately con-
Report by: Henning Thielemann verging methods for solving differential equations in
Participants: Dylan Thurston, Mikael Johansson many variables (AERN-RnToRm, AERN-Net)
Status: experimental, active development
◦ solve numerical constraint satisfaction problems, es-
See: http://haskell.org/communities/05-2009/html/ pecially those arising from verification of programs
report.html#sect5.6.2. that use floating point numbers (AERN-RnToRm)
For our purposes AERN-Real has been stable for al-
5.5.4 AERN-Real and friends most two years. It needs to be tested for a wider variety
of applications before we can label it as stable. AERN-
Report by: Michal Konečný
Participants: Amin Farjudian, Jan Duracz RnToRm is now also fairly stable thanks to a period
Status: experimental, actively developed of debugging and a comprehensive test suite. Never-
theless, it is rather slow as it has not been optimised

30
and there are occasional gaps in its functionality. The 5.5.6 fad: Forward Automatic Differentiation
other libraries are even more experimental and incom-
Report by: Björn Buckwalter
plete. We recently added a useful mouse-driven zoom
Participants: Barak A. Pearlmutter, Jeffrey Mark
and pan feature to the function plot window. Siskind
The API of all the libraries is still occasionally chang- Status: active
ing but they provide a fairly extensive set of features
Fad is an attempt to make as comprehensive and us-
and are reasonably well documented. The libraries are
able a forward automatic differentiation (AD) library
under active development and new features and bug
as is possible in Haskell. Fad (a) attempts to be cor-
fixes are expected to be submitted to Hackage in the
rect, by making it difficult to accidentally get a nu-
coming 12 months. Notable planned additions in this
merically incorrect derivative; (b) provides not only
period include:
first-derivatives, but also a lazy tower of higher-order
derivatives; (c) allows nested use of derivative operators
◦ optimisations to the function enclosure arithmetic while using the type system to reject incorrect nesting
(perturbation confusion); (d) attempts to be complete,
◦ lazy communication of approximations of higher- in the sense of allowing calculation of derivatives of
order real functions using role switching functions defined using a large variety of Haskell con-
structs; and (e) tries to be efficient, in the sense of both
◦ infinite trees of enclosures for interval partial deriva- the defining properties of forward automatic differen-
tives computed using automatic differentiation tiation and in keeping the constant factor overhead as
low as possible.
Version 1.0 of fad was uploaded to Hackage on
Further reading April 3. Recent changes can be found via git clone
git://github.com/bjornbm/fad.git
See Haddock documentation via Hackage — has links
to research papers. Further reading
◦ http://github.com/bjornbm/fad
5.5.5 logfloat ◦ http://flygdynamikern.blogspot.com/2009/04/
announce-fad-10-forward-automatic.html
Report by: Wren Ng Thornton
Status: stable? 5.6 Data types and data structures
Current release: 0.12.0.1
Portability: GHC 6.8, GHC 6.10, Hugs Sept2006
5.6.1 HList — a library for typed heterogeneous
The logfloat library provides a type for storing numbers collections
in the log-domain. This is primarily useful for avoid- Report by: Oleg Kiselyov
ing underflow when multiplying many small numbers Participants: Ralf Lämmel, Keean Schupke, Gwern
in probabilistic models. Branwen
It also includes support for dealing with IEEE-754
floating point numbers (more) correctly, including: a
HList is a comprehensive, general purpose Haskell li-
class for types with representations for transfinite val-
ues, a class for partially ordered types, efficient andbrary for typed heterogeneous collections including
correct conversion from Real to Fractional, and bug extensible polymorphic records and variants (→ 1.3).
fixes for Hugs’ Prelude. HList is analogous to the standard list library, pro-
viding a host of various construction, look-up, filter-
ing, and iteration primitives. In contrast to the reg-
Future plans ular lists, elements of heterogeneous lists do not have
to have the same type. HList lets the user formulate
Add a signed variant so negative numbers can also be statically checkable constraints: for example, no two
projected into the log-domain. elements of a collection may have the same type (so
the elements can be unambiguously indexed by their
type).
Further reading An immediate application of HLists is the imple-
mentation of open, extensible records with first-class,
◦ Official source and documentation available on Hack- reusable, and compile-time only labels. The dual
age application is extensible polymorphic variants (open
◦ The development branch is available from http:// unions). HList contains several implementations of
community.haskell.org/~wren/ open records, including records as sequences of field

31
values, where the type of each field is annotated with 5.7 Data processing
its phantom label. We, and now others (Alexandra
Silva, Joost Visser: PURe.CoddFish project), have also 5.7.1 MultiSetRewrite
used HList for type-safe database access in Haskell. Report by: Martin Sulzmann
HList-based Records form the basis of OOHaskell (http: Status: stable
//darcs.haskell.org/OOHaskell). The HList library relies
on common extensions of Haskell 98. See: http://haskell.org/communities/05-2009/html/
HList is being used in AspectAG, typed EDSL of at- report.html#sect5.8.3.
tribute grammars, and in HaskellDB. There has been
many miscellaneous changes related to the names of ex- 5.7.2 Graphalyze
posed modules, fixity declarations, making hMap and
similar functions maximally lazy, improving error mes- Report by: Ivan Lazar Miljenovic
Status: version 0.8.0.0
sages and documentation. A new, 0.2, release of HList
incorporates the patches from HaskellDB developers
Justin Bailey and Brian Bloniarz. The new release has The Graphalyze library is a general-purpose, fully ex-
a working regression test suite. tensible graph-theoretic analysis library, which includes
We are investigating the use of type functions pro- functions to assist with graph creation and visualiza-
vided in the new versions of GHC. tion, as well as many graph-related algorithms. Also
included is a small abstract document representation,
with a sample document generator utilizing Pandoc (→
Further reading 6.4.1). Users of this library are able to mix and match
◦ HList: http://homepages.cwi.nl/~ralf/HList/ Graphalyze’s algorithms with their own. Changes since
◦ OOHaskell: http://homepages.cwi.nl/~ralf/ previous versions have focused on refining the contents
OOHaskell/ of the library and inclusion of new analysis algorithms,
with future plans to re-write the document generation
modules to use pretty-printing functions.
5.6.2 bytestring-trie Graphalyze is used in SourceGraph (→ 4.2.1) (which
is the driving force behind improvements to Grapha-
Report by: Wren Ng Thornton lyze), and was initially developed as part of my Math-
Status: active development ematics Honours’ thesis, Graph Theoretic Analysis of
Current release: 0.1.4 Relationships Within Discrete Data. The focus on this
Portability: Haskell 98 + CPP thesis was to develop computational tools to allow peo-
ple to analyze discrete data sets.
The bytestring-trie library provides an efficient imple-
mentation of “dictionaries” mapping strings to values,
Further reading
using big-endian patricia tries (like Data.IntMap). In
general Trie is more efficient than Map ByteString ◦ http://hackage.haskell.org/package/Graphalyze
because memory and work is shared between strings ◦ http://ivanmiljenovic.files.wordpress.com/2008/11/
with common prefixes, though the specifics will vary honoursthesis.pdf
depending on the distribution of keys.
5.8 Generic and Type-Level Programming
Future plans
5.8.1 uniplate
◦ Min- and max-views for treating tries as priority
Report by: Neil Mitchell
queues.
See: http://haskell.org/communities/05-2009/html/
◦ Efficient intersection and difference functions. report.html#sect5.9.1.

5.8.2 Generic Programming at Utrecht University


Further reading
Report by: José Pedro Magalhães
◦ Official source and documentation available on Hack- Participants: Stefan Holdermans, Johan Jeuring, Sean
age. Leather, Andres Löh, Thomas van Noort
Status: actively developed
◦ The development branch is available from http://
community.haskell.org/~wren/.
One of the research themes investigated within the
Software Technology Center in the Department of In-

32
formation and Computing Sciences at Utrecht Univer- with GHC on the base package, and the syb pack-
sity is generic programming. Over the last 10 years, we age, which is available on Hackage. This allows the
have played a central role in the development of generic development of the library independently of compiler
programming techniques, languages, and libraries. releases. With GHC version 6.12 it will be possible
Currently, we are maintaining four generic program- to update the syb package, and we plan to release a
ming libraries: emgm, multirec, regular, and syb. We new version with more functions and efficiency im-
report on the latter three in this entry; emgm has its own provements.
entry (→ 5.8.3).
We are also working on a new version of our library
multirec This library represents datatypes uniformly for generic rewriting. We have previously described the
and grants access to sums (the choice between con- rewriting library in a paper and released it on Hackage
structors), products (the sequence of constructor ar- as the rewriting package. Currently we are imple-
guments), and recursive positions. Families of mu- menting support for families of (possibly mutually) re-
tually recursive datatypes are supported. Functions cursive datatypes and preconditions.
such as map, fold, show, and equality are provided as Finally, we have been looking at benchmarking and
examples within the library. Using the library func- improving the performance of different libraries for
tions on your own families of datatypes requires some generic programming (→ 5.8.4).
boilerplate code in order to instantiate the frame-
work, but is facilitated by the fact that multirec Further reading
contains Template Haskell code that generates these
instantiations automatically. http://www.cs.uu.nl/wiki/GenericProgramming

The multirec library can also be used for type- 5.8.3 Extensible and Modular Generics for the
indexed datatypes. As a demonstration, the zipper Masses (EMGM)
library is available on Hackage. With this datatype-
generic zipper, you can navigate values of several Report by: Sean Leather
types. Participants: José Pedro Magalhães, Alexey Rodriguez,
Andres Löh
The current versions are 0.4 for multirec and 0.3
Status: actively developed
for zipper. There is ongoing development for
multirec, and new releases are expected soon: we Extensible and Modular Generics for the Masses
will likely add more functions and perhaps add (EMGM) is a general-purpose library for generic pro-
a multirec-extras package as we just did for gramming with type classes.
regular (see below). We are also working on support
for datatypes with parameters and datatype compo- Introduction
sitions.
EMGM is a library for of datatype-generic pro-
regular While multirec focuses on support for mu- gramming using type classes. We represent Haskell
tually recursive regular datatypes, regular supports datatypes as values using a sum-of-products structure
only single regular datatypes. The approach used is representation. The foundation of EMGM allows pro-
similar to that of multirec, namely using type fam- grammers to write generic functions by induction on
ilies to represent the pattern functor of the datatype the structure of datatypes. The use of type classes
to represent generically. We have recently released in EMGM allows generic functions to support ad-hoc
version 0.2 on Hackage, and also an extra package cases for arbitrary datatypes.
with more generic functions. Together they pro- The library provides a sizable (and constantly grow-
vide a number of typical generic programming exam- ing) collection of ready-to-use generic functions. Here
ples, but also a number of less well-known but useful are some examples of these functions:
generic functions: deep seq, QuickCheck’s arbitrary
and coarbitrary, and binary’s get and put. ◦ Crush, a useful generalization of fold-like opera-
tions that supports flattening, integer operations,
syb Scrap Your Boilerplate (syb) has been supported and logic operations on all values of an arbitrary
by GHC since the 6.0 release. The library is based datatype
on combinators and a few primitives for type-safe
◦ Extensible Read and Show functions to which one
casting and processing constructor applications. It
might add special cases for certain types
was originally developed by Ralf Lämmel and Si-
mon Peyton Jones. Since then, many people have ◦ Collect for collecting values of a certain type con-
contributed with research relating to syb or its ap- tained within a value of a different type
plications. Recent work has allowed the separation
of syb into a core module, Data.Data, which comes ◦ ZipWith, a generic version of the standard zipWith

33
EMGM also comes with support for standard programs, when compiled with the standard optimiza-
datatypes such as lists, Either, Maybe, and tuples. tion flags of the Glasgow Haskell Compiler (GHC), are
Adding support for your own datatype is straightfor- substantially slower than their hand-written counter-
ward using the deriving API. parts. However, we have also found that more advanced
optimization capabilities of GHC can be used to fur-
Background ther optimize generic functions, sometimes achieving
the same efficiency as hand-written code.
The ideas for EMGM come from research by Ralf
We have benchmarked four generic programming li-
Hinze, Bruno Oliveira, and Andres Löh. It was fur-
braries: emgm, syb, multirec, and regular. We com-
ther explored in a comparison of generic programming
pare different generic functions in each of these libraries
libraries by Alexey Rodriguez, et al. Our particular im-
to a hand-written version. We have concluded that in-
plementation was developed simultaneously along with
lining plays a crucial role in the optimization of gener-
lecture notes for the 2008 Advanced Functional Pro-
ics. In some cases, the inliner of GHC can already op-
gramming Summer School. The article from these lec-
timize a generic function up to the same performance
tures has been extended and published as a technical
of the hand-written version. However, this does not
report.
happen with simple -O1 or -O2 optimization levels: we
need to tweak the unfolding flags to stimulate inlining.
Recent Development As an example, we show the results of our bench-
No changes have been made since the previous report. mark for the generic show function below. We
present how the libraries perform across different
Future plans compiler optimizations: UT60 stands for setting the
-funfolding-use-threshold flag to 60 and CT450
We plan to continue developing EMGM and to explore for setting -funfolding-creation-threshold to 450.
the use of this library in many domains. There should We have benchmarked the function on two different
be a major release before the next report. We welcome datatypes: a simple binary tree (Tree) and a repre-
ideas or contributions from the community. sentation of logic expressions (Logic). The results are
plotted relative to the hand-written version compiled
Contact with -O1, on a logarithmic scale of base 2. We can see
that syb and multirec perform much worse than emgm
Let us know if you use EMGM, how you use it, and and regular. More interestingly, though, is that by
where it can be improved. Contact us on the Generics tweaking the inlining thresholds we can make regular
mailing list. as efficient as the hand-written version, and emgm al-
most as efficient.
Further reading
More information can be found on the EMGM web-
site. Download the package and browse the API at the
Hackage page.

5.8.4 Optimizing generic functions

Report by: José Pedro Magalhães


Participants: Stefan Holdermans, Johan Jeuring, Andres
Löh
Status: actively developed Our benchmark provides many more interesting re-
sults, which can be seen in our PEPM’10 paper. In
Datatype-generic programming increases program re-
the near future we plan to extend our benchmark and
liability by reducing code duplication and enhancing
investigate the cases where simple tweaking of inlining
reusability and modularity. Several generic program-
flags is not sufficient to provide adequate performance.
ming libraries for Haskell have been developed in the
past few years. These libraries have been compared in
detail with respect to expressiveness, extensibility, typ- Further reading
ing issues, etc., but performance comparisons have been http://dreixel.net/research/pdf/ogie.pdf
brief, limited, and preliminary. It is widely believed
that generic programs run slower than hand-written
code.
At Utrecht University we are looking into the perfor-
mance of different generic programming libraries and
how to optimize them. We have confirmed that generic

34
5.8.5 2LT: Two-Level Transformation Further reading
Report by: Tiago Miguel Laureano Alves ◦ Example code: http://community.haskell.org/~claus/
Participants: Joost Visser, Pablo Berdaguer, Alcino misc/labels.hs
Cunha, José Nuno Oliveira, Hugo Pacheco http://community.haskell.org/~claus/misc/Data/Label/
Status: active TH.hs
See: http://haskell.org/communities/05-2009/html/ http://community.haskell.org/~claus/misc/Data/Label.hs
report.html#sect5.9.6. ◦ Discussion: http://www.haskell.org/pipermail/
haskell-cafe/2009-April/059819.html
5.8.6 Data.Label — “atoms” for type-level
programming 5.9 User interfaces
Report by: Claus Reinke
Status: experimental 5.9.1 Gtk2Hs
A common problem for type-level programming (ex- Report by: Axel Simon
tensible record libraries, type-level numbers, . . . ) in Participants: Peter Gavin and many others
Haskell is where to define shared atomic types (record Status: beta, actively developed
field labels, type tags, type numerals):
◦ identical types defined in separate modules are not Gtk2Hs is a set of Haskell bindings to many of the
compatible libraries included in the Gtk+/Gnome platform. Gtk+
is an extensive and mature multi-platform toolkit for
◦ common imports defining common types for several
creating graphical user interfaces.
projects hurt modularity
GUIs written using Gtk2Hs use themes to resemble
◦ SML-style parameterized modules and type-sharing the native look on Windows and, of course, various
are not directly available desktops on Linux, Solaris, FreeBSD, and Mac OS X
using X11.
Using Template Haskell, and QuasiQuotes in partic-
ular, we can now at least work around this issue, by Gtk2Hs features:
splitting the atoms:-) Data.Label provides type let-
◦ Automatic memory management (unlike some other
ters and combinators for constructing typed “atoms”
C/C++ GUI libraries, Gtk+ provides proper sup-
from these letters, as well as quasiquoting and Show
port for garbage-collected languages)
instances to hide some of this internal structure.
*Main> [$l|label|] ◦ Unicode support
label
*Main> :t [$l|label|] ◦ High quality vector graphics using Cairo
[$l|label|] :: Ll :< (La :< (Lb :< (Le :< Ll)))
◦ Cross-platform, multi-format multimedia playback
This workaround lets users choose between shared or with GStreamer
locally defined labels:
◦ Extensive reference documentation
module A where module B where
import Data.Label import Data.Label ◦ An implementation of the “Haskell School of Expres-
data MyLabel data MyLabel sion” graphics API
x = [$l|label|] x = [$l|label|]
y = undefined::MyLabel y = undefined::MyLabel ◦ Support for the Glade visual GUI builder

module C where ◦ Bindings to some Gnome extensions: gio, GConf,


import Data.Label GtkSourceView 1.0 and 2.0
import A
import B ◦ An easy-to-use installer for Windows
ok = [A.x,B.x]
fails = [A.y,B.y] ◦ Packages for Fedora, Gentoo (→ 2.7.1), Debian, and
FreeBSD
It does so by offering a meta-level commonality: A
and B do not have to agree on a common module to ◦ New features added during the last months:
declare all their common types (Data.Label is unaf-
– The terminal widget VTE
fected by the specific labels its importers might use),
they only need to agree on a common way of declaring – A binding the webkit to display web pages
all their sharable “atomic” types. – More demos and more functions bound

35
The Gtk2HS library is continually being improved is for diagrams to become a viable alternative to DSLs
with new bindings, documentation, and bug fixes. like MetaPost or Asymptote, but with the advantages
Outside contributions are always welcome! We have of being purely functional and embedded.
recently re-surrected our code generator tool which For example, consider the following diagram to illus-
means that new functions from Gtk+ 2.18.3 can be trate the 24 permutations of four objects:
bound by copy-and-paste followed by a quick edit of the
C documentation to reflect the Haskell version. This
significantly lowers the burden to help us out, so please
get in touch if you are interested.
Besides cabalizing Gtk2Hs, we are working on concur-
rency support which turns out to be non-trivial in the
face of GHC’s concurrent garbage collector. We plan
to release a new version of Gtk2Hs before Christmas.

Further reading
The diagrams library was used to create this dia-
◦ News, downloads, and documentation: http://
gram with very little effort (about ten lines of Haskell,
haskell.org/gtk2hs/
including the code to actually generate permutations).
◦ Development version: darcs get http://code.
The source code for this diagram, as well as other ex-
haskell.org/gtk2hs/
amples and further resources, can be found at http:
/code.haskell.org/diagrams/.
5.9.2 HQK The library is currently undergoing a major rewrite,
Report by: Wolfgang Jeltsch in order to use a more flexible constraint-solving lay-
Participants: Thomas Mönicke out engine and abstract out the rendering backend (the
Status: provisional current version depends solely on the Cairo library for
rendering). Other planned features include animation
HQK is an effort to provide Haskell bindings to large
support, more sophisticated paths and path operations,
parts of the Qt and KDE libraries. We have devel-
and an xmonad-like core/contrib model for incorporat-
oped a generator which can produce binding code au-
ing user-submitted extension modules.
tomatically. In addition, we have developed a small
Haskell module for accessing object-oriented libraries
in a convenient way. This module also supports parts Further reading
of Qt’s signal-slot mechanism. In contrast to the origi- ◦ http://code.haskell.org/diagrams/
nal C++-based solution, type correctness of signal-slot ◦ http://byorgey.wordpress.com/2009/09/24/
connections is checked at compile time with our library. diagrams-0-2-1-and-future-plans/
We plan to develop a HQK-based UI backend ◦ http://www.tug.org/metapost.html
for the Functional Reactive Programming library ◦ http://asymptote.sourceforge.net/
Grapefruit (http://haskell.org/communities/05-2009/
html/report.html#sect6.5.1).
5.10.2 LambdaCube
Further reading Report by: Csaba Hruska
Status: experimental, active development
http://haskell.org/haskellwiki/HQK

LambdaCube is a 3D rendering engine entirely written


5.10 Graphics in Haskell.
The main goal of this project is to provide a modern
5.10.1 diagrams and feature rich graphical backend for various Haskell
Report by: Brent Yorgey
projects, and in the long run it is intended to be a
Status: active development practical solution even for serious purposes. The en-
gine uses Ogre3D’s (http://www.ogre3d.org) mesh and
material file format, therefore it should be easy to find
The diagrams library provides an embedded domain- or create new content for it. The code sits between the
specific language for creating simple pictures and dia- low-level C API (raw OpenGL, DirectX or anything
grams. Values of type Diagram are built up in a compo- equivalent; the engine core is graphics backend agnos-
sitional style from various primitives and combinators, tic) and the application, and gives the user a high-level
and can be rendered to a physical medium, such as a file API to work with.
in PNG, PS, PDF, or SVG format. The overall vision The most important features are the following:

36
◦ loading and displaying Ogre3D models in some way. I will also expand the wiki with more ex-
◦ resource management amples and tutorials. Any help would be appreciated!
◦ modular architecture
If your system has OpenGL and GLUT installed,
Further reading
the lambdacube-examples package should work out of
the box. The engine is also integrated with the Bullet http://www.haskell.org/haskellwiki/GPipe
physics engine (→ 6.11.7), and you can find a running
example in the lambdacube-bullet package.

5.10.4 ChalkBoard
Report by: Andy Gill
Participants: Kevin Matlage, Andy Gill
Status: ongoing
ChalkBoard is a domain specific language for describing
images. The language is uncompromisingly functional
and encourages the use of modern functional idioms.
The novel contribution of ChalkBoard is that it uses
off-the-shelf graphics cards to speed up rendering of
our functional description. The intention is that we
will use ChalkBoard to animate educational videos, as
Everyone is invited to contribute! You can help well as processing streaming videos.
the project by playing around with the code, thinking Here is the basic architecture of ChalkBoard.
about API design, finding bugs (well, there are a lot of
them anyway), creating more content to display, and ChalkBoard DSL Capture
Image / ChalkBoard
generally stress testing the library as much as possible Specification & Compile IR
by using it in your own projects.
Deep Back End ChalkBoard
Further reading DSL 
OpenGL
http://www.haskell.org/haskellwiki/LambdaCubeEngine
GPU
5.10.3 GPipe
The image specification language is a deeply embed-
Report by: Tobias Bexelius ded Domain Specific Language (DSL). We capture and
Status: active development
compile our DSL, rather than interpret it directly. In
GPipe models the entire graphics pipeline in a purely order to do this, and allow use of a polygon-based back-
functional, immutable and type-safe way. It is built end, we have needed to make some interesting compro-
on top of the programmable pipeline (i.e., non-fixed mises, but the language captured remains pure, has
function) of OpenGL 2.1 and uses features such as ver- a variant of functors as a control structure, and has
tex buffer objects (VBO’s), texture objects, and GLSL first-class images. We compile this language into an
shader code synthetisation to create fast graphics pro- imperative intermediate representation that has first
grams. Buffers, textures, and shaders are cached in- class buffers — regular arrays of colors or other entities.
ternally to ensure fast framerate, and GPipe is also This language is then interpreted by macro-expanding
capable of managing multiple windows and contexts. each intermediate representation command into a set of
GPipe’s aim is to be as close to the conceptual graph- OpenGL commands. In this way, we leverage modern
ics pipeline as possible, and not to add any more levels graphics boards to do the heavy lifting of the language.
of abstraction. A release is planned for early November, and will be
In GPipe, you work with four main data types: Prim- available on Hackage.
itiveStreams, FragmentStreams, FrameBuffers, and The new video processing technology will be pre-
textures. They are all immutable, and all parameter- miered at PEPM’10.
ized on the type of data they contain to ensure type
safety between pipeline stages. By creating your own Further reading
instances of GPipes type classes, it is possible to use
additional data types on the GPU. http://www.ittc.ku.edu/csdl/ChalkBoard
Version 1.0.1 with documentation is released on
Hackage. Work continues on improving performance of
GPipe, including adding support for mutable resources

37
5.10.5 graphviz MIDI, but also using a high-performance back-end for
real-time audio.
Report by: Ivan Lazar Miljenovic Euterpea is being developed at Yale in Paul Hudak’s
Status: version 2999.6.0.0 research group, where it has become a key component
The graphviz library provides Haskell bindings to the of Yale’s new Computing and the Arts major. Hudak is
GraphViz suite of tools for visualising graphs. This teaching a two-term sequence in computer music using
library was originally written by Matthew Sackman, Euterpea, and is developing considerable pedagogical
but has been maintained (and almost completely re- material, including a new textbook tentatively titled
written) by myself since the 2009.5.1 release. “The Haskell School of Music”. The name “Euterpea”
The library supports almost all GraphViz attributes, is derived from “Euterpe”, who was one of the nine
and can produce and parse graphs represented in Greek Muses (goddesses of the arts), specifically the
GraphViz’s Dot language (albeit with the limitation Muse of Music.
of strict ordering of Dot statements). Clusters are also
supported, and strings used for labels and identifiers History
are automatically quoted appropriately.
Currently supported are conversions from FGL Haskore is a Haskell library developed almost 15
graphs as well as annotating nodes and edges in FGL years ago by Paul Hudak at Yale for high-level com-
graphs with their positions, etc. Support for other puter music applications. HasSound is a more recent
graph types is planned for a future release. Haskell library developed at Yale that serves as a func-
For a sample graph visualised using the graphviz li- tional front-end to csound’s sound synthesis capabili-
brary, see SourceGraph (→ 4.2.1). ties. Haskore and HasSound have evolved in a number
of different ways over the years, most notably through
Further reading Henning Thielemann’s darcs library for Haskore, to
which many people have contributed. There are many
◦ http://hackage.haskell.org/package/graphviz good ideas in that library, but it has become overly
◦ http://www.graphviz.org/ complex and lacks a coherent design concept.

Future plans
5.11 Music
The Euterpea developers’ plan is to shamelessly steal
5.11.1 Haskore revision good ideas from these previous efforts, integrate them
into a coherent new framework, remove dependencies
Report by: Henning Thielemann from as many non-Haskell libraries as possible, add new
Participants: Paul Hudak features such as musical GUI widgets, and incorporate
Status: experimental, active development new methods for high-performance stream processing
See: http://haskell.org/communities/05-2009/html/ recently developed at Yale, to make Euterpea the li-
report.html#sect5.12.1. brary of choice for discriminating computer music hack-
ers.
5.11.2 Euterpea
Further reading
Report by: Paul Hudak
Participants: Eric Cheng, Paul Liu, Donya Quick ◦ http://plucky.cs.yale.edu/cs431
Status: experimental, active development ◦ http://plucky.cs.yale.edu/cs431/HaskoreSoeV-0.12.
pdf
Euterpea is a new Haskell library for computer music
applications. It is a descendent of Haskore and Has-
Sound, and is intended for both educational purposes as 5.12 Web and XML programming
well as serious computer music development. Euterpea
is a “wide-spectrum” library, suitable for high-level mu- 5.12.1 Haskell XML Toolbox
sic representation, algorithmic composition, and anal-
ysis; mid-level concepts such as MIDI; and low-level Report by: Uwe Schmidt
audio processing, sound synthesis, and instrument de- Status: seventh major release (current release: 8.3.2)
sign. It also includes a “musical user interface”, a set Description
of computer-music specific GUI widgets such as key-
boards, guitar frets, knobs, sliders, and so on. The The Haskell XML Toolbox (HXT) is a collection of
performance of Euterpea is intended to be as good or tools for processing XML with Haskell. It is itself
better than any existing computer music language – it purely written in Haskell 98. The core component of
can be used for real-time applications, not just using the Haskell XML Toolbox is a validating XML-Parser

38
that supports almost fully the Extensible Markup Lan- describing the design of the toolbox, the DTD val-
guage (XML) 1.0 (Second Edition). There is a valida- idator, the arrow based Relax NG validator, and the
tor based on DTDs and a new more powerful one for XSLT system.
Relax NG schemas. A getting started tutorial about HXT is avail-
The Haskell XML Toolbox is based on the ideas of able in the Haskell Wiki (http://www.haskell.org/
HaXml (http://haskell.org/communities/05-2009/html/ haskellwiki/HXT ). The conversion between XML
report.html#sect5.13.2) and HXML, but introduces and native Haskell datatypes is described in an-
a more general approach for processing XML with other Wiki page (http://www.haskell.org/haskellwiki/
Haskell. The processing model is based on arrows. The HXT/Conversion_of_Haskell_data_from/to_XML).
arrow interface is more flexible than the filter approach
taken in the earlier HXT versions and in HaXml. It is 5.12.2 tagsoup
also safer; type checking of combinators becomes pos-
sible with the arrow approach. Report by: Neil Mitchell
HXT consists of two packages, the old first approach
(hxt-filter) based on filters and the newer and more
TagSoup is a library for extracting information out of
flexible and safe approach using arrows (hxt). The old
unstructured HTML code, sometimes known as tag-
package hxt-filter, will further be maintained to work
soup. The HTML does not have to be well formed,
with the latest ghc version, but new development will
or render properly within any particular framework.
only be done with the arrow based hxt package.
This library is for situations where the author of the
HTML is not cooperating with the person trying to
Features extract the information, but is also not trying to hide
the information.
◦ Validating XML parser The library provides a basic data type for a list of un-
◦ Very liberal HTML parser structured tags, a parser to convert HTML into this tag
◦ Lightweight lazy parser for XML/HTML based on type, and useful functions and combinators for finding
Tagsoup (→ 5.12.2) and extracting information. The library has seen real
◦ Easy de-/serialization between native Haskell data use in an application to give Hackage (→ 5.1) listings,
and XML by pickler and pickler combinators and is used in the next version of Hoogle (→ 4.3.1).
◦ XPath support Work continues on the API of tagsoup, and the im-
◦ Full Unicode support plementation. In particular the development version is
◦ Support for XML namespaces based around the HTML 5 specification, and supports
◦ Cabal package support for GHC many flavours of ByteString in addition to String.
◦ HTTP access via Haskell bindings to libcurl
◦ Tested with W3C XML validation suite
Further reading
◦ Example programs
◦ Relax NG schema validator http://community.haskell.org/~ndm/tagsoup
◦ An HXT Cookbook for using the toolbox and the
arrow interface
◦ Basic XSLT support
◦ Darcs repository with current development version
(8.3.1) under http://darcs2.fh-wedel.de/hxt

Current Work

Currently mainly maintenance work is done. This in-


cludes space and runtime optimizations.
The HXT library is extensively used in the Holumbus
project (→ 6.3.1), there it forms the basis for the index
generation.

Further reading

The Haskell XML Toolbox Web page (http:


//www.fh-wedel.de/~si/HXmlToolbox/index.html)
includes downloads, online API documentation, a
cookbook with nontrivial examples of XML processing
using arrows and RDF documents, and master theses

39
6 Applications and Projects

6.1 For the Masses 6.1.2 xmonad

6.1.1 Darcs Report by: Don Stewart


Status: active development
Report by: Eric Kow
Participants: Reinier Lamers, Ganesh Sittampalam xmonad is a tiling window manager for X. Windows are
Status: active development arranged automatically to tile the screen without gaps
or overlap, maximizing screen use. Window manager
features are accessible from the keyboard: a mouse is
Darcs is a distributed revision control system written
optional. xmonad is written, configured, and extensi-
in Haskell. In Darcs, every copy of your source code
ble in Haskell. Custom layout algorithms, key bindings,
is a full repository, which allows for full operation in a
and other extensions may be written by the user in con-
disconnected environment, and also allows anyone with
fig files. Layouts are applied dynamically, and different
read access to a Darcs repository to easily create their
layouts may be used on each workspace. Xinerama is
own branch and modify it with the full power of Darcs’
fully supported, allowing windows to be tiled on several
revision control. Darcs is based on an underlying the-
physical screens.
ory of patches, which allows for safe reordering and
merging of patches even in complex scenarios. For all The new release 0.7 of xmonad added full support for
its power, Darcs remains a very easy to use tool for ev- the GNOME and KDE desktops, and adoption contin-
ery day use because it follows the principle of keeping ues to grow, with binary packages of xmonad available
simple things simple. for all major distributions.
Our most recent major release, Darcs 2.3, was in July
2009. This release provides better performance and
Further reading
easier installation. The next release promises to be a
particularly exciting one: ◦ Homepage: http://xmonad.org/
1. Faster repository-local operations: Darcs devel- ◦ Darcs source:
oper Petr Rockai has succesfully completed his 2009 darcs get http://code.haskell.org/xmonad
Google Summer of Code program. This work opti- ◦ IRC channel: #xmonad @ irc.freenode.org
mizes Darcs’ use of hashed storage repositories, mak- ◦ Mailing list: hxmonad@haskell.orgi
ing Darcs faster and more scalable in repository-local
operations. We are extremely grateful for generous
support of the Haskell.org mentoring organization, 6.2 Education
which has provided us with one of their Google Sum-
mer of Code slots. 6.2.1 Exercise Assistants
2. Hunk-splitting: Ganesh Sittampalam has imple- Report by: Bastiaan Heeren
mented an improvement that gives users much Participants: Alex Gerdes, Johan Jeuring, Josje Lodder,
greater control over patches created by Darcs. In José Pedro Magalhães
the interactive darcs record interface, users can opt Status: experimental, active development
to split hunk patches into smaller pieces, allowing for
more granular patches where appropriate and mak-
ing cherry picking more useful in practice. At the Open Universiteit Nederland and Universiteit
These changes and more will appear in the upcoming Utrecht we are continuing our work on tools that
Darcs 2.4 release, scheduled for January 2010. We still support students in solving exercises incrementally by
have a lot progress to make and are always open to checking intermediate steps. The distinguishing feature
contributions. Haskell hackers, we need your help! of our tools is the detailed feedback that they provide,
Darcs is free software licensed under the GNU GPL. on several levels. For example, we have an online exer-
Darcs is a proud member of the Software Freedom Con- cise assistant that helps to rewrite logical expressions
servancy, a US tax-exempt 501(c)(3) organization. We into disjunctive normal form. Students get instant feed-
accept donations at http://darcs.net/donations.html. back when solving an exercise, and can ask for a hint
at any point in the derivation. Other areas covered
by our tools are solving equations, reducing matrices
Further reading
to echelon normal form, and simplifying expressions in
http://darcs.net relation algebra.

40
◦ Alex Gerdes, Johan Jeuring, and Bastiaan Heeren.
Using Strategies for Assessment of Programming Ex-
ercises. To appear in the Technical Symposium on
Computer Science Education (SIGCSE 2010).

6.2.2 Holmes, plagiarism detection for Haskell


Report by: Jurriaan Hage
Participants: Brian Vermeer
Years ago, Jurriaan Hage developed Marble to detect
plagiarism among Java programs. Marble was written
in Perl, takes just 660 lines of code and comments, and
does the job well. The techniques used there, however,
do not work well for Haskell, which is why a master
thesis project was started, starring Brian Vermeer as
We have just started to explore exercise assistants the master student, to see if we can come up with a
for learning how to program in Haskell. A case study working system to discover plagiarism among Haskell
was performed to use programming strategies for auto- programs. We are fortunate to have a large group of
matically assessing student programs submitted for a students each year that try their hand at our functional
first-year course on functional programming in Utrecht. programming course (120-130 per year), and we have
For each exercise domain, we need the same function- all the loggings of Helium that we hope can help us tell
ality, such as unifying and rewriting terms, generating whether the system finds enough plagiarism cases. The
exercises, traversing terms, and testing for (top-level) basic idea is to implement as many metrics as possible,
equality of two terms. For these parts we are currently and to see, empirically, which combination of metrics
using the generic programming libraries Uniplate and scores well enough for our purposes. The implementa-
Multirec, which help us to reduce code size and im- tion will be made in Haskell. One of the things that
prove the reliability of our code. We have reported we are particularly keen about, is to make sure that for
our experiences with generic programming for domain assignments in which students are given a large part of
reasoners, and identified some missing features in the the solution and they only need to fill in the missing
libraries. Fully exploiting generic programming tech- parts, we still obtain good results.
niques is ongoing work. We are currently at the stage that metrics can be
We have recently integrated our tools with the Digi- implemented on top of the Helium front-end. Many of
tal Mathematics Environment (DWO) of the Freuden- these metrics will be defined on an auxiliary structure,
thal Institute. This environment contains a collection the function-call flow graph. Dead-code removal has
of applets for practicing exercises in mathematics. A taken place, fully qualified names are used throughout,
selected number of applets has been extended with our and template removal is now easily possible.
facility to automatically generate hints and worked-out
examples, and the first results are promising. To offer 6.2.3 INblobs — Interaction Nets interpreter
this service, we have introduced views for mathematical
expressions (based on the views proposed by Wadler), Report by: Miguel Vilaca
and combined these with our rewriting technology. A Participants: Daniel Mendes
Status: active
view specifies a canonical form, and abstracts over a set
Portability: portable (depends on wxHaskell)
of algebraic laws. Our feedback services have recently
been released as a Cabal source package. See: http://haskell.org/communities/05-2009/html/
report.html#sect6.2.4.
Further reading
6.2.4 Yahc
◦ Online exercise assistant, accessible from our project
Report by: Miguel Pagano
page.
Participants: Renato Cherini
◦ Bastiaan Heeren and Johan Jeuring. Canonical Status: experimental, maintained
Forms in Interactive Exercise Assistants. Pro- The first course on algorithms in CS at Universidad Na-
ceedings of Mathematical Knowledge Management cional de Córdoba is centered on the derivations of al-
(MKM 2009). gorithms from specifications, as proposed by R.S. Bird
(Introduction to functional programming using Haskell,
◦ Johan Jeuring, José Pedro Magalhães, and Bastiaan
Prentice Hall Series in Computer Science, 1998), E.W.
Heeren. Generic Programming for Domain Reason-
Dijkstra (A Discipline of Programming, Prentice Hall,
ers. To appear in the Symposium on Trends in Func-
1976), and R.R. Hoogerwoord (The design of functional
tional Programming (TFP 2009).

41
programs: a calculational approach, Technische Uni- 6.3 Web Development
versiteit Eindhoven, 1989). To achieve this goal, stu-
dents should acquire the ability to manipulate complex 6.3.1 Holumbus Search Engine Framework
predicate formulae; thus the students first learn how
Report by: Uwe Schmidt
to prove theorems in a propositional calculus similar
Participants: Timo B. Hübel, Sebastian Reese,
to the equational propositional logic of D. Gries and Sebastian Schlatt, Stefan Schmidt, Björn
F.B. Schneier (A Logical Approach to Discrete Math, Peemöller, Stefan Roggensack, Alexander
Springer-Verlag, 1993). Treptow
During the semester students make many derivations Status: first release
as exercises and it is helpful for them to have a tool
for checking the correctness of their solutions. Yahc
checks the correctness of a sequence of applications of Description
some axioms and theorems to the formulae students
The Holumbus framework consists of a set of modules
are trying to prove. The student starts a derivation by
and tools for creating fast, flexible, and highly cus-
entering an initial formula and a goal and then pro-
tomizable search engines with Haskell. The framework
ceeds by telling Yahc which axiom will be used and the
consists of two main parts. The first part is the indexer
expected outcome of applying the axiom as a rewrite
for extracting the data of a given type of documents,
rule; if that rewriting step is correct then the process
e.g., documents of a web site, and store it in an appro-
continues until the student reaches the goal.
priate index. The second part is the search engine for
At this moment the tool is in an early stage and we
querying the index.
only consider propositional connectives (some of them
An instance of the Holumbus framework is the
associative-commutative). We expect to extend Yahc
Haskell API search engine Hayoo! (http://holumbus.
for allowing the resolution of logical puzzles. In the
fh-wedel.de/hayoo/). The web interface for Hayoo! is
long term we are planning to consider an equational
implemented with the Janus web server, written in
calculus with functions defined by induction over lists
Haskell and based on HXT (→ 5.12.1).
and natural numbers.
The framework supports distributed computations
for building indexes and searching indexes. This is done
Further reading with a MapReduce like framework. The MapReduce
http://www.cs.famaf.unc.edu.ar/~mpagano/yahc/ framework is independent of the index- and search-
components, so it can be used to develop distributed
systems with Haskell.
The framework is now separated into four packages,
6.2.5 grolprep
all available on Hackage.
Report by: Dino Morelli
Participants: Betty Diegel ◦ The Holumbus Search Engine
Status: experimental, actively developed
◦ The Holumbus Distribution Library
grolprep is a web application for studying the FCC
GROL questions in preparation of taking the exams. ◦ The Holumbus Storage System
The study of this multiple-choice data is in the flash-
card style. Students can choose from Elements 1, 3 ◦ The Holumbus MapReduce Framework
and 8 and can specify any subelement of those three for
specific study. Questions and answers can be randomly The search engine package includes the indexer and
presented. search modules, the MapReduce package bundles the
Additionally, simulations of the randomly-chosen ex- distributed MapReduce system. This is based on two
ams can be practiced with this software. other packages, which may be useful for their on: The
grolprep will shortly be used by students of Avionics Distributed Library with a message passing communi-
program at the Burlington Aviation Technology School. cation layer and a distributed storage system.

Further reading Features

◦ Live website: http://ui3.info/grolprep/bin/ ◦ Highly configurable crawler module for flexible in-
fcc-grol-prep.cgi dexing of structured data
◦ Project page: http://ui3.info/d/proj/grolprep.html
◦ Customizable index structure for an effective search
◦ Source repository: darcs get http://ui3.info/darcs/
grolprep ◦ find as you type search

◦ Suggestions

42
◦ Fuzzy queries thesis-searching.pdf. Sebastian Schlatt’s thesis deal-
ing with the crawler component is available at http://
◦ Customizable result ranking holumbus.fh-wedel.de/src/doc/thesis-indexing.pdf. The
thesis of Stefan Schmidt describing the Holumbus
◦ Index structure designed for distributed search
MapReduce is available via http://holumbus.fh-wedel.
◦ Darcs repository with current development version de/src/doc/thesis-mapreduce.pdf.
under http://darcs2.fh-wedel.de/holumbus
6.3.2 HCluster
◦ Distributed building of search indexes
Report by: Alberto Gómez Corona
Current Work
HCluster (provisional name) is a remote clustering mid-
The indexer and search module will be used and
dleware aimed initially at verifying online and offline
extended to support the Hayoo! engine for search-
computations in distributed electoral processes. Ex-
ing the hackage package library (http://holumbus.fh-
tended to permit clustering with distributed transac-
wedel.de/hayoo/hayoo.html).
tions and cloud computing.
In a follow-up project of Stefan Schmidt’s system, Se-
basian Reese is working on a cookbook for programming ◦ distributed transactions between connected nodes in
with the MapReduce framework and for giving tuning the Internet
and configuration hints. Benchmarks for various small
◦ work with online nodes as well as offline + synchro-
problems and for generating search indexes have shown
nization
that the architecture scales very well. The thesis with
the final results will be finished end of March 2010. ◦ hot plug-in of nodes
In a further subproject, the so called Hawk system,
◦ no single point of failure/control
Björn Peemöller and Stefan Roggensack developped a
web framework for Haskell. The results of this master ◦ theoretical massive scalability, reliability, availability
thesis will be published soon on the Holumbus web site.
Any node can initiate a process (that may involve a
The Hawk system is comparable in functionality and
transaction, a query, a calculation etc.). The design of
architecture with Ruby on Rail and other web frame-
synchronization permits nodes to work in online as well
works. Its architecture follows the MVC pattern. It
as offline mode with periodic synchronization with cer-
consists of a simple relational database mapper for per-
tain restrictions. The restrictions depend on algebraic
sistent storage of data and a template system for the
properties of the transactions.
view component. This template system has two inter-
Distribution of data and distributed transactions are
esting features: First the templates are valid XHTML
possible. The distribution is transparent to the pro-
documents. The parts where data has to be filled in
grammer, so re-locations of data can be done among
are marked with Hawk specific elements and attributes.
the nodes.
These parts are in a different namespace, so they do not
Finished basic services: HTTP protocol, reconnec-
destroy the XHTML structure. The second interesting
tion, synchronization. Testing synchronization and on-
feature is that the templates contain type descriptions
line clustering now defined and coded the model for
for the values to be filled in. This type information en-
distributed transactions.
ables a static check whether the models and views fit
together.
The Hawk framework is independent of the Holum- Future plans
bus search engine. It will be applicable for the devel- ◦ test distributed transactions
opment of arbitrary web applications, but one of the ◦ create internet documentation
first applications is the reimplementation of the web
interface for the Hayoo! search engine. This project Contact
will be done by Alexander Treptow within the next six
months. hagocorona@gmail.comi

Further reading 6.3.3 JavaScript Monadic Writer

The Holumbus web page (http://holumbus.fh-wedel. Report by: Dmitry Golubovsky


Status: active development
de/) includes downloads, Darcs web interface, cur-
rent status, requirements, and documentation. Timo JavaScript Monadic Writer (JSMW) is an extensible
Hübel’s master thesis describing the Holumbus in- monadic framework on top of the Haskell DOM bind-
dex structure and the search engine is available ings. It provides an EDSL to encode JavaScript state-
at http://holumbus.fh-wedel.de/branches/develop/doc/ ments and expressions in typesafe manner. It borrows

43
some ideas from HJScript, but uses slightly different Haskell converter is based on H/Direct IDL parser. Au-
EDSL notation. tomatic IDL conversion is expected to simplify Haskell
The idea behind JSWM is to provide an intermedi- Web development because of the large number of
ate form that could be used as an end-point for con- methods and attributes defined in contemporary DOM
version from Haskell Core. The EDSL however may be whose type signatures are hard and time-consuming to
considered as a programming tool on its own. While derive manually.
the EDSL alone is not sufficient for translation of an
arbitrary Haskell program to JavaScript, Haskell type
Further reading
system is still available to help produce correct code.
◦ Document Object Model (DOM) Technical Reports
Further reading http://www.w3.org/DOM/DOMTR
◦ The DOM package on Hackage
The jsmw package on Hackage: http://hackage.haskell. http://hackage.haskell.org/cgi-bin/hackage-scripts/
org/cgi-bin/hackage-scripts/package/jsmw package/DOM

6.3.4 Haskell DOM Bindings 6.3.5 gitit


Report by: Dmitry Golubovsky Report by: John MacFarlane
Status: active development Participants: Gwern Branwen, Simon Michael, Henry
Haskell DOM bindings is a set of monadic smart Laxen, Anton van Straaten, Robin Green,
constructors on top of the WebBits representation of Thomas Hartman, Justin Bogner, Kohei
Ozaki, Dmitry Golubovsky, Anton
JavaScript syntax to generate JavaScript code that
Tayanovskyy, Dan Cook
calls DOM methods and accesses DOM objects’ at- Status: active development
tributes.
In order to represent the hierarchy of DOM inter- Gitit is a wiki built on Happstack and backed by a git
faces, Haskell type classes are used. For example, for or darcs filestore. Pages and uploaded files can be mod-
the interfaces Node and Document (the latter inher- ified either directly via the VCS’s command-line tools
its from the former) there are two classes: CNode and or through the wiki’s web interface. Pandoc (→ 6.4.1)
CDocument. Also, for each DOM interface, a phantom is used for markup processing, so pages may be written
data type is defined: TNode, and TDocument in this in (extended) markdown, reStructuredText, LaTeX,
case. Phantom types represent concrete values (refer- HTML, or literate Haskell, and exported in ten dif-
ences to DOM objects) while type classes are used for ferent formats, including LaTeX, ConTeXt, DocBook,
type constraints in functions working with DOM ob- RTF, OpenOffice ODT, and MediaWiki markup.
jects. The CDocument class is defined as: Notable features of gitit include:

class CNode a => CDocument a ◦ Plugins: users can write their own dynamically
data TNode loaded page transformations, which operate directly
data TDocument on the abstract syntax tree.
instance CNode TNode ◦ Math support: LaTeX inline and display math
instance CDocument TDocument is automatically converted to MathML, using the
instance CNode TDocument texmath library.
Type constraints are used to define methods of each ◦ Highlighting: Any git or darcs repository can be
class, e. g. made a gitit wiki. Directories can be browsed,
and source code files are automatically syntax-
hasChildNodes :: (Monad mn, CNode this) highlighted. Code snippets in wiki pages can also
=> Expression this -> mn (Expression Bool) be highlighted.
so, hasChildNodes can be called on both Node and ◦ Library: Gitit now exports a library,
Document, but Network.Gitit, that makes it easy to include
a gitit wiki (or wikis) in any Happstack application.
createElement :: (Monad mn, CDocument this,
CElement zz) ◦ Literate Haskell: Pages can be written directly in
=> Expression String -> Expression this literate Haskell.
-> mn (Expression zz)
Further reading
only on nodes representing documents.
The bindings were auto-generated from OMG IDL http://gitit.net (itself a running demo of gitit)
files provided by the Web Consortium. The IDL to

44
6.4 Data Management and Visualization The tool also contains a front-end to read spread-
sheets in the Excel and Gnumeric formats: the front-
6.4.1 Pandoc end reads spreadsheets in portable XML documents us-
ing the UMinho Haskell Libraries. We reuse the spatial
Report by: John MacFarlane logic algorithms from the UCheck project to discover
Participants: Andrea Rossato, Peter Wang, Paulo
the tables stored in the spreadsheet.
Tanimoto
Finally, two spreadsheet tools are available: a batch
Status: active development
and an online tool that allows the users to read, trans-
form and refactor spreadsheets.
Pandoc aspires to be the swiss army knife of text Using part of HaExcel, we developed an OpenOffice
markup formats: it can read markdown and (with some Calc (http://www.openoffice.org/product/calc.html) ad-
limitations) HTML, LaTeX, and reStructuredText, and don. Its back-end reuses part of HaExcel and its front-
it can write markdown, reStructuredText, HTML, Doc- end is written in OpenOffice Basic. This addon allows
Book XML, OpenDocument XML, ODT, RTF, groff the integration of a relational model into the spread-
man, MediaWiki markup, GNU Texinfo, LaTeX, Con- sheet. Using this model the user gets three new fea-
TeXt, and S5. Pandoc’s markdown syntax includes ex- tures in the spreadsheet environment: auto-completion
tensions for LaTeX math, tables, definition lists, foot- of columns, that is, choosing values of some columns,
notes, and more. other columns become automatically completed; safe
Since the last report, there has been one release deletion of rows where the user is warned when delet-
(1.2.1). ing important information; and no edition of columns
that could compromise the data integrity. All the fea-
◦ Users may notice a significant speedup in read- tures can be enabled and disabled by the user at any
ing markdown in --smart mode; the abbreviations time. A snapshot of a spreadsheet with the addon can
parser has been made much more efficient. be seen below.
◦ Default HTML output now wraps sections in divs
with unique identifiers. This should aid manipula-
tion using javascript and other tools.
◦ We have made some progress in replacing the old
POSIX shell script wrappers with more portable More about this can be read in the paper “Discovery-
Haskell wrappers. based Edit Assistance for Spreadsheets”.
The sources, the online tool and the addon are avail-
Further reading able from the project home page.
http://johnmacfarlane.net/pandoc/ We are currently exploring foreign key constraints
from their detection to their migration to the generated
spreadsheet.
6.4.2 HaExcel — From Spreadsheets to Relational
Databases and Back
Further reading
Report by: Jácome Cunha
http://www.di.uminho.pt/~jacome
Participants: João Saraiva, Joost Visser
Status: unstable, work in progress
6.4.3 SdfMetz
Report by: Tiago Miguel Laureano Alves
HaExcel is a framework to manipulate and transform
Participants: Joost Visser
spreadsheets. It is composed by a generic/reusable
Status: stable, maintained
library to map spreadsheets into relational database
models and back: this library contains an algebraic See: http://haskell.org/communities/05-2009/html/
data type to model a (generic) spreadsheet and func- report.html#sect6.4.5.
tions to transform it into a relational model and vice
versa. Such functions implement the refinement rules 6.4.4 The Proxima 2.0 generic editor
introduced in paper “From Spreadsheets to Relational
Databases and Back”. The library includes two code Report by: Martijn Schrage
generator functions: one that produces the SQL code to Participants: Lambert Meertens, Doaitse Swierstra
create and populate the database, and a function that Status: actively developed
generates Excel/Gnumeric code to map the database
back into a spreadsheet. A MySQL database can also Proxima 2.0 is an open-source web-based version of the
be created and manipulated using this library under Proxima generic presentation-oriented editor for struc-
HaskellDB. tured documents.

45
◦ Proxima is a generic editor. This means that the edi- Further reading
tor can be instantiated for arbitrary document types,
http://www.oblomov.biz/proxima2.0.html
supplemented by parser and presentation sheets.
The content of a Proxima document can be mixed
text, images and diagrams. 6.5 Functional Reactive Programming
◦ Proxima is a presentation-oriented editor. This 6.5.1 Functional Hybrid Modelling
means that the user performs the edit operations on
the WYSIWYG screen presentation of the document. Report by: George Giorgidze
Participants: Joey Capper, Henrik Nilsson
◦ Proxima is aware of the structure of the document. Status: active research and development
Even while editing the presentation of the document,
the edit operations can be structural. For example, The goal of the FHM project is to gain a better foun-
a section can be changed into a subsection. dational understanding of non-causal, hybrid modelling
and simulation languages for physical systems and ul-
Another feature of Proxima is that it offers generic
timately to improve on their capabilities. At present,
support for specifying content-dependent computa-
our central research vehicle to this end is the design and
tions. For example, it is possible to create a table of
implementation a new such language centred around a
contents of a document that is automatically updated
small set of core notions that capture the essence of the
as chapters or sections are added or modified.
domain.
Causal modelling languages are closely related to
Proxima 2.0 synchronous data-flow languages. They model system
behaviour using ordinary differential equations (ODEs)
Proxima 2.0 provides a web-interface for Proxima. In-
in explicit form. That is, cause-effect relationship be-
stead of rendering the edited document onto an appli-
tween variables must be explicitly specified by the mod-
cation window, Proxima 2.0 is a web-server that sends
eller. In contrast, non-causal languages model system
an HTML rendering of the document to a client. The
behaviour using differential algebraic equations (DAEs)
client catches mouse and keyboard events, and sends
in implicit form, without specifying their causality. In-
these back to the server, after which the server sends
ferring causality from usage context for simulation pur-
incremental rendering updates back to the client. As a
poses is left to the compiler. The fact that the causal-
result, advanced editors can be created, which run in
ity can be left implicit makes modelling in a non-causal
any browser.
language more declarative (the focus is on expressing
In the past half year, the system has been extended
the equations in a natural way, not on how to express
with drag and drop, improved navigation, session han-
them to enable simulation) and also makes the models
dling, and a number of techniques for handling net-
much more reusable.
work latency. Furthermore, a number of example edi-
FHM is an approach to modelling which combines
tors have been implemented. The screenshot shows an
functional programming and non-causal modelling. In
editor for documenting Bayesian networks. It is run-
particular, the FHM approach proposes modelling with
ning in a Firefox browser.
first class models (defined by continuous DAEs) using
combinators for their composition and discrete switch-
ing. The discrete switching combinators enable mod-
elling of hybrid systems (i.e. systems that exhibit both
continuous and discrete dynamic behaviour). The key
concepts of FHM originate from work on Functional
Reactive Programming (FRP).
We are implementing Hydra, an FHM language, as
a domain-specific language embedded in Haskell. The
method of embedding employs quasiquoting and en-
ables modellers to use the domain specific syntax in
their models. The present prototype implementation
of Hydra enables modelling with first class models and
supports combinators for their composition and dis-
crete switching.
Recently, we have implemented support for dynamic
Future plans switching among models that are computed at the
point when they are being “switched in”. Models that
Proxima 2.0 is an open source project. We are looking are computed at run-time are just-in-time (JIT) com-
for people who would like to participate in the project. piled to efficient machine code. This allows efficient

46
simulation of highly structurally dynamic systems (i.e., to any imperative framework, although it is probably
systems where the number of structural configurations not a good choice to program primarily event-driven
is large, unbounded or impossible to determine in ad- systems, because it is pull-based.
vance). This goes beyond to what current state-of-the- The code is readily available via cabal-install in
art non-causal modelling languages can model. The the elerea package. You are advised to install
implementation techniques that we developed should elerea-examples as well to get an idea how to build
benefit other modelling and simulation languages as non-trivial systems with it. The examples are sepa-
well. rated in order to minimize the dependencies of the core
We are also exploring ways of utilising the type sys- library.
tem to provide stronger correctness guarantees and to
provide more compile time reassurances that our sys- Further reading
tem of equations is not unsolvable. Properties such as
equational balance (ensuring that the number of equa- ◦ http://hackage.haskell.org/cgi-bin/hackage-scripts/
tions and unknowns are balance) and ensuring the solv- package/elerea
ability of locally scoped variables are among our goals. ◦ http://hackage.haskell.org/cgi-bin/hackage-scripts/
Dependent types have been adopted as the tool for ex- package/elerea-examples
pressing these static guarantees. However, we believe
that more practical type systems (such as system F) 6.6 Audio and Graphics
could be conservatively extended to make FHM safer
without compromising their usability. 6.6.1 Audio signal processing

Further reading Report by: Henning Thielemann


Status: experimental, active development
The implementation of Hydra is available from http:
//www.cs.nott.ac.uk/~ggg/ under the open source BSD
license. In this project, audio signals are processed using pure
Haskell code and the Numeric Prelude framework (→
5.5.3). The highlights are:
6.5.2 Elerea
◦ a basic signal synthesis backend for Haskore (→
Report by: Patai Gergely
5.11.1),
Status: experimental, active
◦ support for physical units while maintaining effi-
Elerea (Eventless reactivity) is a tiny continuous-time ciency,
FRP implementation without the notion of event-based ◦ frameworks for abstraction from sample rate, that
switching and sampling, with first-class signals (time- is, the sampling rate can be omitted in most parts
varying values). Reactivity is provided through various of a signal processing expression. We tried hard to
higher-order constructs that also allow the user to work preserve the functional style of programming and do
with arbitrary time-varying structures containing live not need Arrows and according notation.
signals.
Stateful signals can be safely generated at any time ◦ We checked several low-level implementations in or-
through a specialised monad, while stateless combina- der to achieve reasonable speed. We complement
tors can be used in a purely applicative style. Elerea the standard list type with a lazy StorableVector
signals can be defined recursively, and external input structure and a StateT s Maybe a generator, like in
is trivial to attach. A unique feature of the library is stream-fusion. Now, both our custom signal genera-
that cyclic dependencies are detected on the fly and re- tor type and the Stream type from stream-fusion can
solved by inserting delays dynamically, unless the user be fused to work directly on storable vectors.
does it explicitly.
As an example, the following code snippet is a possi- ◦ support for causal processes. Causal signal processes
ble way to define an approximation of our beloved trig only depend on current and past data and thus are
functions: suitable for real-time processing (in contrast to a
function like time reversal). These processes are
(sine,cosine) <- mdo modeled as mapAccumL like functions. Many impor-
s <- integral 0 c tant operations like function composition maintain
c <- integral 1 (-s) the causality property. They are important for shar-
return (s,c) ing on a per sample basis and in feedback loops where
they statically warrant that no future data is ac-
The library is minimal by design, and it provides
cessed.
low-level primitives one can build a cleaner set of com-
binators upon. Also, it is relatively easy to adapt it Recent advances are:

47
◦ Lazy time values to be used for gate signals, n-dimensional convex hull computation were demon-
strated through a graphical user interface written with
◦ enhanced type class framework for unifying lazy time wxHaskell functions. In this report, we have applied
values and signals expressed by lists, storable vectors the same approach to a more complicated spatial anal-
or signal generators. ysis, i.e., convex decomposition of polytops. Convexity
◦ Connection to alsa bindings, in order to provide real- is a simple but useful concept. Convex objects are much
time sound synthesis controlled by MIDI events from easier to deal with in terms of storage and operations:
keyboards or sequencers, the intersection of two convex objects is a convex ob-
ject, the calculation of areas/volumes is straightforward
◦ Stand-alone binding to Sox for audio format conver- and so is the “point-in-polygon” problem, etc.
sion and playback,
There are several approaches to decompose a poly-
◦ A pyramid filter for efficient computation of moving top to convex components, some of which may be
average and moving maximum for baseline detection adapted for different dimensions. However, they still
of mass spectra, require separate implementations for each dimension.
The main reason is lack of suitable data structures in
Further reading the current programming languages. We use the n-
simplexes to implement an n-dimensional algorithm for
◦ http://www.haskell.org/haskellwiki/Synthesizer convex decomposition of polytops. It builds a tree of
◦ http://dafx04.na.infn.it/WebProc/Proc/P_201.pdf signed convex components: components in even lev-
els are additive, whereas components in odd levels are
6.6.2 easyVision subtractive. An example figure:

Report by: Alberto Ruiz


Status: experimental, active development

The easyVision project is a collection of experimental


libraries for computer vision and image processing. The
low level computations are internally implemented by
optimized libraries (IPP, HOpenGL, hmatrix (→ 5.3.1),
etc.). Once appropriate geometric primitives have been
extracted by the image processing wrappers we can de-
fine interesting computations using elegant functional
constructions. Future work includes cabalization of the
main modules.

Further reading
http://www.easyVision.googlepages.com

6.6.3 photoname The algorithm starts with placing the convex hull of
the input polytop as the root of the tree. Subtraction
Report by: Dino Morelli
of the computed convex hull from the input polytop
Status: stable, maintained
yields a set of split polytops, which are the elements of
See: http://haskell.org/communities/05-2009/html/ the next level of the tree. The procedure applies to the
report.html#sect6.6.4. non-convex elements and it repeats until all of the ele-
ments are convex. The list data structures and list op-
6.6.4 n-Dimensional Convex Decomposition of erations are used for implementation of the algorithm.
Polytops Polytops are represented as a list of n-simplexes, which
are described as a list of points, per se. It allows us
Report by: Farid Karimipour to describe the operations for convex decomposition of
Participants: Rizwan Bulbul, Andrew U. Frank polytops as a combination of operations of n-simplexes,
Status: active development
which turns to be operations on lists. Since the repre-
This is the continuation of the work on “Simplex-based sentation and operations are defined independent of di-
Spatial Operations” (http://haskell.org/communities/ mension, the decomposition algorithm can be used for
05-2009/html/report.html#sect6.6.5), where we showed polytops of any dimension. The following figure shows
how to implement dimension independent spatial oper- a 2D example polytop which is decomposed to convex
ations using the concept of n-simplexes. The results for components as the above figure.

48
6.6.6 Fl4m6e
Report by: Claude Heiland-Allen
Status: unstable
Fl4m6e is a fast fractal flame renderer, currently un-
der active development. Inspired by flam3 and electric
sheep, Fl4m6e performs all the rendering calculations
on the GPU, using OpenGL shaders. The features so
far include runtime generation of low level GLSL source
code from abstract scene descriptions, smooth transi-
tions between scenes using rigid transformations, and
interactive control of animation and quality settings.
Further reading Contrasting to flam3, the aim is not exact image re-
producibility, but to get fast enough that pre-rendering
http://haskell.org/communities/05-2009/html/report. videos is not necessary — then a peer-to-peer network
html#sect6.6.5 exchanging small scene descriptions would supercede
a centralized file server and corresponding large band-
6.6.5 DVD2473 width requirements. However, there is a long way to go
before the electric sheep have anything to worry about.
Report by: Claude Heiland-Allen
Status: complete
DVD2473 is a generative DVD video artwork.
The somewhat abstract title is a semi-literal descrip-
tion with all the descriptive elements taken out - it is
a DVD of a perfect coloring in 24 colors of a 7,3 hy-
perbolic tiling. It uses the DVD virtual machine to
navigate around the space at pseudo-random.
The mathematics (permutations and Moebius trans-
forms) of the space were implemented in Haskell, with
rendering with Gtk2Hs/Cairo including a little C code
to copy and convert pixels from Cairo to ByteString.
The video encoding used HSH to pipe ByteString to
external tools. The XML control file for DVD author- Further reading
ing was generated with a separate Haskell program. A
bash script automates building an iso from the source ◦ http://claudiusmaximus.goto10.org/cm/2009-08-28_
code directory. fl4m6e_proof_of_concept.html
There are no plans for further development, the art- ◦ http://claudiusmaximus.goto10.org/cm/2009-09-24_
work is finished. fl4m6e_in_haskell.html
◦ http://claudiusmaximus.goto10.org/g/fl4m6e/
examples/
◦ http://flam3.com/
◦ http://electricsheep.org/

6.6.7 GULCI
Report by: Claude Heiland-Allen
Status: unstable
GULCI is a graphical untyped lambda calculus inter-
preter. Programs are written with mouse clicks and
drags, and executed with a keypress. During execution
the graph reduction is visualized. GULCI also dumps
data on its standard output stream, suitable for soni-
fication. The eventual intent is to use it for a short
abstract code performance sometime in the future.
Further reading GULCI is the interactive descendant of the non-
http://claudiusmaximus.goto10.org/cm/2009-01-07_ interactive (but also graphical) ULCIv1, which took
dvd2473.html the form of audiovisualisations of some simple arith-

49
metical computations in untyped lambda calculus. 6.7 Proof Assistants and Reasoning
6.7.1 Galculator
Report by: Paulo Silva
Status: unstable, work in progress

See: http://haskell.org/communities/05-2009/html/
report.html#sect6.7.1.

6.7.2 Saoithín: a 2nd-order proof assistant

Report by: Andrew Butterfield


Status: ongoing
Saoithín (pronounced “Swee-heen”) is a GUI-based
Further reading 2nd-order predicate logic proof assistant. The motiva-
tion for its development is the author’s need for support
http://claudiusmaximus.goto10.org/cm/2009-06-19_ in doing proofs within the so-called “Unifying Theo-
untyped_lambda_calculus_interpretations_v1.html ries of Programming” paradigm (UTP). This requires
support for 2nd-order logic, equational reasoning, and
6.6.8 Reflex meets a desire to avoid re-encoding the theorems into
some different logical form. It also provides proof tran-
Report by: Claude Heiland-Allen
Status: experimental scripts whose style makes it easier to check their cor-
rectness.
Reflex is a program to interactively experience vari- Saothín is implemented in GHC 6.4 and wxHaskell
ously truncated regular 4D polytopes. The name is in- 0.9.4, with elements of Mark Utting’s jaza tool for
spired by reflection symmetry groups and the eventual Z, and has been tested on a range of Windows plat-
intent of using it as an interactive live audiovisual per- forms (98/XP/Vista), and should work in principle on
formance environment with quick reactions required, Linux/Mac OS X.
the idea for the software itself is inspired by The Sym- A version of the software has been trialled out
metriad. on 3rd-year students taking a Formal Methods elec-
Starting from the Shlaefli symbol p, q, r, Reflex con- tive course (https://www.cs.tcd.ie/Andrew.Butterfield/
structs a 4D symmetry group, from which a wide va- Teaching/3BA31/#Software) A first public release of
riety of different forms can be visualized. The pro- the software under GPL will now happen during Sum-
jection method results in aesthetically pleasing curves, mer 2009 — For now, Windows executables can be
enhanced by the animation. Currently Reflex accepts downloaded from the above link.
commands on its standard input, but the goal is to use
a game controller to navigate through the world.
Further reading
https://www.cs.tcd.ie/Andrew.Butterfield/Saoithin

6.7.3 Inference Services for Hybrid Logics

Report by: Guillaume Hoffmann


Participants: Carlos Areces, Daniel Gorin
“Hybrid Logic” is a loose term covering a number of
logical systems living somewhere between modal and
classical logic. For more information on this languages,
see http://hylo.loria.fr
The Talaris group at Loria, Nancy, France (http:
//talaris.loria.fr) and the GLyC group at the Com-
Further reading puter Science Department of the University of Buenos
◦ http://claudiusmaximus.goto10.org/cm/2009-10-15_ Aires, Argentina (http://www.glyc.dc.uba.ar/) are de-
reflex_preview.html veloping a suite of tools for automated reasoning for
◦ http://web.mit.edu/~axch/www/Symmetriad/index. hybrid logics, available at http://code.google.com/p/
html intohylo/. Most of them are (successfully) written in
◦ http://en.wikipedia.org/wiki/SchlÃďfli_symbol Haskell. See HyLoRes (http://haskell.org/communities/
05-2009/html/report.html#sect6.7.5), HTab (→ 6.7.4),

50
and HGen (http://haskell.org/communities/05-2009/ of Isabelle has a more restrictive type system than
html/report.html#sect6.7.7). Haskell. A simple adaption mechanisms allows to tailor
the conversion process to specific needs.
6.7.4 HTab So far, Haskabelle is working, but there is little expe-
rience for its application in practice. Suggestions and
Report by: Guillaume Hoffmann feedback welcome. A tool demo is given at PEPM’10.
Participants: Carlos Areces, Daniel Gorin
Status: active development
Further reading
Current release: 1.5.1
http://isabelle.in.tum.de/haskabelle.html and http://
isabelle.in.tum.de/
HTab is an automated theorem prover for hybrid log-
ics (→ 6.7.3) based on a tableau calculus. It handles
hybrid logic with nominals, satisfaction operators, con- 6.8 Modeling and Analysis
verse modalities, universal and difference modalities,
the down-arrow binder and role inclusion. 6.8.1 iTasks
The source code is distributed under the terms of the
Report by: Bas Lijnse
GNU GPL. Participants: Rinus Plasmeijer, Peter Achten, Pieter
Koopman, Thomas van Noort, Jan Martin
Further reading Jansen, Erik Crombag
Status: active development
◦ Hoffmann, G. and Areces, C. HTab: a terminat-
ing tableaux system for hybrid logic. In Methods for
Modalities 5, Cachan, France, 2007. The iTask system provides a set of combinators to
◦ Site and source: specify workflow in the pure and functional language
http://code.google.com/p/intohylo/ Clean (→ 3.2.3) at a very high level of abstraction.
Workflow systems are automated systems in which
6.7.5 Sparkle tasks are coordinated that have to be executed by ei-
ther humans or computers. Workflow specifications are
Report by: Maarten de Mol supplemented with a generic foundation to generate
Participants: Marko van Eekelen, Rinus Plasmeijer executable multi-user workflow support systems that
Status: stable, maintained consist of a webservice-based server and a user-friendly
See: http://haskell.org/communities/05-2009/html/ Ajax client.
report.html#sect6.7.8. Compared to contemporary workflow systems, that
often use simple graphical specification languages, the
iTask system offers several advantages:
6.7.6 Haskabelle
◦ Tasks are statically typed and can be higher-order.
Report by: Florian Haftmann
Status: working ◦ Combinators are fully compositional.

◦ Dynamic and recursive workflow is supported.


Since Haskell is a pure language, reasoning about
equational semantics of Haskell programs is conceptu- ◦ Workflow instances can be modified during execu-
ally simple. To facilitate machine-aided verification of tion.
Haskell programs further, we have developed a con-
verter from Haskell source files to Isabelle theory files:
Haskabelle.
Isabelle itself is a generic proof assistant. It allows
mathematical formulas to be expressed in a formal lan-
guage and provides tools for proving those formulas in
a logical calculus. One such formal language is higher-
order logic, a typed logic close to functional program-
ming languages. This is used as translation target of
Haskabelle.
Both Haskabelle and Isabelle in combination allow to
formally reason about Haskell programs, particularly
verifying partial correctness.
The conversion employed by Haskabelle covers only
a subset of Haskell, mainly since the higher-order logic

51
The iTask system makes extensive use of Clean’s The ForSyDe (Formal System Design) methodology
generic programming facilities for generating dynamic has been developed with the objective to move system-
user-interfaces and data encoding/decoding. on-chip design to a higher level of abstraction. ForSyDe
is implemented as a Haskell-embedded behavioral DSL.
The current released is ForSyDe 3.0, which includes a
Future plans
new deep-embedded DSL and embedded compiler with
Currently, we are working on extending and stabilizing different backends (Simulation, Synthesizable VHDL
the iTask base system to a level where it can be used and GraphML), as well as a new user-friendly tutorial.
for serious applications. We are also exploring how The source code, together with example system mod-
even more dynamic and unpredictable workflows can els, is available from HackageDB under the BSD3 li-
be supported. cense.

Further reading Features


◦ http://itasks.cs.ru.nl/ ForSyDe includes two DSL flavors which offer different
◦ http://www.st.cs.ru.nl/Onderzoek/Publicaties/ features:
publicaties.html
1. Deep-embedded DSL
6.8.2 CSP-M animator and model checker Deep-embedded signals (ForSyDe.Signal), based on
the same concepts as Lava (→ 8.9), are aware of the
Report by: Marc Fontaine
Status: active development, download available system structure. Based on that structural infor-
mation ForSyDe’s embedded compiler can perform
different analysis and transformations.
We develop an Haskell based, integrated CSP-M an- ◦ Thanks to Template Haskell, computations are
imator and model checker. CSP (Communicating- expressed in Haskell, not needing to specifically
Sequential-Processes) is a formalism for concurrent sys- design a DSL for that purpose
tems, invented by Tony Hoare. CSP-M is the concrete
syntax used by several CSP-tools. ◦ Embedded compiler backends:
Our Haskell-CSP-Tool features: – Simulation
– VHDL (with support for Modelsim and
◦ FDR compatibility Quartus II)
– GraphML (with yFiles graphical markup
◦ Fast computation of state spaces support)
◦ Synchronous model of computation
◦ GTK+ based graphical user interface
◦ Support for components
◦ Support for shared-memory-parallelism / multicore ◦ Support for fixed-sized vectors
CPUs
2. Shallow-embedded DSL
Binary releases are available for download via http: Shallow-embedded signals
//www.stups.uni-duesseldorf.de/~fontaine/csp. (ForSyDe.Shallow.Signal) are modeled as streams
The Parsec-based CSP-M parser of our project is also of data isomorphic to lists. Systems built with them
on Hackage. This is also the parser used by the ProB are restricted to simulation. However, shallow-
model-checker. embedded signals provide a rapid-prototyping
framework which allows to simulate heterogeneous
Further reading systems based on different models of computation
(MoCs).
http://www.stups.uni-duesseldorf.de/~fontaine/csp
◦ Synchronous MoC
◦ Untimed MoC
6.9 Hardware Design ◦ Continuous Time MoC
◦ Domain Interfaces allow connecting various
6.9.1 ForSyDe subsystems with different timing (domains) re-
gardless of their MoC
Report by: Ingo Sander
Participants: Alfonso Acosta, Axel Jantsch, Jun Zhu
Status: experimental ForSyDe allows to integrate deep-embedded models
into shallow-embedded ones. This makes it possible

52
to simulate a synthesizable deep-embedded model to- sized types, built using type functions. This library,
gether with its environment, which may consist of ana- developed specifically for use with Kansas Lava, in-
log, digital, and software parts. Once the functional- cludes sized 1 and 2 dimensional matrixes, and sized
ity of the deep-embedded model is validated, it can be signed and unsigned bit vectors.
synthesized to hardware using the VHDL-backend of
ForSyDe’s embedded compiler. We are writing Kansas Lava to address one problem
(generate good hardware designs for communication
Further reading circuits) and help facilitate a second (explore and un-
derstand correctness preserving optimizations of non-
http://www.ict.kth.se/forsyde/ trivial hardware components). With telemetry circuits,
the encodings and decoding mechanisms are typically
6.9.2 Kansas Lava expressed using matrix operations, so we pay careful at-
tention to allowing clear encoding of such operations.
Report by: Andy Gill
Participants: Tristan Bull, Andy Gill, Garrin Kimmell,
In particular, we use type functions to clean up sized
Erik Perrins, Ed Komp, Brett Werling types, making for a cohesive addition to our Lava. A
Status: ongoing release is planned for early November, and will be avail-
able on Hackage.
Kansas Lava is an attempt to use the Lava design pat-
tern with modern functional programing technology. In
Further reading
particular we scale up the ideas in Lava to operate on
larger circuits and with large basic components. http://www.ittc.ku.edu/csdl/Kansas_Lava
◦ Kansas Lava uses a single principal Signal type for
all types of signals. Some versions of Lava have over-
loaded signal to interpret signal in either a synthesis 6.10 Natural Language Processing
or simulation mode. Our experience is that a sin-
gle concrete type is easier to work with in practice, 6.10.1 NLP
and we have baked the two main interpretations into Report by: Eric Kow
our Signal type. Ultimately this allows a closer fit
between the specifications of behavior and synthesiz- The Haskell Natural Language Processing community
able code. aims to make Haskell a more useful and more popular
language for NLP. The community provides a mailing
◦ Like other Lava implementations before it, Kansas list, Wiki and hosting for source code repositories via
Lava supports both synthesis and simulation. The the Haskell community server.
use case would typically be development of an exe- The Haskell NLP community was founded in March
cutable model, refinement into a synthesizable vari- 2009. We are in the process of recruiting NLP re-
ant, then further refinement for efficiency, and other searchers and users from the Haskell community. In
considerations. the future, we hope to use the community to discuss
libraries and bindings that would be most useful to us
◦ Kansas Lava uses a modern FP style of Haskell. We and ways of spreading awareness about Haskell in the
allow Signal to be an applicative functor. Arith- NLP world.
metic is overloaded over Signal, so we can represent
addition using +, multiplication using *, etc. Con- Further reading
stant literals can also be Signals. This leads to a
cleaner looking specifications. http://projects.haskell.org/nlp

◦ Kansas Lava has direct support for importing exist-


ing VHDL libraries as new, well typed primitives. 6.10.2 GenI
This allows Kansas Lava to be used as a high-level Report by: Eric Kow
glue between existing solutions.
◦ Kansas Lava includes a simple type checking over GenI is a surface realizer for Tree Adjoining Grammars.
binary representations. Polymorphic specifications Surface realization can be seen a subtask of natural lan-
inside Lava will be instantiated to their specific, guage generation (producing natural language utter-
monomorphically sized implementation in VDHL, ances, eg. English texts, out of abstract inputs). GenI
depending on the propagation of actual usage. in particular takes an FB-LTAG grammar and an in-
put semantics (a conjunction of first order terms), and
◦ In Haskell, requiring a 14-bit value is unusual, but in produces the set of sentences associated to the input
hardware, we often know and want to enforce a spe- semantics by the grammar. It features a surface real-
cific width. Kansas Lava uses an implementation of ization library, several optimizations, batch generation

53
mode, and a graphical debugger written in wxHaskell. users. It is a dependently typed functional language
It was developed within the TALARIS project and is based on Per Martin-Löf’s type theory.
free software licensed under the GNU GPL. An important objective in the language development
was to make it possible to develop modular gram-
mars. The language provides modular system inspired
from ML but adapted to the specific requirements in
GF. The modules system was exploited to a large ex-
tent in the Resource Libraries project. The library
provides large linguistically motivated grammars for a
number of languages. When the languages are closely
related the common parts in the grammar could be
shared using the modules system. Currently there
are complete grammars for Bulgarian, Danish, English,
Finnish, French, German, Interlingua, Italian, Norwe-
gian, Russian, Spanish, and Swedish. There are work
in progress grammars for Arabic, Catalan, Latin, Thai,
and Hindi/Urdu. On top of these grammars a user
with limited linguistic background can build applica-
tion grammars for a particular domain.
On 24 June 2009 after one year of hard work the
previous beta version of GF 3.0 is turned into stable
release. This is a major refactoring of the existing sys-
tem. The code base is about half in size and makes a
clear separation between compiler and runtime system.
A Haskell library is provided that allows GF grammars
to be easily embedded in user applications. There is a
translator that generates JavaScript code which allows
the grammar to be used in web applications as well.
The new release also provides new parser algorithm
which works faster and is incremental. The incremen-
tality allows the parser to be used for word prediction,
GenI is available on Hackage, and can be installed
i.e., someone could imagine a development environment
via cabal-install. Our most recent release of GenI was
where the programming language is natural language
version 0.20.1 (2009-10-01), which offers cleaner inter-
and the user still can press some key to see the list of
actions with the third-party tools (using JSON), sim-
words allowed in this position just like it is possible in
pler installation on MacOS X and a user manual. For
Eclipse, JBuilder, etc.
more information, please contact us on the geni-users
We are continuing to work hard. Some of the projects
mailing list.
that keeps us busy:

Further reading ◦ Type checker for dependent types in the interpreter.


Currently only the compiler has type checker.
◦ http://projects.haskell.org/GenI
◦ Paper from Haskell Workshop 2006: ◦ Semantic parsing — i.e., parser which considers not
http://hal.inria.fr/inria-00088787/en only the syntax but also the semantics of the lan-
◦ http://websympa.loria.fr/wwsympa/info/geni-users guage. The semantics is encoded using dependent
types.

6.10.3 Grammatical Framework ◦ New resource grammars for Romanian and Polish

Report by: Krasimir Angelov ◦ Visualisation of parse trees and dependency trees in
Participants: Krasimir Angelov, Håkan Burden, Aarne addition to syntax trees
Ranta
◦ Experiments with natural languages and big ontolo-
gies
Grammatical Framework (GF) is a programming lan- ◦ Building wide coverage Swedish grammar based on
guage for multilingual grammar applications. It can the resource grammar.
be used as a more powerful alternative to Happy but
in fact its main usage is to describe natural language
Further reading
grammars instead of programming languages. The lan-
guage itself will look familiar for most Haskell or ML www.digitalgrammars.com/gf

54
6.11 Others Current Status and Future Plans
The original version of IgorII is implemented in the
6.11.1 IgorII reflective rewriting based programming and specifica-
tion language Maude. However, a Haskell implemen-
Report by: Martin Hofmann
Participants: Emanuel Kitzelmann, Ute Schmid tation of the algorithm is the current research proto-
Status: experimental, active development type. Both can be obtained from the project page.
A tool demo and a research paper about the use of
catamorphisms as higher-order templates are presented
IgorII is a new method and an implemented prototype at PEPM 2010.
for constructing recursive functional programs from a For the future, we plan to extend the higher-order
few non-recursive, possibly non-ground, example equa- context to use the catamorphism template for arbi-
tions describing a subset of the input/output behavior trary algebraic data types. Furthermore, it is worth
of a target function to be implemented. to investigate to which extent other morphisms can be
For a simple target function like reverse the sole incorporated.
input would be the following, the k smallest w.r.t. the
input data type, examples: Further reading

reverse [] = [] ◦ http://www.cogsys.wiai.uni-bamberg.de/effalip/
reverse [a] = [a] ◦ http://www.inductive-programming.org/
reverse [a,b] = [b,a]
reverse [a,b,c] = [c,b,a] 6.11.2 Roguestar

The result, shown below, computed by IgorII is a Report by: Christopher Lane Hinson
recursive definition of reverse, where the subfunctions Status: early development
last and init have been automatically invented by the See: http://haskell.org/communities/05-2009/html/
program. report.html#sect6.12.2.
reverse [] = []
reverse (x:xs) = (last (x:xs)):(reverse (init (x:xs)) 6.11.3 LQPL — A quantum programming language
compiler and emulator
last [x] = x
last (x:y:ys) = last (y:ys) Report by: Brett G. Giles
init [x] = []
Participants: Dr. J.R.B. Cockett
init (x:y:ys) = x:(init (y:ys))
Status: v 0.8.3 experimental released
Recently, IgorII has been extended to use catamor-
phisms on lists as higher-order templates. After en- LQPL (Linear Quantum Programming Language) con-
abling the higher-order mode, given the previous ex- sists of a compiler for a functional quantum program-
amples of reverse, the system outputs the following ming language and an associated assembler and emu-
solution: lator.
This programming language was inspired by Peter
reverse xs = foldr snoc [] xs Selinger’s paper “Toward a Quantum Programming
Language”. LQPL incorporates a simplified module /
snoc x xs = foldr cons [x] xs
include system (more like C’s include than Haskell’s im-
cons x (y:ys) = x:(y:ys)
port), predefined unitary transforms, quantum control
and classical control, algebraic data types, and opera-
Features tions on purely classical data. The compiler translates
LQPL programs into an assembler language targeted to
◦ termination by construction
a quantum stack machine. The emulator, written using
◦ handling arbitrary user-defined data types
Gtk2Hs, translates the assembler to machine code and
◦ utilization of arbitrary background knowledge
provides visualization of the program as it executes.
◦ automatic invention of auxiliary functions as subpro-
For example, the following procedure implements
grams
quantum teleportation:
◦ learning complex calling relationships (tree- and
nested recursion) teleport::(n:Qubit,a:Qubit,b:Qubit;b:Qubit) {
◦ allowing for variables in the example equations Not a <= n ; Had n;
◦ simultaneous induction of mutually recursive target measure a of
functions |0> => {} |1> => {Not b};
◦ using list-catamorphisms as higher-order templates measure n of

55
|0> => {} |1> => {RhoZ b} rule with a value (not just provability) and aggregating
} these values to get the value of an item. This extends
logic programming with some elements of functional
The emulator allows one to step through a program programming, including weighted-logic systems where
at the assembly level, displaying the quantum values as the form of Horn equations is restricted to a semiring.
a tree. The figure below is a screen shot showing the
results after the first measure in teleport. My master thesis work was developing a powerful
type system which expresses algebraic data types with
non-linearity constraints, refinement subtyping, and
some aspects of dependent typing. This type system
is further enhanced to allow heterogeneous storage of
the same semantic type, so that different representa-
tions of “the same value” can be used simultaneously
in different parts of a program.
Unlike most logic languages, Dyna will have a mod-
ule system for separating proof universes, which allows
Recent changes include a public release (available at multiple programs to share the same RTS instance and
the URL below), UI improvements and the ability load allows presenting programs, data sets, and deductive
and compile LQPL source programs from the emulator. databases with the same API. Dyna will also support
agenda-based mixed forward-/backward-chaining infer-
Further reading ence with memoization and declarative truth mainte-
nance.
http://pll.cpsc.ucalgary.ca/lqpl/index.html
Previous work implemented a prototype compiler
that generated C++ classes for a restricted form of
6.11.4 Yogurt
the language. Currently we are implementing an in-
Report by: Martijn van Steenbergen terpreter in Haskell that covers a broader portion of
the language, and are working on the formal under-
Yogurt is a MUD client embedded in Haskell. The
pinnings of these extensions. We intend to use this in
API allows users to define variables of arbitrary types
the long term as a reference implementation for test-
and hooks that trigger on output from the MUD or
ing improved algorithms for a next generation Dyna
input from the user. Other features include timers,
compiler.
multithreading, and logging. Most MUD clients rely
on their own custom language; Yogurt, however, re-
lies on Haskell. Even though Yogurt programs are full
Haskell programs, Yogurt is able to dynamically load Further reading
and reload them using the GHC API, effectively mak-
◦ Work on the type system and unification algorithms
ing Yogurt a scripting language.
for Dyna 2 can be found in the following papers.
Ideas for the future include compatibility with
These are currently not available online, though re-
Tintin++ scripts to make migration to Yogurt even
fined versions should be available soon.
more tempting and an expect-like interface for easier
– W. Thornton (2008). “Typed Unification in
interaction with processes.
Dyna: An Exploration of the Design Space.”
Masters Project Report, Johns Hopkins Univer-
Further reading sity.
http://code.google.com/p/yogurt-mud/ – W. Thornton (2008). “Heterogeneous Strate-
gies for Unification: Variable–Value Ordering
6.11.5 Dyna 2 and Optimized Structures.” Masters Paper,
Johns Hopkins University.
Report by: Wren Ng Thornton ◦ This paper discusses program transformations for
Participants: Nathaniel W. Filardo, Jason Eisner Dyna and gives an early view of the semantics
Status: active research for mixed inference: http://www.cs.jhu.edu/~jason/
Dyna is a valued-logic programming language with papers/#fg06.
first-class support for dynamic programming. A ma- ◦ This paper introduces Dyna 1 where Horn equa-
jor goal of the language is to automate many of the tions are restricted to a semiring: http://cs.jhu.edu/
common algorithms and optimizations used in natu- ~jason/papers/#emnlp05-dyna.
ral language parsers and machine translation decoders, ◦ In association with Dyna there is work on a graphical
making them available for general logic programs. debugger, called Dynasty, which allows lazy explo-
Starting from Prolog we extend Horn clauses to ration of hypergraphs (representing proof forests).
“Horn equations” by associating each grounding of a – http://cs.jhu.edu/~jason/papers/#infovis06

56
6.11.6 Vintage BASIC shapes and step the simulation. More advanced Bullet
features (constraints, soft body simulation etc.) will be
Report by: Lyle Kopnicky added later.
Current release: 1.0.1
Portability: GHC 6.10
Further reading
Vintage BASIC is an interpreter for microcomputer-
era BASIC, written in Haskell. It is fully unit-tested, http://www.haskell.org/haskellwiki/Bullet
and implements all common features of the language.
The web site includes games from Creative Comput- 6.11.8 arbtt
ing’s BASIC Computer Games, all of which can be run
under the interpreter. Report by: Joachim Breitner
Status: working
The program arbtt, the automatic rule-based time
tracker, allows you to investigate how you spend your
time, without having to manually specify what you are
doing. arbtt records what windows are open and active,
and provides you with a powerful rule-based language
to afterwards categorize your work. And it comes with
documentation!
The program is very new and has found only a few
users yet. The author is still looking for feedback, es-
pecially to rate its usefulness to decide whether it will
be uploaded to Debian.

Further reading
◦ http://www.joachim-breitner.de/projects#arbtt
http://www.joachim-breitner.de/blog/archives/
336-The-Automatic-Rule-Based-Time-Tracker.html
The interpreter makes use of a novel technique for ◦ http://darcs.nomeata.de/arbtt/doc/users_guide/
implementing BASIC’s dynamic control structures: re-
sumable exceptions. For example, in BASIC loops, the
FOR keyword becomes an exception handler, and the 6.11.9 uacpid
NEXT keyword throws an exception. Furthermore, Report by: Dino Morelli
the exceptions are caught in the continuation, rather Status: experimental, actively developed
than the containing expression. The handlers can also
be selectively persisted after handling exceptions. Be- uacpid is a daemon designed to be run in userspace
cause of these two features, I refer to them as “durable that will monitor the local system’s acpid socket for
traps”. The DurableTraps library is fully abstracted hardware events. These events can then be acted upon
using monad transformers, and can be used in any pro- by handlers with access to the user’s environment.
gram. uacpid is available in binary form for Arch Linux
through the AUR and can be acquired using darcs or
other methods.
Further reading
http://www.vintage-basic.net Further reading
◦ Project page: http://ui3.info/d/proj/uacpid.html
6.11.7 Bullet
◦ Source repository: darcs get http://ui3.info/darcs/
Report by: Csaba Hruska uacpid
Status: experimental, active development
Bullet is a professional open source multi-threaded 3D
Collision Detection and Rigid Body Dynamics Library
written in C++. It is free for commercial use under
the zlib license. The Haskell bindings ship their own C
compatibility layer, so the library can be used without
modifications.
At the current state of the project only basic services
are accessible from Haskell, i.e., you can load collision

57
7 Commercial Users
natural fit, and we have been using Haskell in various
ways to replace or augment the spreadsheet environ-
7.1 Well-Typed LLP
ment.
Report by: Ian Lynagh Our past projects include:
Participants: Duncan Coutts
◦ Adding higher-order functions to Excel, implemented
via (Haskell) addin code.
Well-Typed is a Haskell services company. We pro-
◦ Tools to transform spreadsheets into directly exe-
vide commercial support for Haskell as a develop-
cutable code.
ment platform. We also offer consulting services, con-
tracting, and training. For more information, please ◦ A “lint” tool to check for common errors in spread-
take a look at our website or drop us an e-mail at sheets.
hinfo@well-typed.comi.
This has been a busy 6 months for us. As well as Our main project for the last couple of years has
proprietary work, we have been pleased to have again been Paradise, a domain-specific language embedded
been able to work on the GHC 6.12 release, as well as in Haskell for implementing reusable components that
other core parts of the community infrastructure, such can be compiled into multiple target forms. Current
as Cabal and the Haskell Platform. backends are Excel spreadsheets and .NET components
We have also been involved with the setting up and based on either Winforms or WPF.
running of the Industrial Haskell Group (→ 7.8). We A number of modelers have been exposed directly
are pleased with the work the IHG have done in its first to Haskell by using Paradise, and they have generally
6 months, and have high hopes for the future. picked it up fairly quickly. All new recruits are intro-
Overall, it has been a good 6 months for us, and we duced to Haskell as part of our internal training pro-
are looking forward to the challenges of the next 6. We gram.
have some exciting stuff coming up, and will be looking Our main focus at the moment is the automatic
into expansion. generation of Paradise models for a particular finan-
cial product, starting from an algebraic datatype that
Further reading defines the product. Modelers can override parts of
the automatically generated model with a hand-crafted
◦ http://www.well-typed.com/ Paradise component if they choose to, providing a good
◦ Blog: http://blog.well-typed.com/ trade-off between speed of development and “beautiful”
results.
7.2 Credit Suisse Global Modeling and
Analytics Group Further reading
◦ CUFP 2006 talk about Credit Suisse:
Report by: Ganesh Sittampalam
http://cufp.galois.com/slides/2006/HowardMansell.
GMAG, the quantitative modeling group at Credit Su- pdf
isse, has been using Haskell for various projects since ◦ ICFP 2008 experience report about Paradise:
the beginning of 2006, with the twin aims of improving http://www.earth.li/~ganesh/research/
the productivity of modelers and making it easier for paradise-icfp08/paper.pdf
other people within the bank to use GMAG models. http://www.earth.li/~ganesh/research/
Many of GMAG’s models use Excel combined with paradise-icfp08/talk.pdf
C++ addin code to carry out complex numerical com-
putations and to manipulate data structures. This
combination allows modelers to combine the flexibility
7.3 Bluespec tools for design of complex
of Excel with the performance of compiled code, but chips
there are significant drawbacks: Excel does not sup-
port higher-order functions and has a rather limited Report by: Rishiyur Nikhil
and idiosyncratic type system. It is also extremely dif- Status: commercial product
ficult to make reusable components out of spreadsheets Bluespec, Inc. provides a language, BSV, which is be-
or subject them to meaningful version control. ing used for all aspects of ASIC and FPGA system de-
Because Excel is (in the main) a side-effect free en- sign — specification, synthesis, modeling, and verifica-
vironment, functional programming is in many ways a tion. All hardware behavior is expressed using rewrite

58
rules (Guarded Atomic Actions). BSV borrows many ◦ MIT courseware, “Complex Digital Systems”: http:
ideas from Haskell — algebraic types, polymorphism, //csg.csail.mit.edu/6.375
type classes (overloading), and higher-order functions. ◦ A fun example with many functional-programming
Strong static checking extends into correct expression features — BluDACu, a parameterized Bluespec
of multiple clock domains, and to gated clocks for power hardware implementation of Sudoku: http://www.
management. BSV is universal, accommodating the di- bluespec.com/products/BluDACu.htm
verse range of blocks found in SoCs, from algorithmic
“datapath” blocks to complex control blocks such as
processors, DMAs, interconnects and caches.
7.4 Galois, Inc.
Bluespec’s core tool synthesizes (compiles) BSV into
Report by: Andy Adams-Moran
high-quality RTL (Verilog), which can be further syn-
thesized into netlists for ASICs and FPGAs using other Galois is an employee-owned software development
commercial tools. Automatic synthesis from atomic company based in Beaverton, Oregon, U.S.A. Ga-
transactions enables design-by-refinement, where an lois started in late 1999 with the stated purpose of
initial executable approximate design is systematically using functional languages to solve industrial prob-
transformed into a quality implementation by succes- lems. These days, we emphasize the needs of our
sively adding functionality and architectural detail. clients and their problem domains over the tech-
Other products include fast BSV simulation and devel- niques, and the slogan of the Commercial Users of
opment tools. Bluespec also uses Haskell to implement Functional Programming Workshop (see http://cufp.
its tools (well over 100K lines of Haskell). functionalprogramming.com/) exemplifies our approach:
This industrial strength tool has enabled some large Functional programming as a means, not an end.
designs (over a million gates) and significant architec- Galois develops software under contract, and every
ture research projects in academia and industry. This project (bar three) that we have ever done has used
kind of research was previously feasible only in soft- Haskell. The exceptions used ACL2, Poly-ML, SML-
ware simulation. BSV permits the same convenience NJ, and OCaml, respectively, so functional program-
of expression as SW languages, and its synthesizability ming languages and formal methods are clearly our “se-
further allows execution on FPGA platforms at three cret sauce”. We deliver applications and tools to clients
orders of magnitude greater speeds, making it possible in industry and the U.S. government. Some diverse ex-
now to study realistic scenarios. amples: Cryptol, a domain-specific language for cryp-
tography (with an interpreter and a compiler, with mul-
tiple targets, including FPGAs); a GUI debugger for a
Status and availability
specialized microprocessor; a specialized, high assur-
BSV tools, available since 2004, are in use by several ance, cross-domain web and file server, and Wiki for
major semiconductor companies and universities. The use in secure environments, and numerous smaller re-
tools are free for academic teaching and research. search projects that focus on taking cutting-edge ideas
Recent news (last 6 months): (1) Much new infras- from the programming language and formal methods
tructure and libraries to move computation kernels eas- community and applying them to real world problems.
ily onto commodity FPGA boards, for greater speed Web-based technologies are increasingly important
and/or lower energy; (2) a strange loop, where one cus- to our clients, and we believe Haskell has a key role
tomer is applying the capability 1 to a computation ker- to play in the production of reliable, secure web soft-
nel written in Haskell; and (3) development of PAClib ware. The culture of correctness Haskell encourages
(Pipeline Architecture Combinators) that make exten- is ideally suited to web programming, where issues of
sive use of higher-order functions to describe DSP algo- security, authentication, privacy, and protection of re-
rithms succinctly and with powerful architectural pa- sources abound. In particular, Haskell’s type system
rameterization, exceeding the capabilities of tools that makes possible strong static guarantees about access
synthesize hardware from C codes. to resources, critical to building reliable web applica-
tions.
Further reading To help push further the adoption of Haskell in the
domain of web programming, Galois released a suite of
◦ R.S.Nikhil, Bluespec, a General-Purpose Approach Haskell libraries, including:
to High-Level Synthesis Based on Parallel Atomic
Transactions, in High Level Synthesis: from Algo- ◦ json: Support for JavaScript Object Notation
rithm to Digital Circuit, Philippe Coussy and Adam
◦ xml: A simple, lightweight XML parser/generator.
Morawiec (editors), Springer, 2008, pp. 129-146.
◦ Small illustrative examples: http://www.bluespec. ◦ utf8-string: A UTF8 layer for IO and Strings.
com/wiki/SmallExamples
◦ Winning entry in MEMOCODE 2008 design contest: ◦ selenium: Communicate with a Selenium Remote
http://rijndael.ece.vt.edu/memocontest08/ Control server.

59
◦ curl: libcurl is a rich client-side URL transfer library. 7.6 Tupil
◦ sqlite: Haskell binding to sqlite3 databases.
Report by: Chris Eidhof
◦ feed: Interfacing with RSS and Atom feeds Participants: Eelco Lempsink

◦ mime: Haskell support for working with MIME


types.
Continuing our deep involvement in the Haskell com-
munity, Galois was happy to sponsor the two Haskell
hackathons held in the past year, Hac 07 II, in Freiburg, Tupil builds reliable web software with Haskell. Us-
Germany, and Hac4 in Gothenburg, Sweden. Galois ing Haskell’s powerful ways of abstraction, we feel we
also sponsored the second BarCamp Portland, held in can develop even faster than with dynamic scripting
early May 2008. languages but with the safety and performance of a
language that is statically checked and compiled.
Further reading In the last year we were able to successfully use
Haskell for different projects: high score web services,
http://www.galois.com/. music mashups, a payment system for a client and
more. It would not have been possible without the
7.5 IVU Traffic Technologies AG Rostering vast amount of packages that are available for Haskell
Group these days.

Report by: Michael Marte Further reading


Status: released
◦ http://tupil.com
The rostering group at IVU Traffic Technologies AG ◦ http://blog.tupil.com
has been using Haskell to check rosters for compliance
with the “EC Regulation No 561/2006 on the harmo-
nization of certain social legislation relating to road 7.7 Aflexi Content Delivery Network
transport” which “lays down rules on driving times, (CDN)
breaks and rest periods for drivers engaged in the car-
riage of goods and passengers by road”. Due to com- Report by: Kim-Ee Yeoh
binatorial rest-time compensation rules, EC 561/2006
instances are search problems and at times pretty hard The Aflexi Content Delivery Network (CDN) is a con-
to solve. federated solution to cost-effective content delivery for
Our implementation is based on an embedded DSL publishers, value-added capacity right-sizing for web-
to combine the regulation’s single rules into a solver hosting providers, and a more responsive Internet ex-
that not only decides on instances but, in the case of a perience for end-users.
faulty roster, finds an interpretation of the roster that Key elements of the Aflexi CDN comprise a server-
is “favorable” in the sense that the error messages it side software package that webhosting providers can
entails are “helpful” in leading the dispatcher to the license to CDN-enable their servers and hosted web-
resolution of the issue at hand. sites, and a marketplace where a provider can federate
Our EC 561/2006 solver comprises about 1700 lines with other providers to expand its CDN footprint. Our
of Haskell code (including about 250 lines for the C motto is “Unifying Capacity.”
API), is compiled to a DLL with ghc, and linked dy- At the heart of the platform is the ability for publish-
namically into C++ and Java applications. The solver ers to transparently combine Aflexi-enabled providers
is both reliable (due to strong static typing and referen- and migrate among a publisher-selected subset. Com-
tial transparency — we have not experienced a failure petition between providers ensures that publishers get
in three years) and efficient (due to constraint propa- a market-efficient rate for delivery bandwidth by mak-
gation, a custom search strategy, and lazy evaluation). ing informed decisions based on platform metrics of
Our EC 561/2006 component is part of the IVU.crew providers’ Quality of Service. By trading excess capac-
software suite and as such is in wide-spread use all over ity with other providers, they in turn benefit from the
Europe, both in planning and dispatch. So the next disruptive innovation in capacity recalibration and ad-
time you enter a regional bus, chances are that the ditional revenue streams afforded by the Aflexi CDN
driver’s roster was checked by Haskell. platform.
Aflexi uses Haskell for critical components of its
Further reading back-end infrastructure. Haskell allows us to rapidly
prototype our software efforts via its rich store of
◦ EC 561/2006 at EurLex open-source libraries on Hackage. Supported by a set
◦ The IVU.suite for public transport of composable concurrency abstractions built on fast

60
lightweight threads, our Haskell code sports more re-
7.9 typLAB
silient fail-safe features and higher performance while
at the same time employing fewer lines of code that
Report by: Sebastiaan Visser
ultimately translate to fewer bugs. Participants: Lon Boonen, Erik Hesselink, Salar al
Other Haskell projects in development include a Khafaji
domain-specific language (DSL) with termination guar-
antees (à la Total Functional Programming). The DSL
furnishes a framework for describing the policies gov-
erning content redirection.

Status and availability TypLAB is a startup company located in the city center
of Amsterdam. We investigate and develop new ways of
The Aflexi CDN platform pre-launched at the start of creating and consuming online content. Our current fo-
2009. cus is in building an online environment in which users
can manage content in unconventional ways.
The Happstack powered server application, the au-
tomated deployment scripts, the JavaScript preproces-
Further reading sors; all code running at the server is written entirely
in Haskell. The vast amount of Haskell packages, espe-
http://aflexi.net/ cially for XML manipulation and generic programming,
allow us to easily interface with our Berkeley XML
database back-end. A large part of our application is
7.8 Industrial Haskell Group
written in JavaScript and runs in the client. Most of the
Report by: Ian Lynagh
JavaScript code is heavily inspired by functional (reac-
tive) programming and enables us to achieve a very
high level of abstraction, even in the web browser.
TypLAB is showing that combining the theoretical
The Industrial Haskell Group (IHG) is an organization foundations of computer science with the day-to-day
to support the needs of commercial users of Haskell. practice of the web allows for building high-quality
It was formed in early 2009, and has already made a web-applications. Still a lot of work has to be done
significant contribution to the up-coming GHC 6.12 re- before our first beta will see the light. Please keep in
lease: In the first 6 months collaborative development touch with our progress by checking out our weblog.
scheme, the IHG has funded work on dynamic libraries,
more flexible Integer library support for GHC, and Ca- Further reading
bal development work. The details of these projects are
on the website. ◦ http://typlab.com
◦ http://blog.typlab.com
Following the success of this scheme, we will be run-
ning another 6 month scheme, with the work beginning
in January. Interested companies should check out the
website for details.
We have also added “associate membership” and
“academic membership” options, for companies and
academic groups that wish to support Haskell devel-
opment without the larger commitment necessary for
the collaborative development scheme. Again, details
are on the website.
If you are interested in joining the IHG, or if you
just have any comments, please drop us an e-mail at
hinfo@industry.haskell.orgi.

Further reading

http://industry.haskell.org/

61
8 Research and User Groups

8.1 Functional Programming Lab at the A theme that permeates our work is implementation
University of Nottingham through embedding in typed functional languages such
as Haskell or Agda (→ 3.2.2). The team also main-
Report by: Liyang HU tains Yampa, the latest Haskell-based implementation
of FRP.
The School of Computer Science at the University of
Nottingham has recently formed the Functional Pro-
gramming Laboratory, a new research group focused on Quantum Programming
all theoretical and practical aspects of functional pro-
gramming, together with related topics such as type Thorsten Altenkirch and Alexander S Green have been
theory, category theory, and quantum programming. working on the Quantum IO Monad (QIO), an inter-
The laboratory is led jointly by Thorsten Altenkirch face from Haskell to Quantum Programming. Tak-
and Graham Hutton, with Henrik Nilsson and Venanzio ing advantage of abstractions available in Haskell we
Capretta as academic staff. With 4 more research staff can provide QIO implementations of many well-known
and some 10 PhD students in our group, we have a quantum algorithms, including Shor’s factorization al-
wide spectrum of interests: gorithm. The implementation also provides a construc-
tive semantics of quantum programming in the form of
Containers a simulator for such QIO computations.

Nottingham has been home to the EPSRC grant on


containers, a semantic model of functional data struc- Reasoning About Effects
tures. Thorsten Altenkirch, Peter Hancock, Peter Mor-
ris, and Rawle Prince are working with containers to Graham Hutton and Andy Gill recently formalized
both write and reason about programs. Peter Morris the worker/wrapper transformation for improving the
has recently finished his PhD, which used containers as performance of functional programs. Wouter Swier-
a basis for generic programming with dependent types. stra and Thorsten Altenkirch have produced func-
tional specifications of the IO monad, as described in
Wouter’s forthcoming PhD thesis. Mauro Jaskelioff de-
Dependently Typed Programming (DTP) veloped a new monad transformer library for Haskell,
Peter Morris and Nicolas Oury are working on Epi- which provides a uniform approach to lifting opera-
gram, while Nils Anders Danielsson is involved in the tions. Diana Fulger and Graham Hutton are inves-
development of Agda (→ 3.2.2). Our interests lie both tigating equational reasoning about various forms of
in the pragmatics of using DTP, as witnessed by work effectful programs. Liyang HU and Graham Hutton
on libraries and tools, and in foundational theory, are working on verifying the correctness of compilers
including the Observational Type Theory underlying for concurrent functional languages, including a model
Epigram 2 and James Chapman’s work on normaliza- implementation of software transactional memory.
tion. DTP is also used to control and reason about
effects, and a number of us are using Agda as a proof
Teaching
assistant to verify programs or programming language
theory. Haskell plays an important role in the undergradu-
ate program at Nottingham, as well as our China
Functional Reactive Programming (FRP) and Malaysia campuses. Modules on offer include
Functional Programming, Advanced FP, Mathematics
The FRP team are working on FRP-like and FRP-
for CS, Foundations of Programming, Compilers, and
inspired declarative, domain-specific languages. Under
Computer-Aided Formal Verification, among others.
Henrik Nilsson’s supervision, Neil Sculthorpe is work-
ing on a new, scalable FRP language based on reactive
components with multiple inputs and outputs, while Events
George Giorgidze is applying the advantages of FRP
to non-causal modeling with the aim of designing a The FP Lab plays a leading role in the Midlands Grad-
new, more expressive and flexible language for non- uate School in the Foundations of Computing Science,
causal, hybrid modeling and simulation (→ 6.5.1). Tom the British Colloquium for Theoretical Computer Sci-
Nielsen is implementing a declarative language for ex- ence, and the Fun in the Afternoon seminar series on
periments, simulations, and analysis in neuroscience. functional programming.

62
FP Lunch textual equivalence in an extended non-deterministic
call-by-need lambda-calculus with letrec.
Every Friday, we gather for lunch with helpings of in-
Concurrency primitives. We analyzed the ex-
formal, impromptu-style whiteboard discussions on re-
pressivity of concurrency primitives in various func-
cent developments, problems, or projects. Summaries
tional languages. In collaboration with Jan Schwing-
of our weekly meetings can be found on the frequently
hammer and Joachim Niehren, we showed how to en-
cited FP Lunch blog, giving a lively picture of ongoing
code Haskell’s MVars into a lambda calculus with stor-
research at Nottingham.
age and futures which is an idealized core language of
Later in the afternoon, there is usually a formal hour- Alice ML. We proved correctness of the encoding using
long seminar. We are always keen on speakers in any operational semantics and the notions of adequacy and
related areas: do get in touch with Thorsten Altenkirch full-abstractness of translations. In her final year thesis
htxa@cs.nott.ac.uki if you would like to visit. See you Martina Willig analyzed the encoding of other concur-
there! rency abstractions and implemented them in Concur-
rent Haskell.
8.2 Artificial Intelligence and Software
Technology at Goethe-University Further reading
Frankfurt http://www.ki.informatik.uni-frankfurt.de/research/
HCAR.html
Report by: David Sabel
Participants: Manfred Schmidt-Schauß
8.3 Functional Programming at the
Deterministic calculi. We proved correctness of
University of Kent
strictness analysis using abstract reduction. Our proof
Report by: Olaf Chitil
is based on the operational semantics of an extended
call-by-need lambda calculus which models a core lan-
guage of Haskell. Furthermore, we proved equivalence The Functional Programming group at Kent is a sub-
of the call-by-name and call-by-need semantics of an group of the newly formed Programming Languages
extended lambda calculus with letrec, case, and con- and Systems Group of the School of Computing. We
structors. Recently, we extended the investigation of are a group of staff and students with shared interests
call-by-need letrec calculi to polymorphic typing and in functional programming. While our work is not lim-
showed correctness of type dependent program trans- ited to Haskell — in particular our interest in Erlang
formations. has been growing — Haskell provides a major focus and
Nondeterministic calculi. We explored several common language for teaching and research.
nondeterministic extensions of call-by-need lambda cal- Our members pursue a variety of Haskell-related
culi and their applications where an emphasis of our projects, some of which are reported in other sections of
research lies in proving program equivalences w.r.t. this report. Recently Olaf Chitil and Doaitse Swierstra
contextual equivalence. In particular, we analyzed published a paper on simple and efficient implementa-
a model for a lazy functional language with direct- tions of pretty printing combinators. The development
call I/O providing a semantics for unsafePerformIO of Heat (→ 4.3.2), a deliberately simple IDE for teach-
in Haskell. We investigated a call-by-need lambda- ing Haskell, made further progress over the summer.
calculus extended by parallel-or and its applications as Neil Brown and Adam Sampson are developing an oc-
a hardware description language. We analyzed a call- cam compiler in Haskell (Tock). They recently devel-
by-need lambda calculus extended with McCarthy’s oped Alloy, a library for fast traversals and manipula-
amb and an abstract machine for lazy evaluation of con- tions of tree-structured data.
current computations.
Simulation-based proof techniques. We have
Further reading
shown that mutual similarity is a sound proof method
w.r.t. contexutal equivalence in a class of untyped ◦ FP group: http://www.cs.kent.ac.uk/research/
higher-order non-deterministic call-by-need lambda groups/tcs/fp/
calculi. For call-by-need calculi with letrec we ob- ◦ Refactoring Functional Programs: http://www.cs.
tained two results: Most recently, we have shown that kent.ac.uk/projects/refactor-fp/
applicative bisimulation is correct in deterministic call- ◦ Pretty Printing Combinators: S. Doaitse Swier-
by-need lambda calculi with recursive let. For non- stra and Olaf Chitil. Linear, bounded, functional
deterministic call-by-need calculi with letrec usual pretty-printing. Journal of Functional Programming,
definitions of mutual similarity are unsound. In collab- 19(01):1-16, January 2009.
oration with Elena Machkasova we obtained correct- ◦ Tracing and debugging with Hat: http://www.
ness of a variation of finite simulation for proving con- haskell.org/hat

63
◦ Heat: http://www.cs.kent.ac.uk/projects/heat/ We are a two-man unit of functional programming re-
◦ Tock: http://projects.cs.kent.ac.uk/projects/tock/ search within the Declarative Languages and Artificial
◦ Alloy: Brown, N. C. and Sampson, A. T. 2009. Al- Intelligence group at the Katholieke Universiteit Leu-
loy: fast generic transformations for Haskell. In Pro-ven, Belgium.
ceedings of the 2nd ACM SIGPLAN Symposium on Our main project centers around the Monadic Con-
Haskell, Haskell ’09 pages 105–116. straint Programming (MCP) framework. An initial ar-
ticle on the MCP framework by Tom Schrijvers, Pe-
8.4 Foundations and Methods Group at ter Stuckey and Phil Wadler is available. It explains
how the framework captures the generic aspects of Con-
Trinity College Dublin straint Programming in Haskell. Of particular interest
is the solver-independent framework for compositional
Report by: Andrew Butterfield search strategies.
Participants: Glenn Strong, Hugh Gibbons, Edsko de
Vries Currently we are extending the framework to act
as a finite domain modeling language for both the
The Foundations and Methods Group focuses on formal problem description and the search component. The
methods, category theory, and functional programming model in Haskell serves as a high-level front-end for a
as the obvious implementation method. A sub-group state-of-the-art Constraint Programming system such
focuses on the use, semantics, and development of func- as Gecode (C++). Models can be compiled to C++
tional languages, covering such areas as: code, can be solved by calling Gecode from Haskell at
runtime, or can be solved purely in Haskell itself.
◦ Supporting OO-Design technique for functional pro-
grammers Our other Haskell-related projects are:

◦ Using functional programs as invariants in impera- ◦ EffectiveAdvice: EffectiveAdvice is a disciplined


tive programming model of (AOP-style) advice, inspired by Aldrich’s
Open Modules, that has full support for effects in
◦ Developing a GUI-based 2nd-order equational theo- both base components and advice. EffectiveAdvice
rem prover (http://haskell.org/communities/05-2009/ is implemented as a Haskell library. Advice is mod-
html/report.html#sect6.7.3) eled by mixin inheritance and effects are modeled
by monads. Interference patterns previously identi-
◦ New approaches to uniqueness typing, applicable to
fied in the literature are expressed as combinators.
Hindley-Milner style type-inferencing
Equivalence of advice, as well as base components,
◦ Equational reasoning for Concurrent Haskell (new) can be checked by equational reasoning. Parametric-
ity, together with the combinators, is used to prove
We have also managed to introduce a new elective two harmless advice theorems. The result is an ef-
course in functional programming at TCD which will fective model of advice that supports effects in both
be based on the “Real World Haskell” textbook. advice and base components, and allows these effects
to be separated with strong non-interference guaran-
tees, or merged as needed. This is joint work with
Further reading
Bruno Oliveira and William Cook.
https://www.cs.tcd.ie/research_groups/fmg/
◦ Type Checking: Recent results are on type inference
8.5 Formal Methods at DFKI Bremen and for GADTs, type invariants, and type checking for
type families. Ongoing work concerns the simplifica-
University of Bremen
tion of type checking for Haskell extensive type sys-
tem, and adding new extensions. This is joint work
Report by: Christian Maeder
with Martin Sulzmann, Simon Peyton Jones, Manuel
Participants: Mihai Codescu, Dominik Lücke, Christoph
Lüth, Christian Maeder, Till Mossakowski,
Chakravarty, Dimitrios Vytiniotis, Stefan Monnier,
Lutz Schröder Louis-Julien Guillemette and Dominic Orchard.

See: http://haskell.org/communities/05-2009/html/
report.html#sect8.5. Further reading

◦ http://hackage.haskell.org/cgi-bin/hackage-scripts/
8.6 Haskell at K.U.Leuven, Belgium package/monadiccp
◦ http://www.cs.kuleuven.be/~toms/Haskell/
Report by: Tom Schrijvers
◦ https://www.cs.kuleuven.be/~pieterw/site/Research/
Participants: Pieter Wuille
Papers/

64
8.7 Haskell in Romania countries where computational linguistics is studied by
computer scientists less than linguists.
Report by: Dan Popa At Bacau State University, we have teaching Haskell
on both Faculties: Sciences (The Computers Science
This is to report some activities of the Ro/Haskell being included) and we hope we will work with Haskell
group. The Ro/Haskell page becomes more and more with the TI students from the Fac. Of Engineering,
known. We hope to pass the barrier of the 20000th where a course on Formal Languages was requested.
click on the main page this mounth. The numbers of “An Introduction to Haskell by Examples” had traveled
students and teachers interested in Haskell is increas- to The Transilvania Univ. (Brasov) and we are expect-
ing. Students begin to have projects using Haskell in ing Haskell to be used there, too, during this academic
order to pass the License Exams. But it is just a begin- year. Other libraries had received manuals and even
ning. Interests in Data Base Programing with Haskell donations (in books, of course). Editors seem to be
are growing. (A surprise!). interested by the Ro/Haskell movement, and some of
A book previously published by Mihai Gontineac was them have already declared the intention of helping us
released as a free resource. A new book, “The Prac- by investing capital in the Haskell books production.
tice Of Monadic Interpretation” by Dan Popa has been A well known Publishing House (MatrixRom) asked us
published in November 2008. to be the Official Publishing House of the Ro/haskell
Group.
Dan Popa is reporting a new technology in order to
build the Modular Abstract Syntax Tree of a language
processor without Maybe, without Catamorphisms and
without Haskell extensions. A paper is available.
There are some unsolved problems, too: PhD. Ad-
visors (specialized in monads, languages engineering,
and Haskell) are almost impossible to find. This fact
seems to block somehow the hiring of good specialists
in Haskell. There was even a funny case when some-
body hired to teach Haskell was tested and interviewed
by a LISP teacher. Of course, the exam was more or
less about lists.

Further reading
The book has a nice foreword written by Simon P.J. and
◦ Ro/Haskell: http://www.haskell.org/haskellwiki/Ro/
is sharing the experience of a year of interpreter build-
Haskell
ing (2006). It is intended as a student’s and teacher’s
◦ Rodin: http://www.haskell.org/haskellwiki/Rodin
guide to the practical approach of monadic interpre-
tation. The book will probably be used during this
academic year in 2–4 universities across Romania (in 8.8 fp-syd: Functional Programming in
Iasi, Bacau, Cluj-Napoca). Sydney, Australia.
Haskell products like Rodin (a small DSL a bit like
C but written in Romanian) begin to spread, proving
Report by: Ben Lippmeier
the power of the Haskell language. The Pseudocode Participants: Erik de Castro Lopo
Language Rodin is used as a tool for teaching basics
of computer science in some high-schools from various We are a seminar and social group for people in Syd-
cities. Some teachers from a high school have requested ney, Australia interested in Functional Programming
training concerning Rodin. Rodin was asked to become and related fields. We meet on the third Thursday of
a FOSS (Free & Open Source Software). each month and regularly get 25–30 attendees, with a
A group of researchers from the field of linguis- 70/30 industry/research split. Talks this year have in-
tics located at the State Univ. from Bacau (The LO- cluded “Intro to PLT Scheme”, “A Haskell library for
GOS Group) is declaring the intention of bridging the chart plotting”, and “Program extraction in a theorem
gap between semiotics, high level linguistics, struc- prover like Coq (or Isabelle)”. We usually have about
turalism, nonverbal communication, dance semiotics 90 mins of talks, starting at 6:30pm, then go for drinks
(and some other intercultural subjects) AND Compu- afterwards. All welcome.
tational Linguistics (meaning Pragmatics, Semantics,
Syntax, Lexicology, etc.) using Haskell as a tool for Further reading
real projects. Probably the situation from Romania
is not well known: Romania is probably one of those http://groups.google.com/group/fp-syd

65
8.9 Functional Programming at Chalmers and maintenance happens at Chalmers. For ex-
ample, enhancing Yi was the goal of two master’s
Report by: Jean-Philippe Bernardy theses, and motivated research about incremental
parsing: http://publications.lib.chalmers.se/cpl/record/
Functional Programming is an important component of
index.xsql?pubid=94979.
the Department of Computer Science and Engineering
at Chalmers. In particular, Haskell has a very impor-
tant place, as it is used as the vehicle for teaching and Language-based security SecLib is a light-weight li-
numerous projects. Besides functional programming, brary to provide security policies for Haskell programs.
language technology, and in particular domain specific The library provides means to preserve confidentiality
languages is a common aspect in our projects. of data (i.e., secret information is not leaked) as well
The Functional Programming research group has 5 as the ability to express intended releases of informa-
faculty members and 9 postdoc and doctoral students. tion known as declassification. Besides confidentiality
Research is going on in various exciting topics: policies, the library also supports another important
aspect of security: integrity of data. SecLib provides
an attractive, intuitive, and simple setting to explore
Property-based testing QuickCheck is the basis for the security policies needed by real programs.
a European Union project on Property Based Test-
ing (www.protest-project.eu). We are applying the
Type theory Type theory is strongly connected to
QuickCheck approach to Erlang software, together
functional programming research. Many dependently-
with Ericsson, Quviq, and others. Much recent work
typed programming languages and type-based proof as-
has focused on PULSE, the ProTest User-Level Sched-
sistants have been developed at Chalmers. The Agda
uler for Erlang, which has been used to find race con-
system (→ 3.2.2) is the latest in this line, and is of par-
ditions in industrial software — see our ICFP 2009
ticular interest to Haskell programmers. We encourage
paper for details. A new tool, QuickSpec, gener-
you to experiment with programs and proofs in Agda
ates algebraic specifications for an API automatically,
as a “dependently typed Haskell”.
in the form of equations verified by random testing.
A draft paper can be found here: http://www.cse.
chalmers.se/~nicsma/quickspec.pdf. Lastly, we have de- DSP programming Feldspar is a domain-specific lan-
vised a technique to speed up testing of polymor- guage for digital signal processing (DSP), developed
phic properties: http://publications.lib.chalmers.se/cpl/ in co-operation by Ericsson, Chalmers FP group and
record/index.xsql?pubid=99387. Eötvös Loránd (ELTE) University in Budapest. The
motivating application is telecom processing, but the
language is intended to be more general. As a first
Natural language technology Grammatical Frame- stage, we focus on the data-intensive numeric algo-
work (→ 6.10.3) is a declarative language for describ- rithms which are at the core of any DSP application,
ing natural language grammars. It is useful in various but in the future, we also plan to extend the language to
applications ranging from natural language generation, deal with more system-level aspects. The data process-
parsing and translation to software localization. The ing language is purely functional and highly inspired by
framework provides a library of large coverage gram- Haskell. Currently the language is implemented as an
mars for currently fifteen languages from which the de- embedded language in Haskell.
velopers could derive smaller grammars specific for the The implementation (including a code generator de-
semantics of a particular application. veloped by ELTE University) will be publicly released
within the coming weeks. Keep an eye on the project
Generic Programming Starting with Polytypic Pro- page: http://sourceforge.net/projects/feldspar/.
gramming in 1995 there is a long history of generic
programming research at Chalmers. Recent develop- Hardware design/verification The functional pro-
ments include work on dependent types (a JFP pa- gramming group has developed three different hard-
per + library around “Algebra of Programming us- ware description languages — Lava, Wired and Chalk
ing Agda”), two survey papers “C++ Concepts =? (chronological order) — implemented in Haskell. Each
Haskell Type Classes” and “Comparing GP Libs in language targets a different abstraction level. The basic
Haskell” and applications to sustainable development idea behind all three is to model circuits as functions
with the Potsdam Institute for Climate Impact Re- from inputs to outputs. This allows structural hard-
search (http://www.pik-potsdam.de/. Patrik Jansson ware description in standard functional programming
(with Sibylle Schupp) chaired the recent Workshop on style.
Generic Programming. Chalk is a new language for architecture design.
Once you have defined a Chalk circuit, you can sim-
Text editors Yi is a text editor in and for Haskell. ulate it, or explore it further using non-standard in-
It is a community project, but much development terpretations. This is particularly useful if you want

66
to perform high-level power and performance analysis project will also include a showcase player using the
early on in the design process. decoder.
In Lava, circuits are described at the gate level
(with some RTL support). The version developed
at Chalmers (http://www.cs.chalmers.se/~koen/Lava/)
has a particular aim to support formal verification in a
convenient way. The version developed at Xilinx Inc.
(http://raintown.org/lava/) focuses on FPGA core gen-
eration, and has been successfully used in real indus-
trial design projects.
Wired is an extension to Lava, targeting (not exclu-
sively) semi-custom VLSI design. A particular aim of
Wired is to give the designer more control over on-chip
wires’ effects on performance. Some features of Wired
are:
◦ Initial description can be purely functional (a la
Lava).
◦ Incremental specification of physical aspects.
◦ Accurate, wire-aware timing/power analysis within
the system.
◦ Support for an academic 45nm cell library.
Unfortunately, Wired is not actively developed at the
moment, but the system has recently been used to ex-
plore the layout of multipliers (http://publications.lib.
chalmers.se/cpl/record/index.xsql?pubid=93674).
Home page: http://www.cs.chalmers.se/~emax/
wired/

Automated reasoning Equinox is an automated the-


orem prover for pure first-order logic with equality.
Equinox actually implements a hierarchy of logics, re-
alized as a stack of theorem provers that use abstrac-
tion refinement to talk with each other. In the bottom
sits an efficient SAT solver. Paradox is a finite-domain
model finder for pure first-order logic with equality.
Paradox is a MACE-style model finder, which means
that it translates a first-order problem into a sequence
of SAT problems, which are solved by a SAT solver.
Infinox is an automated tool for analyzing first-order
logic problems, aimed at showing finite unsatisfiability,
i.e. the absence of models with finite domains. All three
tools are developed in Haskell.

Teaching Haskell is present in the curriculum as early


as the first year of the Bachelors program. We have
three courses solely dedicated to functional program-
ming (of which two are Masters-level courses), but
we also provide courses which use Haskell for teach-
ing other aspects of computer science, such as pro-
gramming languages, compiler construction, hardware
description and verification, data structures and pro-
gramming paradigms.

Student Projects Masters students Anders Karlsson


and Tobias Olausson are currently developing a (fast)
mp3 decoder in Haskell. More info about this project
can be found at http://trac.haskell.org/HQmpd. The

67

Вам также может понравиться