Index

# Haskell Communities and Activities Report

## Preface

This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries – either completely new or old entries which have been revived after a short temporarily disappearance – are formatted using a blue background, while updated entries have a header with a blue background. 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 HCAR entries and updates to existing ones will be issued on the Haskell mailing lists in March. It is possible that by that time we would have switched to a different generation pipeline. In that case, we might issue a call to update old entries which have been completely removed from the report in the past but are still there in the pipeline.

Now enjoy the current report and see what other Haskellers have been up to lately. Any feedback is very welcome, as always.

Mihai Maruseac, University of Massachusetts Boston, US
Alejandro Serrano Mena, Utrecht University, Netherlands

## 1  Community

 Report by: Michael Snoyman Status: experimental

Haskellers is a site designed to promote Haskell as a language for use in the real world by being a central meeting place for the myriad talented Haskell developers out there. It allows users to create profiles complete with skill sets and packages authored and gives employers a central place to find Haskell professionals.

Haskellers is a web site in maintenance mode. No new features are being added, though the site remains active with many new accounts and job postings continuing. If you have specific feature requests, feel free to send them in (especially with pull requests!).

Haskellers remains a site intended for all members of the Haskell community, from professionals with 15 years experience to people just getting into the language.

## 2  Books, Articles, Tutorials

 Report by: Edward Z. Yang

There are many academic papers about Haskell and many informative pages on the HaskellWiki. Unfortunately, there is not much between the two extremes. That is where The Monad.Reader tries to fit in: more formal than a wiki page, but more casual than a journal article.

There are plenty of interesting ideas that might not warrant an academic publication—but that does not mean these ideas are not worth writing about! Communicating ideas to a wide audience is much more important than concealing them in some esoteric journal. Even if it has all been done before in the Journal of Impossibly Complicated Theoretical Stuff, explaining a neat idea about “warm fuzzy things” to the rest of us can still be plain fun.

The Monad.Reader is also a great place to write about a tool or application that deserves more attention. Most programmers do not enjoy writing manuals; writing a tutorial for The Monad.Reader, however, is an excellent way to put your code in the limelight and reach hundreds of potential users.

Since the last HCAR there has been one new issue, featuring tutorials on generalized algebraic data types, monad transformers, and approximating NP-complete problems with monoids.

### 2.2  Oleg’s Mini Tutorials and Assorted Small Projects

 Report by: Oleg Kiselyov

#### Zipper from any Traversable

Zipper is a functional cursor into a data structure. It lets us navigate to and change, without mutation, an item deeply buried in a tree or a nested record. The result is a new data structure, sharing much of its components with the old one. Zipper for a data structure |D| is itself a data structure |D’|, derived (almost in the calculus sense) from |D|. This zipper-as-datatype view was the original presentation, described by Huet (JFP, 1997) and Hinze and Jeuring (JFP 2001); the data structure derivative was expounded by McBride.

We advocate a different view, emphasizing not the result of navigating through a data structure to a desired item and extracting it, but the process of navigation. Whereas datatype-derivative zipper necessarily depends on the data type (different data types have different derivatives), our “suspended-walk” zipper is datatype-invariant. Our approach works generically not only for (generalized) algebraic data types but also for abstract types (whose structure is hidden) and for types that are not data types at all. All is needed is to support the |Traversable| interface – at the very least, providing something like |mapM|.

It takes only three lines of Haskell code to build a zipper for any |Traversable|. The mini-tutorial illustrates the process on a concrete example.

#### Undelimited continuations are not functions

We alert to the misconception of explicit, or first-class, undelimited continuations as ordinary functions. The confusion is wide-spread, for example, in the description and the code for the |Cont| monad in Haskell’s monad transformer libraries. We argue for a better |call/cc| interface, to hopefully reduce the bewilderment commonly associated with that control operator. We describe the proper undelimited continuation monad, pointing out that Haskell’s |Cont| is actually the monad for delimited continuations. Delimited and undelimited continuations are vastly different. Delimited continuations are isomorphic to functions, they do return the result and can be composed. We emphasize the great help of types in understanding continuations and avoiding their surprises.

The proper implementation of undelimited continuations is surprisingly tricky. In particular, the |Cont| monad in Haskell’s monad transformer library has a couple of imperfections. Our ideal monad for undelimited continuations: (i) spells out in syntax and types of its operations that undelimited continuations are not to be treated as functions; (ii) statically prevents building or executing computations that break the undelimited continuation abstraction and depend on the answer-type. We eventually develop two implementations satisfying both requirements; the second one is almost the same as |Cont|, but with a crucial distinction of the higher-rank type for |runCont|. The higher-rank type prevents the program from using |runCont| internally to run parts of its computation.

#### Recursion from Iteration, an exercise in program derivation

Let us call the looping computation iteration and identify the least fix-point combinator with recursion:  loop :: Monad m => (a -> m a) -> (a -> m b)
loop g  = \x -> g x >>= loop g
((a -> m b) -> (a -> m b)) -> (a -> m b)
fix f = \x -> f (fix f) x

We used the monadic version of |loop| so that we can get out of it (e.g., by throwing an exception). According to its type the above |fix| is the applicative fix-point combinator (like the one typically used in strict languages), to be distinguished from the very different, lazy |mfix| of Haskell. It is trivial to write |loop| in terms of |fix|. Can we do the other way around?

Intuitively, that should be possible: after all, any recursive program, however general, is going to be executed on a CPU, which runs in a simple tail-recursive loop. The details are very tricky and the final result is all but intuitive or comprehensible. One wonders how it could ever work. Andrzej Filinski was the first to systematically derive recursion from iteration in 1992. We show an alternative, shorter derivation relying on monads and equational reasoning.

We solve the problem by equationally deriving a constructive proof of the proposition  forall f x k. exists h y. fix f x k = loop h y k
stating that |fix| is expressible via |loop| in the continuation monad.

### 2.3  Agda Tutorial

 Report by: Péter Divianszky Participants: Ambrus Kaposi, students at ELTE IK Status: experimental

Agda may be the next programming language to learn after Haskell. Learning Agda gives more insight into the various type system extensions of Haskell, for example.

The main goal of the tutorial is to let people explore programming in Agda without learning theoretical background in advance. Only secondary school mathematics is required for the tutorial.

 Report by: Natalia Muska Participants: Michael Snoyman, Edward Kmett, Simon Peyton Jones and others Status: active

The School of Haskell has been available since early 2013. It’s main two functions are to be an education resource for anyone looking to learn Haskell and as a sharing resources for anyone who has built a valuable tutorial. The School of Haskell contains tutorials, courses, and articles created by both the Haskell community and the developers at FP Complete. Courses are available for all levels of developers.

Two new features were added to the School of Haskell. First is the addition of Disqus for commenting on each tutorial and highlighting other potentially interesting tutorials. Second is the inclusion of autorun tags. This enables users to run a snippet as soon as they open a tutorial.

Currently 3150 tutorials have been created (a 125%increase from this time last year) and 441 have been officially published (a 53%increase from this time last year). Some of the most visited tutorials are Text Manipulation Attoparsec, Learning Haskell at the SOH, Introduction to Haskell - Haskell Basics, and A Little Lens Starter Tutorial. Over the past year the School of Haskell has averaged about 16k visitors a month.

All Haskell programmers are encouraged to visit the School of Haskell and to contribute their ideas and projects. This is another opportunity to showcase the virtues of Haskell and the sophistication and high level thinking of the Haskell community.

Visit the School of Haskell here https://www.fpcomplete.com/school

## 3  Implementations

### 3.1  The Glasgow Haskell Compiler

 Report by: Austin Seipp Participants: many others

GHC development is as busy as ever, and 7.10 is going to be no different. Our current release schedule looks like we’d like an RC by Christmas, and a release close to Feburary 2015, which is something of an adjustment based on the 7.8 release. But we’ve still got plenty planed for all our users, as usual.

However, we still need help with it all. GHC is a community project, and as you may be aware, most of this is done by our wonderful contributors. If you want something done, you should certainly try to get in touch and help make it a reality!

#### Libraries, source language, type system:

Applicative is now a superclass of Monad
After much debate, in GHC 7.10, Applicative is finally a superclass of |Monad|, hence completing the Applicative Monad Proposal.

BBP: Foldable/Traversable
As part of the so-called "Burning-Bridges Proposal", the monomorphic definitions in |Prelude|/|Data.List|/|Control.Monad| that conflict with those from |Data.Foldable| and |Data.Traversable| have been replaced by their respective ones from |Data.Foldable|/|Data.Traversable|. This will be in 7.10.

Signature sections
Lennart Augustsson is implementing |(:: ty)| to work the same as |( -> x :: ty)|.

ApplicativeDo
Now that |Applicative| is a superclass of |Monad|, Simon Marlow has plans to implement a new extension for GHC, which will allow |do| notation to be used in the context of |Applicative|, not just |Monad|.

Strict language extension
Johan Tibell is working on a |-XStrict| language extension that will make GHC compile programs in a by-default strict way. Details here.

Mathieu Boespflug and Facundo Dominguez at TweagIO are working on support for Cloud Haskell’s |static| feature. Details here. The current in-progress code review is available at https://phabricator.haskell.org/D119.

In 2013, Adam Gundry implemented the new |-XOverloadedRecordFields| extension for GHC, described on the wiki. We’re still aiming to make this part of 7.10, but there’s still work to be done!

Using an SMT Solver in the type-checker
Iavor Diatchki is working on utilizing an off-the-shelf SMT solver in GHC’s constraint solver. Currently, the main focus for this is improved support for reasoning with type-level natural numbers, but it opens the doors to other interesting functionality, such as supported for lifted (i.e., type-level) (&&), and (||), type-level bit-vectors (perhaps this could be used to implement type-level sets of fixed size), and others. This work is happening on branch |wip/ext-solver|.

Kind equality and kind coercions
Richard Eisenberg (with support from Simon PJ and Stephanie Weirich, among others) is implementing a change to the Core language, as described in a recent paper. When this work is complete, all types will be promotable to kinds, and all data constructors will be promotable to types. This will include promoting type synonyms and type families. As the details come together, there may be other source language effects, such as the ability to make kind variables explicit. It is not expected for this to be a breaking change – the change should allow strictly more programs to be accepted.

Partial type signatures
Thomas Winant and Dominique Devriese are working on partial type signatures for GHC. A partial type signature is a type signature that can contain wildcards, written as underscores. These wildcards can be types unknown to the programmer or types he doesn’t care to annotate. The type checker will use the annotated parts of the partial type signature to type check the program, and infer the types for the wildcards. A wildcard can also occur at the end of the constraints part of a type signature, which indicates that an arbitrary number of extra constraints may be inferred. Whereas |-XTypedHoles| allow holes in your terms, |-XPartialTypeSignatures| allow holes in your types. The design as well as a working implementation are currently being simplified. More details can be found at this wiki page.

Binary literals
Herbert Valerio Riedel implemented the |-XBinaryLiterals| language extension which finally closes the syntax gap relative to other languages which allow to write base-2 literals such as 0b11001001. This is in GHC 7.10.

Gabor Greif is working on a conservative approach to retrofit the metadata types generated by |-XDeriveGeneric| with a runtime-observable type equality. The feature is discussed under GenericsPropositionalEquality.

Backpack module system
Edward Yang is working on extensions to GHC and Cabal to support Backpack. Details in the Backpack wiki page. At the moment, module reexports, the package key infrastructure change, and module thinning and renaming are in GHC HEAD and definitely shipping with 7.10; signatures and Cabal support are coming down the pike. This is in GHC 7.10.

More list fusion
Based on a new compiler transformation by Joachim Breitner, CallArity, foldl and related functions now can take part in list fusion. David Feuer then came up with fusion rules for many more functions. This change may not be a unambiguous improvement in all cases, so if you find regressions, we’d like to hear about them. These changes are all in 7.10.

#### Back end and runtime system

CPU-specific optimizations
Austin Seipp is currently investigating the implementation of CPU-specific optimisations for GHC, including new -march and -mcpu flags to adjust tuning for a particular processor. Right now, there is some preliminary work towards optimizing copies on later Intel machines. There’s interest in expanding this further as well.

Changes to static closures
Edward Yang is working on an overhaul of how static closures represented at runtime to eliminate some expensive memory dereferences in the GC hotpath. The initial results are encouraging: these changes can result in an up to 8%in the runtime of some GC heavy benchmarks. See ticket #8199.

New, smaller array type
Johan Tibell has recently added a new array type, |SmallArray#|, which uses less memory (2 words) than the |Array#| type, at the cost of being more expensive to garbage collect for array sizes large than 128 elements. This is in GHC 7.10.

DWARF-based stack tracing
Peter Wortmann and Arash Rouhani (with support from the Simons) are working on enabling GHC to generate and use DWARF debugging information. This should allow us to obtain stack traces and do profiling without the need for instrumentation. The first stages of this work should land in 7.10, but it’s not clear if the full feature set will.

Reimplemented GMP-based |Integer| backend
Herbert Valerio Riedel is working on this ticket to provide a GMP-based |Integer| backend not relying on registering GHC-specific custom GMP memory allocators which cause problems when linking to other C-code also using GMP unaware of GHC’s memory management.

#### Frontend, build-system, and miscellaneous changes

GHC is now using Submodules for all repositories
For a very long time, GHC has used a mixed method of containing some dependencies as submodules, while others were maintained as floating repositories. Unfortunately, this was a constant source of errors, and made certain things like using |git bisect| in a robust way impossible. As of GHC now and for the future, all dependent repositories are tracked through |git submodule|, making them much more robust and reproducible.

Phabricator for code review
For the past few months, many GHC developers have been doing something new – public code review! To facilitate that, Haskell.org now runs a copy of Phabricator that we use for continuous integration and code review of incoming patches. Our instance has been tuned to support GHC, and many developers are actively submitting their patches through the queue. This is not only much more robust than trac tickets, it can also do testing of your patches, along with a nifty command line tool for other utilities.

#### Development updates, joining in and a big Thank You!

In the past several months, GHC has seen a surge of community involvement, and a great deal of new contributors.

As ever, there is a ton of stuff in the future for us to do. If you want something done — don’t wait, it might take a while. You should join us instead!

 Report by: Kiwamu Okabe Participants: John Meacham, Hiroki Mizuno, Hidekazu Segawa, Takayuki Muranushi Status: experimental

#### What is it?

Ajhc is a Haskell compiler, and acronym for “A fork of jhc”.

Jhc (http://repetae.net/computer/jhc/) converts Haskell code into pure C language code running with jhc’s runtime. And the runtime is written with 3000 lines (include comments) pure C code. It’s a magic!

Ajhc’s mission is to keep contribution to jhc in the repository. Because the upstream author of jhc, John Meacham, can’t pull the contribution speedily. (I think he is too busy to do it.) We should feedback jhc any changes. Also Ajhc aims to provide the Metasepi project with a method to rewrite NetBSD kernel using Haskell. The method is called Snatch-driven development http://www.slideshare.net/master_q/20131020-osc-tokyoajhc.

Ajhc is, so to speak, an accelerator to develop jhc.

#### Demonstrations

NetBSD kernel’s HD Audio sound driver has interrupt handler. The interrupt handler of the demo is re-written by Haskell language using Ajhc.

At the demo, run following operations. First, set breakpoint at the interrupt of finding headphone, and see Haskell function names on backtrace. Second, set breakpoint s_alloc() function, that allocate area in Haskell heap. Make sure of calling the function while anytime running kernel. Nevertheless, playing wav file does not break up.

The source code is found at https://github.com/metasepi/netbsd-arafura-s1 The interrupt handler source code at https://github.com/metasepi/netbsd-arafura-s1/blob/fabd5d64f15058c198ba722058c3fb89f84d08a5/metasepi/sys/hssrc/Dev/Pci/Hdaudio/Hdaudio.hs#L15.

The touchable cube application is written with Haskell and compiled by Ajhc. In the demo, the application is breaked by ndk-gdb debugger when running GC. You could watch the demo source code at https://github.com/ajhc/demo-android-ndk.

The demo is running code that compiled with Ajhc on Cortex-M3 board, mbed. It’s a simple RSS reader for reddit.com, showing the RSS titles on Text LCD panel. You could watch the demo detail and source code at https://github.com/ajhc/demo-cortex-m3.

The demo is running Haskell code without any OS. Also the clock exception handler is written with Haskell.

#### Usage

You can install Ajhc from Hackage.

$cabal install ajhc$ ajhc --version
ajhc 0.8.0.9 (9c264872105597700e2ba403851cf3b
236cb1646)
compiled by ghc-7.6 on a x86_64 running linux
$echo 'main = print "hoge"' > Hoge.hs$ ajhc Hoge.hs
./hs.out "hoge" Please read “Ajhc User’s Manual” to know more detail. (http://ajhc.metasepi.org/manual.html) #### Future plans Maintain Ajhc as compilable with latast GHC. #### License #### Contact #### Further reading ### 3.3 The Helium Compiler  Report by: Jurriaan Hage Participants: Bastiaan Heeren Helium is a compiler that supports a substantial subset of Haskell 98 (but, e.g., n+k patterns are missing). Type classes are restricted to a number of built-in type classes and all instances are derived. The advantage of Helium is that it generates novice friendly error feedback, including domain specific type error diagnosis by means of specialized type rules. Helium and its associated packages are available from Hackage. Install it by running cabal install helium. Currently Helium is at version 1.8. You should also cabal install lvmrun on which it dynamically depends for running the compiled code. The Helium website is located http://www.cs.uu.nl/wiki/Helium. This website also explains in detail what Helium is about, what it offers, and what we plan to do in the near and far future. A student has added parsing and static checking for type class and instance definitions to the language, but type inferencing and code generating still need to be added. Completing support for type classes is the first thing on our agenda. ### 3.4 UHC, Utrecht Haskell Compiler  Report by: Atze Dijkstra Participants: many others Status: active development UHC is the Utrecht Haskell Compiler, supporting almost all Haskell98 features and most of Haskell2010, plus experimental extensions. StatusCurrent active development directly on UHC: • Making intermediate Core language available as a compilable language on its own (Atze Dijkstra) to be used for experimenting with alternate Agda backends (Philipp Hausmann). • Making the platform independent part of UHC available via Hackage, probably as a “UHC light” together with a small interpreter for Core files (Atze Dijkstra). • Implementing static analyses (various students, Jurriaan Hage). Current work indirectly on or related to UHC: • Incrementality of analysis via the Attribute Grammar system used to construct UHC (Jeroen Bransen, PhD thesis soon to be finished, see also UUAGC). • Rewriting the type system combining ideas from the constrained-based approach in GHC and type error improvements found in Helium (Alejandro Serrano). Background.UHC actually is a series of compilers of which the last is UHC, plus infrastructure for facilitating experimentation and extension. The distinguishing features for dealing with the complexity of the compiler and for experimentation are (1) its stepwise organisation as a series of increasingly more complex standalone compilers, the use of DSL and tools for its (2) aspectwise organisation (called Shuffle) and (3) tree-oriented programming (Attribute Grammars, by way of the Utrecht University Attribute Grammar (UUAG) system (→5.3.2). #### Further reading ### 3.5 Specific Platforms #### 3.5.1 Haskell on FreeBSD  Report by: PALI Gabor Janos Participants: FreeBSD Haskell Team Status: ongoing The FreeBSD Haskell Team is a small group of contributors who maintain Haskell software on all actively supported versions of FreeBSD. The primarily supported implementation is the Glasgow Haskell Compiler together with Haskell Cabal, although one may also find Hugs and NHC98 in the ports tree. FreeBSD is a Tier-1 platform for GHC (on both i386 and amd64) starting from GHC 6.12.1, hence one can always download vanilla binary distributions for each recent release. We have a developer repository for Haskell ports that features around 560 ports of many popular Cabal packages. The updates committed to this repository are continuously integrated to the official ports tree on a regular basis. However, the FreeBSD Ports Collection already includes many popular and important Haskell software: GHC 7.8.3, Haskell Platform 2014.2.0.0, Gtk2Hs, wxHaskell, XMonad, Pandoc, Gitit, Yesod, Happstack, Snap, Agda, git-annex, and so on – all of them have been incorporated into the upcoming 10.1-RELEASE. If you find yourself interested in helping us or simply want to use the latest versions of Haskell programs on FreeBSD, check out our development repository on GitHub (see below) where you can find the latest versions of the ports together with all the important pointers and information required for contacting or contributing. #### Further reading #### 3.5.2 Debian Haskell Group  Report by: Joachim Breitner Status: working The Debian Haskell Group aims to provide an optimal Haskell experience to users of the Debian GNU/Linux distribution and derived distributions such as Ubuntu. We try to follow the Haskell Platform versions for the core package and package a wide range of other useful libraries and programs. At the time of writing, we maintain 786 source packages. A system of virtual package names and dependencies, based on the ABI hashes, guarantees that a system upgrade will leave all installed libraries usable. Most libraries are also optionally available with profiling enabled and the documentation packages register with the system-wide index. The recently released stable Debian release (“wheezy”) provides the Haskell Platform 2012.3.0.0 and GHC 7.4.1, while in Debian unstable, we provide the platform 2013.2.0.0 and GHC 7.6.3. The upcoming Debian release (“jessie”) will also ship the proven GHC 7.6.3. GHC 7.8.2 is available in Debian experimental. Debian users benefit from the Haskell ecosystem on 14 architecture/kernel combinations, including the non-Linux-ports KFreeBSD and Hurd. Newly supported are arm64 and ppc64el. #### Further reading #### 3.5.3 Fedora Haskell SIG  Report by: Jens Petersen Participants: Ricky Elrod, Ben Boeckel, and others Status: active The Fedora Haskell SIG works to provide good Haskell support in the Fedora Project Linux distribution. Fedora 21 Beta is about to be released. Although we have had a long development cycle – Fedora 21 will feature new installable Cloud, Server and Workstation products – a lot of the work has focused on improving our packaging tools and utilities to make it easier to maintain our growing collection of packages going forward. So the good news is that going forward we should be able to move a bit faster, and though we have updated various packages for Fedora 21 the Haskell packages are not not radically newer than current Fedora 20. Fedora 22 development is already underway: we plan to update ghc to 7.8, refresh many packages to their latest versions, and add some more libraries and dependencies. We may add statically linked executable subpackages using alternatives since static linking is a recurring request from advanced users. In the meantime there is a ghc-7.8 Fedora Copr repo available for Fedora 20+ and EPEL 7. EPEL 7 was released at the end of August with ghc-7.6.3, haskell-platform-2013.2.0.0, pandoc-1.12.3.1, and many other packages. At the time of writing we have now almost 300 Haskell source packages in Fedora. The cabal-rpm packaging tool has improved further: with better handling for existing spec files, testsuite support, recursive package building and installation, and support for RHEL 5 and SuSE packaging, as well as Cabal 1.20. If you are interested in Fedora Haskell packaging, please join our low-traffic mailing-list and the Freenode #fedora-haskell channel. You can also follow @fedorahaskell for occasional updates. #### Further reading ## 4 Related Languages and Language Design ### 4.1 Agda  Report by: Andreas Abel Participants: Nils Anders Danielsson, Ulf Norell, Makoto Takeyama, Stevan Andjelkovic, Jean-Philippe Bernardy, James Chapman, Dominique Devriese, Péter Divianszky Fredrik Nordvall Forsberg, Olle Fredriksson, Daniel Gustafsson, Alan Jeffrey, Fredrik Lindblad, Guilhem Moulin, Nicolas Pouillard, Andrés Sicard-Ramirez and many more Status: actively developed Agda is a dependently typed functional programming language (developed using Haskell). A central feature of Agda is inductive families, i.e., GADTs which can be indexed by values and not just types. The language also supports coinductive types, parameterized modules, and mixfix operators, and comes with an interactive interface—the type checker can assist you in the development of your code. A lot of work remains in order for Agda to become a full-fledged programming language (good libraries, mature compilers, documentation, etc.), but already in its current state it can provide lots of fun as a platform for experiments in dependently typed programming. Since the release of Agda 2.3.2 in November 2012 the following has happened in the Agda project and community: • Ulf Norell gave a keynote speech at ICFP 2013 on dependently typed programming in Agda. • Agda has attracted new users, the traffic on the mailing list (and bug tracker) is increasing. • Agda has seen several enhancements in its type checker, termination checker, interactive editor, and LaTeX-backend. • Copatterns are being added to Agda as a new way to define record and coinductive values. • Agda’s pattern matching can be restricted to not use Streicher’s Axiom K; which makes it more compatible with Homotopy Type Theory. Release of Agda 2.3.4 is planned to happen in the second quartal of 2014. #### Further reading The Agda Wiki: http://wiki.portal.chalmers.se/agda/ ### 4.2 MiniAgda  Report by: Andreas Abel Status: experimental MiniAgda is a tiny dependently-typed programming language in the style of Agda (→4.1). It serves as a laboratory to test potential additions to the language and type system of Agda. MiniAgda’s termination checker is a fusion of sized types and size-change termination and supports coinduction. Bounded size quantification and destructor patterns for a more general handling of coinduction. Equality incorporates eta-expansion at record and singleton types. Function arguments can be declared as static; such arguments are discarded during equality checking and compilation. MiniAgda is now hosted on http://hub.darcs.net/abel/miniagda. MiniAgda is available as Haskell source code on hackage and compiles with GHC 6.12.x – 7.8.2. #### Further reading ### 4.3 Disciple  Report by: Ben Lippmeier Participants: Ben Lippmeier, Amos Robinson, Erik de Castro Lopo, Kyle van Berendonck Status: experimental, active development The Disciplined Disciple Compiler (DDC) is a research compiler used to investigate program transformation in the presence of computational effects. It compiles a family of strict functional core languages and supports region, effect and closure typing. This extra information provides a handle on the operational behaviour of code that isn’t available in other languages. Programs can be written in either a pure/functional or effectful/imperative style, and one of our goals is to provide both styles coherently in the same language. #### What is new? DDC is in an experimental, pre-alpha state, though parts of it do work. In March this year we released DDC 0.4.1, with the following new features: • Added a bi-directional type inferencer based on Joshua Dunﬁeld and Neelakantan Krishnaswami’s recent ICFP paper. • Added a region extension language construct, and coeffect system. • Added the Disciple Tetra language which includes infix operators and desugars into Disciple Core Tetra. • Compilation of Tetra and Core Tetra programs to C and LLVM. • Early support for rate inference in Core Flow. • Flow fusion now generates vector primops for maps and folds. • Support for user-defined algebraic data types. • Civilized error messages for unsupported or incomplete features. • Most type error messages now give source locations. • Building on Windows platforms. • Better support for foreign imported types and values. • Changed to Git for version control. #### Further reading ### 4.4 Ermine  Report by: Edward Kmett Participants: Dan Doel, Josh Cough, Elliot Stern, Stephen Compall, Runar Oli Bjarnason, Paul Chiusano Status: actively developed, experimental Ermine is a Haskell-like programming language, extended with rank-N types, kind and row polymorphism that runs on the JVM designed at McGraw Hill Financial. The language currently has two implementations, a legacy implementation that was written in Scala, and a newer, more extensible, implementation that is actively being developed in Haskell. The Scala implementation is designed more or less as a straight interpreter, while the Haskell version is designed to be able to compile down to a smaller, relatively portable core. Neither backend generates Java bytecode directly to avoid leaking “Permgen” space. In July, we were able to obtain corporate approval to open source the existing Scala-based compiler and the nascent Haskell implementation. The Scala version of the language is being actively used to generate a number of financial reports within the S&P Capital IQ web platform. An introduction to Ermine has been given at Boston Haskell and at CUFP 2013. Stephen Compall has been putting together a documentation project. #### Further reading ## 5 Haskell and … ### 5.1 Haskell and Parallelism #### 5.1.1 Eden  Report by: Rita Loogen Participants: in Madrid: Yolanda Ortega-Mallén, Mercedes Hidalgo, Lidia Sanchez-Gil, Fernando Rubio, Alberto de la Encina, in Marburg: Mischa Dieterle, Thomas Horstmeyer, Rita Loogen, in Copenhagen: Jost Berthold Status: ongoing Eden extends Haskell with a small set of syntactic constructs for explicit process specification and creation. While providing enough control to implement parallel algorithms efficiently, it frees the programmer from the tedious task of managing low-level details by introducing automatic communication (via head-strict lazy lists), synchronization, and process handling. Eden’s primitive constructs are process abstractions and process instantiations. The Eden logo consists of four λ turned in such a way that they form the Eden instantiation operator (#). Higher-level coordination is achieved by defining skeletons, ranging from a simple parallel map to sophisticated master-worker schemes. They have been used to parallelize a set of non-trivial programs. Eden’s interface supports a simple definition of arbitrary communication topologies using Remote Data. The remote data concept can also be used to compose skeletons in an elegant and effective way, especially in distributed settings. A PA-monad enables the eager execution of user defined sequences of Parallel Actions in Eden. Survey and standard reference: Rita Loogen, Yolanda Ortega-Mallén, and Ricardo Peña: Parallel Functional Programming in Eden, Journal of Functional Programming 15(3), 2005, pages 431–475. Tutorial: Rita Loogen: Eden - Parallel Functional Programming in Haskell, in: V. Zsok, Z. Horvath, and R. Plasmeijer (Eds.): CEFP 2011, Springer LNCS 7241, 2012, pp. 142-206. (see also: http://www.mathematik.uni-marburg.de/~eden/?content=cefp) #### Implementation Eden is implemented by modifications to the Glasgow-Haskell Compiler (extending its runtime system to use multiple communicating instances). Apart from MPI or PVM in cluster environments, Eden supports a shared memory mode on multicore platforms, which uses multiple independent heaps but does not depend on any middleware. Building on this runtime support, the Haskell package edenmodules defines the language, and edenskels provides a library of parallel skeletons. A new version based on GHC-7.8.2 (including binary packages and prepared source bundles) has been released in April 2014. The new version fixes a number of issues related to error shut-down and recovery, and features extended support for serialising Haskell data structures. Previous stable releases with binary packages and bundles are still available on the Eden web pages. The source code repository for Eden releases is http://james.mathematik.uni-marburg.de:8080/gitweb, the Eden libraries (Haskell-level) are also available via Hackage. #### Tools and libraries The Eden trace viewer tool EdenTV provides a visualisation of Eden program runs on various levels. Activity profiles are produced for processing elements (machines), Eden processes and threads. In addition message transfer can be shown between processes and machines. EdenTV is written in Haskell and is freely available on the Eden web pages and on hackage. The Eden skeleton library is under constant development. Currently it contains various skeletons for parallel maps, workpools, divide-and-conquer, topologies and many more. Take a look on the Eden pages. #### Recent and Forthcoming Publications • M. KH. Aswad, P. W. Trinder, A. D. Al-Zain, G. J. Michaelson, J. Berthold: Comparing Low-Pain and No-Pain Multicore Haskells, revised and extended version of TFP 2009 paper, in Special Issue of Higher-Order Symbol Computation (HOSC), to appear, Springer US. #### Further reading #### 5.1.2 speculation  Report by: Edward Kmett Participants: Jake McArthur Status: stable This package provides speculative function application and speculative folds based on • Prakash Prabhu, G. Ramalingam, and Kapil Vaswani, “Safe Programmable Speculative Parallelism”, In the proceedings of Programming Language Design and Implementation (PLDI) Vol 45, Issue 6 (June 2010) pp 50-61. Unlike the original paper, we can take advantage of immutability and the spark queue in Haskell to ensure we never worsen the asymptotics of a single-threaded algorithm. Speculative STM transactions take the place of the transactional rollback machinery from the paper. #### Further reading ### 5.2 Haskell and the Web #### 5.2.1 WAI  Report by: Michael Snoyman Participants: Greg Weber Status: stable The Web Application Interface (WAI) is an interface between Haskell web applications and Haskell web servers. By targeting the WAI, a web framework or web application gets access to multiple deployment platforms. Platforms in use include CGI, the Warp web server, and desktop webkit. WAI is also a platform for re-using code between web applications and web frameworks through WAI middleware and WAI applications. WAI middleware can inspect and transform a request, for example by automatically gzipping a response or logging a request. The Yesod (→5.2.5) web framework provides the ability to embed arbitrary WAI applications as subsites, making them a part of a larger web application. By targeting WAI, every web framework can share WAI code instead of wasting effort re-implementing the same functionality. There are also some new web frameworks that take a completely different approach to web development that use WAI, such as webwire (FRP), MFlow (continuation-based) and dingo (GUI). The Scotty (→5.2.9) web framework also continues to be developed, and provides a lighter-weight alternative to Yesod. Other frameworks- whether existing or newcomers- are welcome to take advantage of the existing WAI architecture to focus on the more innovative features of web development. WAI applications can send a response themselves. For example, wai-app-static is used by Yesod to serve static files. However, one does not need to use a web framework, but can simply build a web application using the WAI interface alone. The Hoogle web service targets WAI directly. Since the last HCAR, WAI has successfully released version 3.0, which removes dependency on any specific streaming data framework. A separate wai-conduit package provides conduit bindings, and such bindings can easily be provided for other streaming data frameworks. The WAI community continues to grow, with new applications and web frameworks continuing to be added. We’ve recently started a new mailing list to discuss WAI related topics. Interested parties are strongly encouraged to join in! #### Further reading #### 5.2.2 Warp  Report by: Michael Snoyman Warp is a high performance, easy to deploy HTTP server backend for WAI (→5.2.1). Since the last HCAR, Warp has followed WAI in its move from conduit to a lower level streaming data abstraction. We’ve additionally continued work on more optimizations, and improved support for power efficiency by using the auto-update package. Due to the combined use of ByteStrings, blaze-builder, conduit, and GHC’s improved I/O manager, WAI+Warp has consistently proven to be Haskell’s most performant web deployment option. Warp is actively used to serve up most of the users of WAI (and Yesod). “Warp: A Haskell Web Server” by Michael Snoyman was published in the May/June 2011 issue of IEEE Internet Computing: #### 5.2.3 Happstack  Report by: Jeremy Shaw Happstack is a fast, modern framework for creating web applications. Happstack is well suited for MVC and RESTful development practices. We aim to leverage the unique characteristics of Haskell to create a highly-scalable, robust, and expressive web framework. Happstack pioneered type-safe Haskell web programming, with the creation of technologies including web-routes (type-safe URLS) and acid-state (native Haskell database system). We also extended the concepts behind formlets, a type-safe form generation and processing library, to allow the separation of the presentation and validation layers. Some of Happstack’s unique advantages include: • a large collection of flexible, modular, and well documented libraries which allow the developer to choose the solution that best fits their needs for databases, templating, routing, etc. • the most flexible and powerful system for defining type-safe URLs. • a type-safe form generation and validation library which allows the separation of validation and presentation without sacrificing type-safety • a powerful, compile-time HTML templating system, which allows the use of XML syntax A recent addition to the Happstack family is the happstack-foundation library. It combines what we believe to be the best choices into a nicely integrated solution. happstack-foundation uses: • happstack-server for low-level HTTP functionality • acid-state for type-safe database functionality • web-routes for type-safe URL routing • reform for type-safe form generation and processing • HSP for compile-time, XML-based HTML templates • JMacro for compile-time Javascript generation and syntax checking #### Future plans Happstack is the oldest, actively developed Haskell web framework. We are continually studying and applying new ideas to keep Happstack fresh. By the time the next release is complete, we expect very little of the original code will remain. If you have not looked at Happstack in a while, we encourage you to come take a fresh look at what we have done. Some of the projects we are currently working on include: • a fast pipes-based HTTP and websockets backend with a high level of evidence for correctness • a dynamic plugin loading system • a more expressive system for weakly typed URL routing combinators • a new system for processing form data which allows fine grained enforcement of RAM and disk quotas and avoids the use of temporary files • a major refactoring of HSP (fewer packages, migration to Text/Builder, a QuasiQuoter, and more). One focus of Happstack development is to create independent libraries that can be easily reused. For example, the core web-routes and reform libraries are in no way Happstack specific and can be used with other Haskell web frameworks. Additionally, libraries that used to be bundled with Happstack, such as IxSet, SafeCopy, and acid-state, are now independent libraries. The new backend will also be available as an independent library. When possible, we prefer to contribute to existing libraries rather than reinvent the wheel. For example, our preferred templating library, HSP, was created by and is still maintained by Niklas Broberg. However, a significant portion of HSP development in the recent years has been fueled by the Happstack team. We are also working directly with the Fay team to bring an improved type-safety to client-side web programming. In addition to the new happstack-fay integration library, we are also contributing directly to Fay itself. For more information check out the happstack.com website — especially the “Happstack Philosophy” and “Happstack 8 Roadmap”. #### Further reading #### 5.2.4 Mighttpd2 — Yet another Web Server  Report by: Kazu Yamamoto Status: open source, actively developed Mighttpd (called mighty) version 3 is a simple but practical Web server in Haskell. It provides features to handle static files, redirection, CGI, reverse proxy, reloading configuration files and graceful shutdown. Also TLS is experimentally supported. Mighttpd 3 is now based on WAI 3.0. It also adopts the auto-update library to reduce CPU power consumption at no connection. You can install Mighttpd 3 (mighttpd2) from HackageDB. Note that the package name is mighttpd2, not mighttpd3, for historical reasons. #### Further reading #### 5.2.5 Yesod  Report by: Michael Snoyman Participants: Greg Weber, Luite Stegeman, Felipe Lessa Status: stable Yesod is a traditional MVC RESTful framework. By applying Haskell’s strengths to this paradigm, Yesod helps users create highly scalable web applications. Performance scalablity comes from the amazing GHC compiler and runtime. GHC provides fast code and built-in evented asynchronous IO. But Yesod is even more focused on scalable development. The key to achieving this is applying Haskell’s type-safety to an otherwise traditional MVC REST web framework. Of course type-safety guarantees against typos or the wrong type in a function. But Yesod cranks this up a notch to guarantee common web application errors won’t occur. • declarative routing with type-safe urls — say goodbye to broken links • no XSS attacks — form submissions are automatically sanitized • database safety through the Persistent library (→7.6.2) — no SQL injection and queries are always valid • valid template variables with proper template insertion — variables are known at compile time and treated differently according to their type using the shakesperean templating system. When type safety conflicts with programmer productivity, Yesod is not afraid to use Haskell’s most advanced features of Template Haskell and quasi-quoting to provide easier development for its users. In particular, these are used for declarative routing, declarative schemas, and compile-time templates. MVC stands for model-view-controller. The preferred library for models is Persistent (→7.6.2). Views can be handled by the Shakespeare family of compile-time template languages. This includes Hamlet, which takes the tedium out of HTML. Both of these libraries are optional, and you can use any Haskell alternative. Controllers are invoked through declarative routing and can return different representations of a resource (html, json, etc). Yesod is broken up into many smaller projects and leverages Wai (→5.2.1) to communicate with the server. This means that many of the powerful features of Yesod can be used in different web development stacks that use WAI such as Scotty (→5.2.9). The new 1.4 release of Yesod is almost a completely backwards-compatible change. The version bump was mostly performed to break compatibility with older versions of dependencies, which allowed us to remove approximately 500 lines of conditionally compiled code. Notable changes in 1.4 include: • New routing system with more overlap checking control. • yesod-auth works with your database and your JSON. • yesod-test sends HTTP/1.1 as the version. • Type-based caching with keys. The Yesod team is quite happy with the current level of stability in Yesod. Since the 1.0 release, Yesod has maintained a high level of API stability, and we intend to continue this tradition. Future directions for Yesod are now largely driven by community input and patches. We’ve been making progress on the goal of easier client-side interaction, and have high-level interaction with languages like Fay, TypeScript, and CoffeScript. GHCJS support is in the works. The Yesod site (http://www.yesodweb.com/) is a great place for information. It has code examples, screencasts, the Yesod blog and — most importantly — a book on Yesod. To see an example site with source code available, you can view Haskellers (→1.1) source code: (https://github.com/snoyberg/haskellers). #### Further reading #### 5.2.6 Snap Framework  Report by: Doug Beardsley Participants: Gregory Collins, Shu-yu Guo, James Sanders, Carl Howells, Shane O’Brien, Ozgun Ataman, Chris Smith, Jurrien Stutterheim, Gabriel Gonzalez, and others Status: active development The Snap Framework is a web application framework built from the ground up for speed, reliability, stability, and ease of use. The project’s goal is to be a cohesive high-level platform for web development that leverages the power and expressiveness of Haskell to make building websites quick and easy. Since the last HCAR, the Snap Team released a new major version of the Heist template system. This release allows you to require a namespace on all your splices and enable better error reporting when you have tags without a bound splice. Along with this we exposed a mechanism for generalized error reporting from splices. Now if your splices detect an error condition at application load time they can throw an error to better communicate the problem. If you would like to contribute, get a question answered, or just keep up with the latest activity, stop by the #snapframework IRC channel on Freenode. #### Further reading #### 5.2.7 Sunroof  Report by: Andy Gill Participants: Jan Bracker Status: active Sunroof is a Domain Specific Language (DSL) for generating JavaScript. It is built on top of the JS-monad, which, like the Haskell IO-monad, allows read and write access to external resources, but specifically JavaScript resources. As such, Sunroof is primarily a feature-rich foreign function API to the browser’s JavaScript engine, and all the browser-specific functionality, like HTML-based rendering, event handling, and drawing to the HTML5 canvas. Furthermore, Sunroof offers two threading models for building on top of JavaScript, atomic and blocking threads. This allows full access to JavaScript APIs, but using Haskell concurrency abstractions, like MVars and Channels. In combination with the push mechanism Kansas-Comet, Sunroof offers a great platform to build interactive web applications, giving the ability to interleave Haskell and JavaScript computations with each other as needed. It has successfully been used to write smaller applications. These applications range from 2D rendering using the HTML5 canvas element, over small GUIs, up to executing the QuickCheck tests of Sunroof and displaying the results in a neat fashion. The development has been active over the past 6 months and there is a drafted paper submitted to TFP 2013. #### Further reading #### 5.2.8 MFlow  Report by: Alberto Gomez Corona Status: active development MFlow is a Web framework of the kind of other functional, stateful frameworks like WASH, Seaside, Ocsigen or Racket. MFlow does not use continuation passing properly, but a backtracking monad that permits the synchronization of browser and server and error tracing. This monad is on top of another “Workflow” monad that adds effects for logging and recovery of process/session state. In addition, MFlow is RESTful. Any GET page in the flow can be pointed to with a REST URL. The navigation as well as the page results are type safe. It also implements monadic formlets: They can have their own flow within a page. If JavaScript is enabled, the widget refreshes itself within the page. If not, the whole page is refreshed to reflect the change of the widget. MFlow hides the heterogeneous elements of a web application and expose a clear, modular, type safe DSL of applicative and monadic combinators to create from multipage to single page applications. These combinators, called widgets or enhanced formlets, pack together javascript, HTML, CSS and the server code. [1]. A paper describing the MFlow internals has been published in The Monad Reader issue 23 [2] The use of backtracking to solve ”the integration problem”. It happens when the loose coupling produce exceptional conditions that may trigger the rollback of actions in the context of failures, shutdowns and restart of the systems (long running processes). That has been demonstrated using MFlow in [3]. A web application can be considered as an special case of integration. MFlow pack the elements of a web aplication within composable widgets. This ”deep integration” is the path followed by the software industry to create from higher level framewors to operating systems [4] perch and hplayground are two new packages that make run the page logic of MFlow in the Web Browser using Haste, the Haskell-to-JavaScript compiler. perch has the syntax of blaze-html and hplayground uses the syntax and primitives of the View Monad. Both permit the page logic of MFlow to run fully in the Web Browser. Under the same syntax, they are completely different. Perch[5] are the composable combinators of blaze-html running in the browser. They generate trees by calling DOM primitives directly instead of creating intermediary, lineal descriptions. While string builders are unary tree constructors, perch uses a generalized builder for n-trees. It also has combinators for the modification of elements and it can assign perch event handlers to elements and it has also JQuery like operations. It can be used alone for the creation of client-side applications. hplayground is a monadic functional reactive[6] framework with MFlow syntax that permits the creation of seamless client-side applications. hplayground sequence the perch events in his monad instance, it add monadic and applicative formlets with validations, so the code is modular and seamless. There is a site with example Haste-perch-hplayground (made with MFlow) online[6] . There is also a tutorial for the creation of Client-side applications, that describe the structure of a small accounting application for haskell beginners[7]. Since the event are keep in his scope and the DOM modifications are local but there are no event handlers, Monadic Reactive may be a better alternative to functional Reactive in the creation of seamless Web Browser applications whenever there are many dynamic DOM updates[8]. Future work: The integration of MFlow and perch-hplayground: since both share the same syntax, the aim is to allow the application to decide either to run the page logic in the server or in the client. The first step is to let the programmer decide it. To embed hplayground code inside MFlow some hacks in the Haste generated code are necessary. Perch is being ported to purescript, hplayground will be ported too. The next target is GHCJS. #### Further reading #### 5.2.9 Scotty  Report by: Andrew Farmer Participants: Andrew Farmer Status: active Scotty is a Haskell web framework inspired by Ruby’s Sinatra, using WAI (→5.2.1) and Warp (→5.2.2), and is designed to be a cheap and cheerful way to write RESTful, declarative web applications. • A page is as simple as defining the verb, url pattern, and Text content. • It is template-language agnostic. Anything that returns a Text value will do. • Conforms to WAI Application interface. • Uses very fast Warp webserver by default. The goal of Scotty is to enable the development of simple HTTP/JSON interfaces to Haskell applications. Implemented as a monad transformer stack, Scotty applications can be embedded in arbitrary MonadIOs. The Scotty API is minimal, and fully documented via haddock. The API has recently remained stable, with a steady stream of improvements contributed by the community. #### Further reading ### 5.3 Haskell and Compiler Writing #### 5.3.1 MateVM  Report by: Bernhard Urban Participants: Harald Steinlechner Status: active development MateVM is a method-based Java Just-In-Time Compiler. That is, it compiles a method to native code on demand (i.e. on the first invocation of a method). We use existing libraries: hs-java for proccessing Java Classfiles according to The Java Virtual Machine Specification. harpy enables runtime code generation for i686 machines in Haskell, in a domain specific language style. We think that Haskell is suitable for compiler challenges, as already many times proven. However, we have to jump between “Haskell world” and “native code world”, due to the requirements of a Just-In-Time Compiler. This poses some special challenges when it comes to signal handling and other interesing rather low level operations. Not immediately visible, the task turns out to be well suited for Haskell although we experienced some tensions with signal handling and GHCi. We are looking forward to sharing our experience on this. In the current state we are able to execute simple Java programs. The compiler eliminates the JavaVM stack via abstract interpretation, does a liveness analysis, linear scan register allocation and finally code emission. The architecture enables easy addition of further optimization passes on an intermediate representation. Future plans are, to add an interpreter to gather profile information for the compiler and also do more aggressive optimizations (e.g. method inlining or stack allocation). An interpreter can also be used to enable speculation during compilation and, if such a speculation fails, compiled code can deoptimize to the interpreter. Apart from that, many features are missing for a full JavaVM, most noteable are the concept of Classloaders, Floating Point or Threads. We would like to use GNU Classpath as base library some day. Other hot topics are Hoopl and Garbage Collection. If you are interested in this project, do not hesitate to join us on IRC (#MateVM @ OFTC) or contact us on Github. #### Further reading #### 5.3.2 UUAG  Report by: Jeroen Bransen Participants: ST Group of Utrecht University Status: stable, maintained UUAG is the Utrecht University Attribute Grammar system. It is a preprocessor for Haskell that makes it easy to write catamorphisms, i.e., functions that do to any data type what foldr does to lists. Tree walks are defined using the intuitive concepts of inherited and synthesized attributes, while keeping the full expressive power of Haskell. The generated tree walks are efficient in both space and time. An AG program is a collection of rules, which are pure Haskell functions between attributes. Idiomatic tree computations are neatly expressed in terms of copy, default, and collection rules. Attributes themselves can masquerade as subtrees and be analyzed accordingly (higher-order attribute). The order in which to visit the tree is derived automatically from the attribute computations. The tree walk is a single traversal from the perspective of the programmer. Nonterminals (data types), productions (data constructors), attributes, and rules for attributes can be specified separately, and are woven and ordered automatically. These aspect-oriented programming features make AGs convenient to use in large projects. The system is in use by a variety of large and small projects, such as the Utrecht Haskell Compiler UHC (→3.4), the editor Proxima for structured documents (http://www.haskell.org/communities/05-2010/html/report.html#sect6.4.5), the Helium compiler (http://www.haskell.org/communities/05-2009/html/report.html#sect2.3), the Generic Haskell compiler, UUAG itself, and many master student projects. The current version is 0.9.51 (July 2014), is extensively tested, and is available on Hackage. There is also a Cabal plugin for easy use of AG files in Haskell projects. We recently implemented the following enhancements: Evaluation scheduling. We have done a project to improve the scheduling algorithms for AGs. The previously implemented algorithms for scheduling AG computations did not fully satisfy our needs; the code we write goes beyond the class of OAGs, but the algorithm by Kennedy and Warren (1976) results in an undesired increase of generated code due to non-linear evaluation orders. However, because we know that our code belongs to the class of linear orderable AGs, we wanted to find and algorithm that can find this linear order, and thus lies in between the two existing approaches. We have created a backtracking algorithm for this which is currently implemented in the UUAG (–aoag flag). Another approach to this scheduling problem that we implemented is the use of SAT-solvers. The scheduling problem can be reduced to a SAT-formula and efficiently solved by existing solvers. The advantage is that this opens up possibilities for the user to influence the resulting schedule, for example by providing a cost-function that should be minimized. We have also implemented this approach in the UUAG which uses Minisat as external SAT-solver (–loag flag). We are currently working on the following enhancements: Incremental evaluation. We are currently running a Ph.D. project that investigates incremental evaluation of AGs. In this ongoing work we hope to improve the UUAG compiler by adding support for incremental evaluation, for example by statically generating different evaluation orders based on changes in the input. #### Further reading #### 5.3.3 LQPL — A Quantum Programming Language Compiler and Emulator  Report by: Brett G. Giles Participants: Dr. J.R.B. Cockett Status: v 0.9.1 experimental released in November 2013 LQPL (Linear Quantum Programming Language) is a functional quantum programming language inspired by Peter Selinger’s paper “Towards a Quantum Programming Language”. The LQPL system consists of a compiler, a GUI based front end and an emulator. LQPL incorporates a simple module / include system (more like C’s include than Haskell’s import), predefined unitary transforms, quantum control and classical control, algebraic data types, and operations on purely classical data. Starting with the 0.9 series, LQPL is now split into separate components: • The compiler (Haskell) — available at the command line and via a TCP/IP interface; • The emulator (which emulates a virtual quantum machine) (Haskell) — available as a server via a TCP/IP interface; • The front end (JRuby/Swing) — which connects to both the compiler and the emulator via TCP/IP. Version 0.9.1 was a bugfix release. A screenshot of the interface (showing a probabilistic list) is included below. Quantum programming allows us to provide a fair coin toss: qdata Coin = {Heads | Tails} toss ::( ; c:Coin) = { q = |0>; Had q; measure q of |0> => {c = Heads} |1> => {c = Tails} } This allows programming of probabilistic algorithms, such as leader election. The next major items on the road map are: • Change the TCP/IP data format to something less verbose; • Implementing a translation of the virtual machine code into quantum circuits. #### Further reading Documentation and executable downloads may be found at http://pll.cpsc.ucalgary.ca/lqpl/index.html. The source code, along with a wiki and bug tracker, is available at https://bitbucket.org/BrettGilesUofC/lqpl. #### 5.3.4 free — Free Monads  Report by: Edward Kmett Participants: Gabriel Gonzalez, Aristid Breitkreuz, Nickolay Kudasov, Ben Gamari, Matvey Aksenov, Mihaly Barasz, Twan van Laarhoven Status: actively developed This package provides common definitions for working with free monads and free applicatives. These are very useful when it comes to defining EDSLs. This package also supports cofree comonads, which are useful for tracking attributes through a syntax tree. Recently support was added for the free completely-iterative monad of a monad as well. This can be used as part of a scheme to deamortize calculations in the |ST s| monad. #### Further reading #### 5.3.5 bound — Making De Bruijn Succ Less  Report by: Edward Kmett Participants: Nicolas Pouillard, Jean-Philippe Bernardy, Andrea Vezzosi, Gabor Greif, Matvey B. Aksenov Status: actively developed This library provides convenient combinators for working with “locally-nameless” terms. These can be useful when writing a type checker, evaluator, parser, or pretty printer for terms that contain binders like forall or lambda, as they ease the task of avoiding variable capture and testing for alpha-equivalence. Notably, it uses a representation based on type-safe generalized De Bruijn indices that lets you naturally make your expression type into a |Monad| that permits capture-avoiding substitution, and the use of |Foldable|’s |toList| and |Traversable|’s |traverse| to find free variables. This makes it much easier to manipulate your syntax tree with tools you already know how to use, while still safely avoiding issues with name capture. The generalized De Bruijn encoding permits asymptotic improvement in the running time of many calculations, enabling simultaneous substitution of everything within a complex binder, O(1) lifting, and avoiding paying for the traversal of lifted trees, but the complexity of the encoding is hidden behind a monad transformer that provides you with variable capture. #### Further reading ## 6 Development Tools ### 6.1 Environments #### 6.1.1 Haskell IDE From FP Complete  Report by: Natalia Muska Status: available, stable Since FP Complete announced the launch of FP Haskell Center (FPHC) in early September 2013, a lot of additions to the original IDE have been added and the pricing structure has changed dramatically. The new features and the pricing modifications are a direct result of community feedback. The changes were gradually rolled out over the past year. As of October 1, 2014, all users of FPHC who are using it for non-commercial projects have free access under the new Open Publish model. This means that Open Publish accounts will automatically publish all projects on the FPHC site with each commit, similar to Github. This move is meant to make FPHC more valuable, and increase support for users sharing their work with the community. There are still paid subscriptions available for Commercial projects. This is a current list of features included with the free version of FPHC: • Create and Edit Haskell Projects, • Open Projects from Git, FPHC, or Web • Continuous Error and Type Information • Hoogle and Haddock Integration • Easy to use build system • Vetted Stable Libraries • Easy to Understand Error Messages • No setup or install • Free Community Support • Push Projects to Git and GitHub • Emacs Integration • Shared Team Accounts • Support for Sub Projects • Multiple Repository Projects • Deploy to FP Application Servers • Large Project and Megarepos Support (new) • Subscriptions include continuous refresh releases on new features, updates, bug fixes and free community support Over the past year the feedback and activity on FPHC has been very positive. To ensure FPHC is meeting the demands of the Haskell community, FP complete is constantly seeking feedback and suggestions from users and the Haskell community. #### Further reading Visit www.fpcomplete.com for more information. #### 6.1.2 EclipseFP  Report by: JP Moresmau Participants: building on code from Alejandro Serrano Mena, Thomas ten Cate, B. Scott Michel, Thiago Arrais, Leif Frenzel, Martijn Schrage, Adam Foltzer and others Status: stable, maintained, and actively developed EclipseFP is a set of Eclipse plugins to allow working on Haskell code projects. Its goal is to offer a fully featured Haskell IDE in a platform developers coming from other languages may already be familiar with. It provides the following features, among others: Cabal Integration Provides a .cabal file editor, uses Cabal settings for compilation, allows the user to install Cabal packages from within the IDE. Supports cabal sandboxes (or cabal-dev) to provide install isolation and project dependencies inside an Eclipse workspace. GHC Integration Compilation is done via the GHC API, syntax coloring uses the GHC Lexer. Productive Coding Quick fixes for common errors, warnings, and HLint suggestions. Automatic organization of imports. Autocompletion. Find and rename across modules and projects. Stylish-haskell integration for consistent code formatting. Live Programming A Haskell worksheet allows the developer to see values of expressions, including images and HTML content, as the code changes. Debugging Easy to launch GHCi sessions on any module with proper parameters. Manages breakpoints, the evaluation of variables and expressions uses the Eclipse debugging framework, and requires no knowledge of GHCi syntax. Also integrates with Yesod (launch the web application from EclipseFP). Running a program with profiling options results in profiling graphs being displayed in the UI for easy analysis. Browsing The Haskell Browser perspective allows the user to navigate the list of packages and their documentation. It integrates seamlessly with Hackage. The Haskell module editor provides code folding, outline view of the module, popup of types and documentation mouse hovers, etc. Testing EclipseFP integrates with Haskell test frameworks, most notably HTF, to provide UI feedback on test failures. The source code is fully open source (Eclipse License) on github and anyone can contribute. Current version is 2.6.1, released in July 2014, and more versions with additional features are planned and actively worked on. Feedback on what is needed is welcome! The website has information on downloading binary releases and getting a copy of the source code. Support and bug tracking is handled through Sourceforge forums and github issues. We welcome contributors! #### Further reading #### 6.1.3 ghc-mod — Happy Haskell Programming  Report by: Kazu Yamamoto Status: open source, actively developed For a long time, Kazu Yamamoto was the only active developer of ghc-mod, now two new developers have joined: Alejandro Serrano merged the results of his Google Summer of Code project. He implemented case splitting and sophisticated typed hole handling. Daniel Gröber brushed up the internal code and introduced the GhcModT monad now used throughout the exported API. As a result the API of ghc-mod drastically changed with version 5.0.0. ghc-modi used to suffer from various consistency related issues triggered by changes in the environment, for instance: changing file names of modules, adding dependencies to the cabal file and installing new libraries. ghc-modi v5.1.1 or later handles changes in the environment by restarting the GHC session when this is detected. Kazu stepped down as release manager and Daniel took over. #### Further reading #### 6.1.4 HaRe — The Haskell Refactorer  Report by: Alan Zimmerman Participants: Francisco Soares, Chris Brown, Stephen Adams, Huiqing Li Refactorings are source-to-source program transformations which change program structure and organization, but not program functionality. Documented in catalogs and supported by tools, refactoring provides the means to adapt and improve the design of existing code, and has thus enabled the trend towards modern agile software development processes. Our project, Refactoring Functional Programs, has as its major goal to build a tool to support refactorings in Haskell. The HaRe tool is now in its seventh major release. HaRe supports full Haskell 2010, and is integrated with (X)Emacs. All the refactorings that HaRe supports, including renaming, scope change, generalization and a number of others, are module-aware, so that a change will be reflected in all the modules in a project, rather than just in the module where the change is initiated. Snapshots of HaRe are available from our GitHub repository (see below) and Hackage. There are related presentations and publications from the group (including LDTA’05, TFP’05, SCAM’06, PEPM’08, PEPM’10, TFP’10, Huiqing’s PhD thesis and Chris’s PhD thesis). The final report for the project appears on the University of Kent Refactoring Functional Programs page (see below). There is also a Google+ community called HaRe, and an IRC channel on freenode called #haskell-refactorer. Currently HaRe only supports GHC 7.4.x and 7.6.x. The changes for GHC 7.8.3 showed up the brittleness of the token management process. As a result, the focus over the last few months has been on improving the support in the GHC API for this. This work is summarized here https://ghc.haskell.org/trac/ghc/wiki/GhcApi, but the lightning summary is • More parser entry points, to allow parsing fragments. • Removal of landmines from the AST, allowing traversals with freedom. • The parser can now produce annotations, which can be used to reproduce the original source from the AST and the annotations only. The engine for reproducing the source is here https://github.com/alanz/ghc-exactprint/tree/ghc-7.9. #### Recent developments • HaRe 0.7, which is a major change from 0.6 as it makes use of the GHC library for analysis, has been released; HaRe 0.7 is available on Hackage, and also downloadable from our GitHub page • HaRe 0.7 is alpha software, and comes with a limited number of refactorings, as the work so far has concentrated on getting the new architecture in place to make use of the GHC AST. The new architecture has stabilised and the token management while manipulating the AST is able to preserve layout, thus maintaining the original layout as well as syntactically correct alignment as new elements are added or have their size changed. • There is plenty to do, so anyone who has an interest is welcome to fork the repo and get stuck in. • Stephen Adams is continuing his PhD at the University of Kent and will be working on data refactoring in Haskell. #### Further reading #### 6.1.5 IHaskell: Haskell for Interactive Computing  Report by: Andrew Gibiansky Status: very alpha (but usable!) IHaskell is an interactive interface for Haskell development, designed with the goal of replacing GHCi in some contexts. In addition to a simple REPL, it provides a notebook interface (in the style of Mathematica or Maple). The notebook interface runs in a browser and provides the user with editable cells in which they can create and execute code. The output of this code is displayed in a rich format right below, and if it’s not quite right, the user can go back, edit the cell, and re-execute. This rich format defaults to the same boring plain-text output as GHCi would give you; however, library authors will be able to define their own formats for displaying their data structures in a useful way, with the only limit being that the display output must be viewable in a browser (images, HTML, CSS, Javascript). For instance, integration with graphing libraries could produce in-browser data visualizations, while integration with Aeson’s JSON could produce a syntax-highlighted JSON output for complex data structures. Implementation-wise, IHaskell is a language kernel backend for the project known as IPython. Although it has the name “Python” in the name, IPython provides a language-agnostic protocol by which interactive code environments such as REPLs and notebooks can communicate with a language evaluator backend. IHaskell is a language kernel which uses ZeroMQ to communicate with IPython frontends and the GHC API to evaluate code. Although IHaskell is in very early stages, the future looks incredibly bright. Integration with popular Haskell libraries can give us beautiful and potentially interactive visualizations of Haskell data structures. On one hand, this could range from simple things such as foldable record structures — imagine being able to explore complex nested records by folding and unfolding bits and pieces at a time, instead of trying to mentally parse them from the GHCi output. On the other end, we could have interactive outputs, such as Parsec parsers which generate small input boxes that run the parser on any input they’re given. And these things are just the beginning — tight integration with IPython may eventually be able to provide things such as code-folding in your REPL or an integrated debugger interface. If this sounds good to you: contribute! We’re in dire need of developers to make this beautiful dream a reality, and I would be happy to help you get up to speed quickly. #### Further reading ### 6.2 Code Management #### 6.2.1 Darcs  Report by: Eric Kow Participants: darcs-users list Status: active development Darcs is a distributed revision control system written in Haskell. In Darcs, every copy of your source code is a full repository, which allows for full operation in a disconnected environment, and also allows anyone with read access to a Darcs repository to easily create their own branch and modify it with the full power of Darcs’ revision control. Darcs is based on an underlying theory of patches, which allows for safe reordering and merging of patches even in complex scenarios. For all its power, Darcs remains a very easy to use tool for every day use because it follows the principle of keeping simple things simple. Our most recent release, Darcs 2.8.5 (with GHC 7.8 support), was in August 2014. Some key changes in Darcs 2.8 include a faster and more readable darcs annotate, a darcs obliterate -O which can be used to conveniently “stash” patches, and hunk editing for the darcs revert command. We have now started a feature freeze for our upcoming release, Darcs 2.10. In our sights are the new darcs rebase command (for merging and amending patches that would be hard to do with patch theory alone), the patch index optimisation (for faster local lookups on repositories with long histories), and the packs optimisation (for faster darcs get). Summer of CodeThis summer we completed Google Summer of Code projects: Marcio Diaz has improved our use of the hashed file storage mechanism, first by introducing a garbage collection mechanism to keep our disk space requirements in check, and second by introducing a bucketing system for faster cache lookups. He has also broken ground on a darcs undo mechanism to help users recover from otherwise permanent changes such as amending a patch. Ale Gadea helped us to make darcs patch reordering live up to its potential. He fixed a bug that was causing darcs optimize reorder to hang in some places, added a darcs show dependencies prototype (which draws graphs showing which patches depend on each oher), and started some work in using patch reordering to help us generate “minimal context” patch bundles that can be applied in more repositories. SFC and donationsDarcs is free software licensed under the GNU GPL (version 2 or greater). Darcs is a proud member of the Software Freedom Conservancy, a US tax-exempt 501(c)(3) organization. We accept donations at http://darcs.net/donations.html. #### Further reading #### 6.2.2 DarcsWatch  Report by: Joachim Breitner Status: working DarcsWatch is a tool to track the state of Darcs (→6.2.1) patches that have been submitted to some 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. DarcsWatch continues to be used by the xmonad project, the Darcs project itself, and a few developers. At the time of writing (April 2014), it was tracking 39 repositories and 4620 patches submitted by 254 users. #### Further reading #### 6.2.3 cab — A Maintenance Command of Haskell Cabal Packages  Report by: Kazu Yamamoto Status: open source, actively developed cab is a MacPorts-like maintenance command of Haskell cabal packages. Some parts of this program are a wrapper to ghc-pkg and cabal. If you are always confused due to inconsistency of ghc-pkg and cabal, or if you want a way to check all outdated packages, or if you want a way to remove outdated packages recursively, this command helps you. cab can now stably run on Windows. #### Further reading ### 6.3 Interfacing to other Languages #### 6.3.1 java-bridge  Report by: Julian Fleischer Status: active development The Java Bridge is a library for interfacing the Java Virtual Machine with Haskell code and vice versa. It comes with a rich DSL for discovering and invoking Java methods and allows to set up callbacks into the Haskell runtime. If exported via the FFI it is also possible to use Haskell libraries from within the JVM natively. The package also offers a bindings generator which translates the API of a Java class or package into a Haskell API. Using the bindings generator it is possible to generate a Haskell module with a clean Haskell API that invokes Java behind the scenes. Typical conversions, for example byte arrays to lists or Java maps to lists of key value pairs, are taken care of. The generated bindings and predefined conversions are extensible by defining appropriate type class instances accordingly. While the documentation for the bindings generator still needs improvement, the overall library is in a quite usable state. The java bridge is published under the MIT license and available via hackage as java-bridge. #### Further reading If you want to know more about the inner workings: The Java Bridge has been created as part of a bachelor thesis which you can access at http://page.mi.fu-berlin.de/scravy/bridging-the-gap-between-haskell-and-java.pdf. #### 6.3.2 fficxx  Report by: Ian-Woo Kim Participants: Ryan Feng Status: Actively Developing fficxx (“eff fix”) is an automatic haskell Foreign Function Interface (FFI) generator to C++. While haskell has a well-specified standard for C FFI, interfacing C++ library to haskell is notoriously hard. The goal of fficxx is to ease making haskell-C++ binding and to provide relatively nice mapping between two completely different programming paradigms. To make a C++ binding, one write a haskell model of the C++ public interfaces, and then fficxx automatically generates necessary boilerplate codes in several levels: C++-C shims, C-haskell FFI, low level haskell type representation for C++ class/object and high level haskell type and typeclass representation and some casting functions. The generated codes are organized into proper haskell modules to minimize name space collision and packaged up as cabal packages. The tool is designed to adapt different configurations and unique needs, such as splitting bindings into multiple cabal packages and renaming classes and functions to resolve some obstacles that are originated from naming collision, which is quite inevitable in making an FFI library. The information of a C++ library can be written in terms of simple haskell expressions, aiming at good usability for ordinary haskell users. For example, if we have a C++ library which has the following interface: class A { public: A(); virtual void Foo(); }; class B : public A { public: B(); virtual void Bar(); }; one provide the model in terms of haskell data type defined in fficxx library: a = myclass "A" [] mempty Nothing [ Constructor [] Nothing , Virtual void_ "Foo" [ ] Nothing ] b = myclass "B" [a] mempty Nothing [ Constructor [] Nothing , Virtual void_ "Bar" [] Nothing ] One of the projects that successfully uses fficxx is HROOT which is a haskell binding to the ROOT library. ROOT is a big C++ histogramming and statistical analysis framework. Due to fficxx, the HROOT package faithfully reflects the ROOT C++ class hierarchy, and the user from C++ can use the package relatively easily. fficxx is available on hackage and being developed on the author’s github (http://github.com/wavewave/fficxx). In 2013, with Ryan Feng, we tried to make fficxx more modernized with more transparent support of various C/C++ data types, including consistent multiple pointer/reference operations and function pointers. fficxx is still being in progress in incorporating the new pointer operations. C++ template support is now planned. #### Further reading ### 6.4 Deployment #### 6.4.1 Cabal and Hackage  Report by: Duncan Coutts #### Background Cabal is the standard packaging system for Haskell software. It specifies a standard way in which Haskell libraries and applications can be packaged so that it is easy for consumers to use them, or re-package them, regardless of the Haskell implementation or installation platform. Hackage is a distribution point for Cabal packages. It is an online archive of Cabal packages which can be used via the website and client-side software such as cabal-install. Hackage enables users to find, browse and download Cabal packages, plus view their API documentation. cabal-install is the command line interface for the Cabal and Hackage system. It provides a command line program cabal which has sub-commands for installing and managing Haskell packages. #### Recent progress The Cabal packaging system has always faced growing pains. We have been through several cycles where we’ve faced chronic problems, made major improvements which bought us a year or two’s breathing space while package authors and users become ever more ambitious and start to bump up against the limits again. In the last few years we have gone from a situation where 10 dependencies might be considered a lot, to a situation now where the major web frameworks have a 100+ dependencies and we are again facing chronic problems. The Cabal/Hackage maintainers and contributors have been pursuing a number of projects to address these problems: The IHG sponsored Well-Typed (→8.1) to work on cabal-install resulting in a new package dependency constraint solver. This was incorporated into the cabal-install-0.14 release in the spring, and which is now in the latest Haskell Platform release. The new dependency solver does a much better job of finding install plans. In addition the cabal-install tool now warns when installing new packages would break existing packages, which is a useful partial solution to the problem of breaking packages. We had two Google Summer of Code projects on Cabal this year, focusing on solutions to other aspects of our current problems. The first is a project by Mikhail Glushenkov (and supervised by Johan Tibell) to incorporate sandboxing into cabal-install. In this context sandboxing means that we can have independent sets of installed packages for different projects. This goes a long way towards alleviating the problem of different projects needing incompatible versions of common dependencies. There are several existing tools, most notably cabal-dev, that provide some sandboxing facility. Mikhail’s project was to take some of the experience from these existing tools (most of which are implemented as wrappers around the cabal-install program) and to implement the same general idea, but properly integrated into cabal-install itself. We expect the results of this project will be incorporated into a cabal-install release within the next few months. The other Google Summer of Code project this year, by Philipp Schuster (and supervised by Andres Löh), is also aimed at the same problem: that of different packages needing inconsistent versions of the same common dependencies, or equivalently the current problem that installing new packages can break existing installed packages. The solution is to take ideas from the Nix package manager for a persistent non-destructive package store. In particular it lifts an obscure-sounding but critical limitation: that of being able to install multiple instances of the same version of a package, built against different versions of their dependencies. This is a big long-term project. We have been making steps towards it for several years now. Philipp’s project has made another big step, but there’s still more work before it is ready to incorporate into ghc, ghc-pkg and cabal. #### Looking forward Johan Tibell and Bryan O’Sullivan have volunteered as new release managers for Cabal. Bryan moved all the tickets from our previous trac instance into github, allowing us to move all the code to github. Johan managed the latest release and has been helping with managing the inflow of patches. Our hope is that these changes will increase the amount of contributions and give us more maintainer time for reviewing and integrating those contributions. Initial indications are positive. Now is a good time to get involved. The IHG is currently sponsoring Well-Typed to work on getting the new Hackage server ready for switchover, and helping to make the switchover actually happen. We have recruited a few volunteer administrators for the new site. The remaining work is mundane but important tasks like making sure all the old data can be imported, and making sure the data backup system is comprehensive. Initially the new site will have just a few extra features compared to the old one. Once we get past the deployment hurdle we hope to start getting more contributions for new features. The code is structured so that features can be developed relatively independently, and we intend to follow Cabal and move the code to github. We would like to encourage people considering contributing to take a look at the bug tracker on github, take part in discussions on tickets and pull requests, or submit their own. The bug tracker is reasonably well maintained and it should be relatively clear to new contributors what is in need of attention and which tasks are considered relatively easy. For more in-depth discussion there is also the cabal-devel mailing list. #### Further reading #### 6.4.2 Stackage: the Library Dependency Solution  Report by: Natalia Muska Status: new Stackage began in November 2012 with the mission of making it possible to build stable, vetted sets of packages. The overall goal was to make the Cabal experience better. Two years into the project, a lot of progress has been made and now it includes both Stackage and the Stackage Server. To date, there are over 700 packages available in Stackage. The official site is www.stackage.org. Stackage Update: Stackage is an infrastructure to create stable builds of complete package sets referred to as "snapshots." Stackage provides users with the assurance that their packages will always build, will actually compile, all tests suites pass, and all will work across three GHC versions (7.8, 7.6, and 7.4). Users of a snapshot verified by Stackage can expect all packages to install the first time. Each snapshot is given a unique hash which is a digest of that snapshot’s package set. Snapshots don’t change. Once a hash is provided, it refers only to that snapshot. So if a user writes a project using snapshot aba1b51af, and in two months switches to another machine and builds their project with aba1b51af, it will succeed. For package authors, Stackage gives them the valuable knowledge that their package builds and tests successfully across the current, stable and old GHC versions. Library authors have guarantees that users of Stackage can easily use their library and can do so on a reasonable number of GHCs. Authors are also informed when a newly uploaded package breaks theirs, meaning it’s time to update the package for it to be included in the latest snapshot. Recently Stackage added some additional features including Haddock documentation and cabal.config files. By including Haddock documentation in Stackage all new exclusive snapshots have Haddock links allowing users to view documentation of all packages included in the snapshot. This means users can generally view everything in one place, on one high-availability service. By creating a cabal.config link on snapshot pages, Stackage users don’t have to change their remote-repo field. Stackage Server: Before Stackage Server, use of Stackage was limited to either manually downloading a project and building it all locally, or by using FP Haskell Center. With Stackage Server, users are able to go to the server web site and pick a snapshot. On the build is a simple copy/paste line to use as a Cabal repo, to replace the users existing remote-repo line. When a new package is released and has been properly updated, users can go to the Stackage home page and get the latest snapshot and update their repo. The Stackage server also supports the uploading of custom snapshots, this allows a company, a Linux distribution, an organization, a university, or just as a general hacker who wants to keep all their projects under one package set, to maintain their own custom series of snapshots, and also make it available to other people. Then the burden will be on those users to make sure it builds, rather than the recommended and Stackage maintained snapshots. If you’ve written some code that you’re actively maintaining, don’t hesitate to get it in Stackage. You’ll be widening the potential audience of users for your code by getting your package into Stackage, and you’ll get some helpful feedback from the automated builds so that users can more reliably build your code. #### 6.4.3 Haskell Cloud  Report by: Gideon Sireling Haskell Cloud is an OpenShift cartridge for deploying Haskell on Red Hat’s open source PaaS cloud. It includes the latest version of GHC, cabal-install, Gold linker, and a choice of pre-installed frameworks - a full list can be viewed on the Wiki. Using a Haskell Cloud cartridge, existing Haskell projects can be uploaded, build, and run from the cloud with minimal changes. Ongoing development is focused on OpenShift’s upcoming Docker release. #### Further reading ### 6.5 Others #### 6.5.1 lhs2TeX  Report by: Andres Löh Status: stable, maintained This tool by Ralf Hinze and Andres Löh is a preprocessor that transforms literate Haskell or Agda code into LaTeX documents. The output is highly customizable by means of formatting directives that are interpreted by lhs2TeX. Other directives allow the selective inclusion of program fragments, so that multiple versions of a program and/or document can be produced from a common source. The input is parsed using a liberal parser that can interpret many languages with a Haskell-like syntax. The program is stable and can take on large documents. The current version is 1.18 and has been released in September 2012. Development repository and bug tracker are on GitHub. There are still plans for a rewrite of lhs2TeX with the goal of cleaning up the internals and making the functionality of lhs2TeX available as a library. #### Further reading #### 6.5.2 ghc-heap-view  Report by: Joachim Breitner Participants: Dennis Felsing Status: active development The library ghc-heap-view provides means to inspect the GHC’s heap and analyze the actual layout of Haskell objects in memory. This allows you to investigate memory consumption, sharing and lazy evaluation. This means that the actual layout of Haskell objects in memory can be analyzed. You can investigate sharing as well as lazy evaluation using ghc-heap-view. The package also provides the GHCi command :printHeap, which is similar to the debuggers’ :print command but is able to show more closures and their sharing behaviour: > let x = cycle [True, False] > :printHeap x _bco > head x True > :printHeap x let x1 = True : _thunk x1 [False] in x1 > take 3 x [True,False,True] > :printHeap x let x1 = True : False : x1 in x1 The graphical tool ghc-vis (→6.5.3) builds on ghc-heap-view. Since verison 0.5.3, ghc-heap-view also supports GHC 7.8. #### Further reading #### 6.5.3 ghc-vis  Report by: Dennis Felsing Participants: Joachim Breitner Status: active development The tool ghc-vis visualizes live Haskell data structures in GHCi. Since it does not force the evaluation of the values under inspection it is possible to see Haskell’s lazy evaluation and sharing in action while you interact with the data. Ghc-vis supports two styles: A linear rendering similar to GHCi’s :print, and a graph-based view where closures in memory are nodes and pointers between them are edges. In the following GHCi session a partially evaluated list of fibonacci numbers is visualized: > let f = 0 : 1 : zipWith (+) f (tail f) > f !! 2 > :view f At this point the visualization can be used interactively: To evaluate a thunk, simply click on it and immediately see the effects. You can even evaluate thunks which are normally not reachable by regular Haskell code. Ghc-vis can also be used as a library and in combination with GHCi’s debugger. #### Further reading #### 6.5.4 Hat — the Haskell Tracer  Report by: Olaf Chitil Hat is a source-level tracer for Haskell. Hat gives access to detailed, otherwise invisible information about a computation. Hat helps locating errors in programs. Furthermore, it is useful for understanding how a (correct) program works, especially for teaching and program maintenance. Hat is not a time or space profiler. Hat can be used for programs that terminate normally, that terminate with an error message or that terminate when interrupted by the programmer. Tracing a program with Hat consists of two phases: First the program needs to be run such that it additionally writes a trace to file. To add trace-writing, hat-trans translates all the source modules Module of a Haskell program into tracing versions Hat.Module. These are compiled as normal and when run the program does exactly the same as the original program except for additionally writing a trace to file. Second, after the program has terminated, you view the trace with a tool. Hat comes with several tools for selectively viewing fragments of the trace in different ways: hat-observe for Hood-like observations, hat-trail for exploring a computation backwards, hat-explore for freely stepping through a computation, hat-detect for algorithmic debugging, … Hat is distributed as a package on Hackage that contains all Hat tools and tracing versions of standard libraries. Currently Hat supports Haskell 98 plus some language extensions such as multi-parameter type classes and functional dependencies. For portability all viewing tools have a textual interface; however, many tools use some Unix-specific features and thus run on Unix / Linux / OS X, but not on Windows. Hat was mostly built around 2000–2004 and then disappeared because of lack of maintenance. Now it is back and new developments have started. The source-to-source transformation of hat-trans has been completely rewritten to use the haskell-src-exts parser. Thus small bugs of the old parser disappeared and in the future it will be easier to cover more Haskell language extensions. This work was released on Hackage as Hat 2.8. When a traced program uses any libraries besides the standard Haskell 98 / 2010 ones, these libraries currently have to be transformed (in trusted mode). So the plan for the next release of Hat is to enable Hat to use trusted libraries without having to transform them. Feedback on Hat is welcome. #### Further reading #### 6.5.5 Tasty  Report by: Roman Cheplyaka, Lars Hupel Participants: Eric Seidel, Danny Navarro, Lars Noschinski, Manuel Eberl, and many others Status: actively maintained Tasty is a new testing framework for Haskell that is quickly gaining popularity in the Haskell community. As of October 2014, one year after the initial release, 140 hackage packages use Tasty for their tests. We’ve heard from several companies that use Tasty to test their Haskell software. It is also used for teaching, as Lars Hupel tells us: Technische Universität München uses Tasty to assess homework submitted for the introductory functional programming course, which is compulsory for second-year Bachelor’s students in computer science. Students can upload their source code to a web application, which compiles them and executes tests (mostly QuickCheck). Graphical reports are generated with ’tasty-html’ and presented to the students. Grading happens automatically with a custom test reporter, which – roughly speaking – checks that a minimum number of significant tests have passed. This is a huge improvement over the past years, where tests were run by a homegrown framework which offered only textual output. Tasty however is nicely extensible and allows for easy customization to the instructors’ and students’ needs. ##### 6.5.5.1 What’s new since the last HCAR? • Thanks to a patch from Eric Seidel, Tasty now displays timings for tests that take a while to complete. • Danny Navarro ported tasty-html to Bootstrap 3. • The tasty-hunit package no longer depends on HUnit. It was using a fraction of HUnit’s code anyway, so we decided to include that code in tasty-hunit directly. This change means fewer packages for users to install, and smaller surface for possible breakage. #### Further reading For more information about Tasty and how to use it, please consult the README at http://bit.ly/tasty-home. Tasty has a mailing list http://bit.ly/tasty-ml and an IRC channel (#tasty on FreeNode), where you can get help with Tasty. #### 6.5.6 Automatic type inference from JSON  Report by: Michal J. Gajda Status: beta New rapid software development tool json-autotype interprets JSON data and converts them into Haskell module with data type declarations. json-autotype input.json -o JSONTypes.hs"

The generated declarations use automatically derived Aeson class instances to read and write data directly from/to JSON strings, and facilitate interaction with growing number of large JSON APIs.

Generated parser can be immediately tested on an input data:

$runghc JSONTypes.hs input.json" The software can be installed directly from Hackage. It uses sophisticated union type unification, and robustly interprets most ambiguities using clever typing. The author welcomes comments and suggestions at <mjgajda at gmail.com>. #### Further reading ## 7 Libraries, Applications, Projects ### 7.1 Language Features #### 7.1.1 Conduit  Report by: Michael Snoyman Status: stable While lazy I/O has served the Haskell community well for many purposes in the past, it is not a panacea. The inherent non-determinism with regard to resource management can cause problems in such situations as file serving from a high traffic web server, where the bottleneck is the number of file descriptors available to a process. The left fold enumerator was one of the first approaches to dealing with streaming data without using lazy I/O. While it is certainly a workable solution, it requires a certain inversion of control to be applied to code. Additionally, many people have found the concept daunting. Most importantly for our purposes, certain kinds of operations, such as interleaving data sources and sinks, are prohibitively difficult under that model. The conduit package was designed as an alternate approach to the same problem. The root of our simplification is removing one of the constraints in the enumerator approach. In order to guarantee proper resource finalization, the data source must always maintain the flow of execution in a program. This can lead to confusing code in many cases. In conduit, we separate out guaranteed resource finalization as its own component, namely the ResourceT transformer. Once this transformation is in place, data producers, consumers, and transformers (known as Sources, Sinks, and Conduits, respectively) can each maintain control of their own execution, and pass off control via coroutines. The user need not deal directly with any of this low-level plumbing; a simple monadic interface (inspired greatly by the pipes package) is sufficient for almost all use cases. Since its initial release, conduit has been through many design iterations, all the while keeping to its initial core principles. Since the last HCAR, we’ve released version 1.2. This release introduces two changes: it adds a stream fusion implementation to allow much more optimized runs for some forms of pipelines, and uses the codensity transform to provide better behavior of monadic bind. Additionally, much work has gone into conduit-combinators and streaming-commons, both of which are packages introduced in the last HCAR. There is a rich ecosystem of libraries available to be used with conduit, including cryptography, network communications, serialization, XML processing, and more. The library is available on Hackage. There is an interactive tutorial available on the FP Complete School of Haskell. You can find many conduit-based packages in the Conduit category on Hackage as well. #### Further reading #### 7.1.2 lens  Report by: Edward Kmett Participants: many others Status: very actively developed The lens package provides families of lenses, isomorphisms, folds, traversals, getters and setters. That is to say, it provides a rich, compositional vocabulary for separating “what you want to do” from “what you want to do it to” built upon rigorous foundations. Compared to other libraries that provide lenses, key distinguishing features for lens are that it comes “batteries included” with many useful lenses for the types commonly used from the Haskell Platform, and with tools for automatically generating lenses and isomorphisms for user-supplied data types. Also, included in this package is a variant of Neil Mitchell’s uniplate generic programming library, modified to provide a |Traversal| and with its combinators modified to work with arbitrary traversals. Moreover, you do not need to incur a dependency on the lens package in order to supply (or consume) lenses or most of the other lens-like constructions offered by this package. #### Further reading #### 7.1.3 folds  Report by: Edward Kmett Status: actively developed This package provides a playground full of resumable comonadic folds and folding homomorphisms between them. #### Further reading #### 7.1.4 machines  Report by: Edward Kmett Participants: Anthony Cowley, Shachaf Ben-Kiki, Paul Chiusano, Nathan van Doorn Status: actively developed Ceci n’est pas une pipe This package exists to explore the design space of streaming calculations. Machines are demand-driven input sources like pipes or conduits, but can support multiple inputs. You design a Machine by writing a Plan. You then construct the machine from the plan. Simple machines that take one input are called a Process. More generally you can attach a Process to the output of any type of Machine, yielding a new Machine. More complicated machines provide other ways of connecting to them. Typically the use of machines proceeds by using simple plans into machine Tees and Wyes, capping many of the inputs to those with possibly monadic sources, feeding the rest input (possibly repeatedly) and calling run or runT to get the answers out. There is a lot of flexibility when building a machine in choosing between empowering the machine to run its own monadic effects or delegating that responsibility to a custom driver. #### Further reading #### 7.1.5 exceptions  Report by: Edward Kmett Participants: Gabriel Gonzales, Michael Snoyman, John Weigley, Mark Lentczner, Alp Mestanogullari, Fedor Gogolev, Merijn Verstraaten, Matvey B. Aksenov Status: actively developed This package was begun as an effort to define a standard way to deal with exception handling in monad transformer stacks that could scale to the needs of real applications in terms of handling asynchronous exceptions, could support GHC now that |block| and |unblock| have been removed from the compiler, and which we could reason about the resulting behavior, and still support |mocking| on monad transformer stacks that are not built atop |IO|. #### Further reading #### 7.1.6 tables  Report by: Edward Kmett Participants: Nathan van Doorn, Tim Dixon, Niklas Haas, Dag Odenhall, Petr Pilar, Austin Seipp Status: actively developed The tables package provides a multiply-indexed in-memory data store in the spirit of ixset or data-store, but with a lens-based API. #### Further reading #### 7.1.7 Faking even more dependent types!  Report by: Richard Eisenberg Participants: Jan Stolarek Status: released The singletons package enables users to fake dependent types in Haskell via the technique of singletons. In brief, a singleton type is a type with exactly one value; by knowing the value, you also know the type, and vice versa. See “Dependently typed programming with singletons” (Haskell ’12) for more background. Jan Stolarek and Richard Eisenberg have released a major update to singletons, which will include processing of a much larger subset of Haskell, including |case| and |let| statements, |where| clauses, anonymous functions, and classes. Since the release (of version 1.0), more improvements have been made to the HEAD version, available at http://github.com/goldfirere/singletons. Of particular interest, the library exports a |promote| function that will take ordinary term-level function definitions and promote them to type family definitions. After the update, this will allow users to write term-level code in a familiar style and have that code work on promoted datatypes at the type level. #### Further reading #### 7.1.8 Type checking units-of-measure  Report by: Richard Eisenberg Participants: Takayuki Muranushi Status: released The units package, available on Hackage, allows you to type-check your Haskell code with respect to units of measure. It prevents you from adding, say, meters to seconds while allowing you to add meters to feet and dividing meters by seconds. A |Double| can be converted into a dimensioned quantity only by specifying its units, and a dimensioned quantity can be converted to an ordinary |Double| only by specifying the desired units of the output. The set of units is fully extensible. The package, in fact, exports units only for dimensionless quantities. Instead, the companion units-defs package contains definitions for SI dimensions and units, as well as the US customary units. Because of units’s extensibility, the package is suitable for use outside of physics applications, such as finance or keeping your apples apart from your bananas. The magic under the hood uses lots of type families and no functional dependencies. One upshot of this design is that user code can generally be free of constraints on types. Here is some sample code: kinetic_energy :: Mass -> Velocity -> Energy kinetic_energy m v = redim$ 0.5 *| m |*| v |*| v
g_earth :: Acceleration
(deriveLenses ''Address) The next thing to do is to specify a default record containing the default values: defaults = Name "Doaitse" Haskell [] (Address "Utrecht" "Princetonplein") Next we define the parser for the options, by specifying each option: oName = name option ( "name", pString, "Name") <> ints options ( "ints", pNaturalRaw, "Some numbers") <> prefers choose [( "agda", Agda, "Agda preferred") ,( "haskell", Haskell, "Haskell preferred") ] <> address field ( city option ( "city", pString, "Home city") <> street option ( "street" ,pString, "Home Street" ) ) Finally when running this parser by the command |run (( defaults) <> mkP oName)| on the string |("–int=7 –city=Tynaarlo -i 5 –agda -i3 "++"-street=Zandlust")| the result is Name { name_ = Doaitse , prefers_ = Agda , ints_ = [7,5,3] , address_ = Address { city_ = Tynaarlo , street_ = Zandlust} } If you make a mistake in the list of options, automatic error reporting and correction steps in and you get the following message: ./OptionsDemo --street=Zandlust -nDoaitse -i3 --city=Tynaarlo --name [Char] optional Name --ints Int recurring Some numbers Choose at least one from( --agda required Agda preferred --haskell required Haskell preferred ) --city [Char] optional Home city --street [Char] optional Home Street -- -- Correcting steps: -- Inserted "-a" at position 70 -- expecting one of [ "--agda", "--agda=", "--haskell", "--haskell=", "--ints=", "--ints", "-i", "-h", "-a"] -- Inserted EOT at position 70 -- expecting EOT #### Features • Combinators for easily describing parsers which produce their results online, do not hang on to the input and provide excellent error messages. As such they are “surprise free” when used by people not fully aware of their internal workings. • Parsers “correct” the input such that parsing can proceed when an erroneous input is encountered. • The library basically provides the to be preferred applicative interface and a monadic interface where this is really needed (which is hardly ever). • No need for try-like constructs which make writing Parsec based parsers tricky. • Scanners can be switched dynamically, so several different languages can occur intertwined in a single input file. • Parsers can be run in an interleaved way, thus generalizing the merging and permuting parsers into a single applicative interface. This makes it e.g. possible to deal with white space or comments in the input in a completely separate way, without having to think about this in the parser for the language at hand (provided of course that white space is not syntactically relevant). #### Future plans Future versions will contain a check for grammars being not left-recursive, thus taking away the only remaining source of surprises when using parser combinator libraries. This makes the library even greater for use in teaching environments. Future versions of the library, using even more abstract interpretation, will make use of computed look-ahead information to speed up the parsing process further. #### Contact If you are interested in using the current version of the library in order to provide feedback on the provided interface, contact <doaitse at swierstra.net>. There is a low volume, moderated mailing list which was moved to <parsing at lists.science.uu.nl> (see also http://www.cs.uu.nl/wiki/bin/view/HUT/ParserCombinators). #### 7.3.3 Grammar Products, Set Grammars, and Automatic Outside Grammars  Report by: Christian Höner zu Siederdissen Status: usable, active development #### Grammars Products We have developed a theory of algebraic operations over linear and context-free grammars. This theory allows us to combine simple “atomic” grammars to create more complex ones. With the compiler that accompanies our theory, we make it easy to experiment with grammars and their products. Atomic grammars are user-defined and the algebraic operations on the atomic grammars are embedded in a rigerous mathematical framework. Our immediate applications are problems in computational biology and linguistics. In these domains, algorithms that combine structural features on individual inputs (or tapes) with an alignment or structure between tapes are becoming more commonplace. Our theory will simplify building grammar-based applications by dealing with the intrinsic complexity of these algorithms. We provide multiple types of output. LaTeX is available to those users who prefer to manually write the resulting grammars. Alternatively, Haskell modules can be created. TemplateHaskell and QuasiQuoting machinery is also available turning this framework into a fully usable embedded domain-specific language. The DSL or Haskell module use ADPfusion (→7.11.1) with multitape extensions, delivering “close-to-C” performance. #### Set Grammars Most dynamic programming frameworks we are aware of deal with problems over sequence data. There are, however, many dynamic programming solutions to problems that are inherently non-sequence like. Hamiltonian path problems, finding optimal paths through a graph while visiting each node, are a well-studied example. We have extended our formal grammar library to deal with problems that can not be encoded via linear data types. This provides the user of our framework with two benifits. She can now easily encode problems based on set-like inputs and obtain dynamic programming solutions. On a more general level, the extension of ADPfusion and the formal grammars library shows how to encode new classes of problems that are now gaining traction and are being studied. #### Automatic Outside Grammars Our third contribution to high-level and efficient dynamic programming is the ability to automatically construct Outside algorithms given an Inside algorithm. The combination of an Inside algorithm and its corresponding Outside algorithm allow the developer to answer refined questions for the ensemble of all (suboptimal) solutions. The image below depicts one such automatically created grammar that parses a string from the Outside in. T and C are non-terminal symbols of the Outside grammar; the production rules also make use of the S and B non-terminals of the Inside version. One can, for example, not only ask for the most efficient path through all cities on a map, but also answer which path between two cities is the most frequented one, given all possible travel routes. In networks, this allows one to determine paths that are chosen with high likelihood. #### Further reading #### 7.3.4 HERMIT  Report by: Andy Gill Participants: Andrew Farmer, Ed Komp, Neil Sculthorpe, Adam Howell, Ryan Scott Status: active The Haskell Equational Reasoning Model-to-Implementation Tunnel (HERMIT) is an NSF-funded project being run at KU (→9.8), which aims to improve the applicability of Haskell-hosted Semi-Formal Models to High Assurance Development. Specifically, HERMIT uses a Haskell-hosted DSL and a new refinement user interface to perform rewrites directly on Haskell Core, the GHC internal representation. This project is a substantial case study of the application of Worker/Wrapper. In particular, we want to demonstrate the equivalences between efficient Haskell programs, and their clear specification-style Haskell counterparts. In doing so there are several open problems, including refinement scripting and managing scaling issues, data representation and presentation challenges, and understanding the theoretical boundaries of the worker/wrapper transformation. We have reworked KURE (http://www.haskell.org/communities/11-2008/html/report.html#sect5.5.7), a Haskell-hosted DSL for strategic programming, as the basis of our rewrite capabilities, and constructed the rewrite kernel making use of the GHC Plugins architecture. A journal writeup of the KURE internals has been submitted to JFP, and is available on the group webpage. As for interfaces to the kernel, we currently have a command-line REPL, and an Android version is under development. We have used HERMIT to successfully mechanize many smaller examples of program transformations, drawn from the literature on techniques such as concatenate vanishes, tupling transformation, and worker/wrapper. We are scaling up our capabilities, and working on larger examples, including the mechanization of improvements to the classical game of life. We also submitted a paper to the Haskell Symposium 2014 with a description of our support for equational reasoning in HERMIT, including a mechanization of Bird’s “Making a Century”. HERMIT is also being used in three projects. • Michael Adams used HERMIT to mechanize the optimization of scrap your boilerplate generics, leading to execution speeds that were as fast as hand-optimized code (→7.4.1). The result was published in PEPM, where it was awarded a best paper award. • Andrew Farmer has used HERMIT to implement a custom GHC optimization pass which enables fusion of nested streams within the Stream Fusion framework. This work was also published in PEPM. • Finally, Conal Elliott is working on typed reification of Core using HERMIT. #### Further reading #### 7.3.5 parsers  Report by: Edward Kmett Participants: Nathan Filardo, Dag Odenall, Mario Blazevic, Tony Morris, Tim Dixon, Greg Fitzgerald Status: actively developed This package provides a common lingua franca for working with parsec-like parsing combinator libraries, such that the combinators support being lifted over monad transformers. Instances are provided for use with the parsec Parser and base’s ReadP, and it is used by trifecta (→7.3.6) to provide its suite of parsing combinators. Notably, many of the combinators have been modified to only require the use of Alternative rather than MonadPlus, enabling some base Parser instances to operate more efficiently. #### Further reading #### 7.3.6 trifecta  Report by: Edward Kmett Participants: Austin Seipp, Nathan Filardo, John Weigley Status: actively developed This package is designed to explore the space of “human scale” parsers for programming languages. That is to say, it isn’t optimized for parsing protocols or other huge streaming datasets, but rather to provide nice error messages for files that are usually written by hand by human beings. Trifecta supports clang-style colored diagnostics with markup denoting locations, spans and fixits for user code. It builds on top of the parsers (→7.3.5) framework for most of its parsing combinators. Much of the focus of trifecta is on supporting functionality beyond basic parsing, such as syntax highlighting, that arise once you have a programming language. In the long term, we plan to support built-in CPP, auto-completion and parser transformers to support Haskell-style layout. #### Further reading ### 7.4 Generic and Type-Level Programming #### 7.4.1 Optimising Generic Functions  Report by: José Pedro Magalhães Participants: Michael D. Adams, Andrew Farmer Status: actively developed Datatype-generic programming increases program reliability by reducing code duplication and enhancing reusability and modularity. However, it is known that datatype-generic programs often run slower than type-specific variants, and this factor can prevent adoption of generic programming altogether. There can be multiple reasons for the performance penalty, but often it is caused by conversions to and from representation types that do not get eliminated during compilation. Fortunately, it is also known that generic functions can be specialised to concrete datatypes, removing any overhead from the use of generic programming. We have investigated compilation techniques to specialise generic functions and remove the performance overhead of generic programs in Haskell. We used a representative generic programming library and inspected the generated code for a number of example generic functions. After understanding the necessary compiler optimisations for producing efficient generic code, we benchmarked the runtime of our generic functions against handwritten variants, and concluded that all the overhead can indeed be removed automatically by the compiler. More details can be found in the IFL’12 paper linked below. We have also investigated how to optimise the popular Scrap Your Boilerplate (SYB) generic programming library. Using a HERMIT (→7.3.4) script for implementing an optimisation pass in the compiler, we have removed all runtime overhead from SYB functions. More details can be found in the draft paper linked below. #### Further reading #### 7.4.2 constraints  Report by: Edward Kmett Participants: Sjoerd Visscher, Austin Seipp Status: actively developed This package provides data types and classes for manipulating values of kind |Constraint| as exposed by GHC since 7.4. #### Further reading ### 7.5 Mathematics #### 7.5.1 Rlang-QQ  Report by: Adam Vogt Status: active development Rlang-QQ is intended to make it easier to call R from Haskell programs. This allows access to a large number of R packages for graphing, statistics or other uses. Rlang-QQ provides a quasiquoter which runs the R interpreter and tries to translate values between the two languages. Haskell expressions can be referenced from R using syntax like(take 10 [1.0 .. ]). Haskell variables can also be passed in by prefixing them with hs_: hs_x refers to x. Values that can be taken out of a Haskell x :: Chan t are accessible using ch_x. When the R code has an assignment such as hs_x <- f(), the quasiquote evaluates to an HList record which contains the result from f().

Future work may include supporting the serialization of more data types between the two languages, passing data between the two runtimes in-memory instead of through files, and doing inference when possible on the R-code to restrict the types of the Haskell values that are serialized or deserialized.

#### 7.5.2  order-statistics

 Report by: Edward Kmett Status: stable

This package extends Bryan O’Sullivan’s statistics package with support for order statistics and L-estimators.

An order statistic is simply a position in the sorted list of samples given just the size of the sample. L-estimators are linear combinations of order-statistics.

L-estimators are used in robust statistics to collect statistics that are robust in the presence of outliers, and have the benefit that you can jackknife them without changing their asymptotics.

This package provides a compositional vocabulary for describing order statistics.

#### 7.5.3  Eliminating Redundancies in Linear Systems

 Report by: Philipp Kant Status: active

A recurring task in perturbative quantum field theory is the exact solution of very large systems of linear equations, where the coefficients are multivariate polynomials. The systems can contain hundreds of thousands of equations, where many of those equations are linearly dependent. In complicated cases, solving the system requires several months of CPU time.

ICE is a small Haskell program that detects which equations in a given set are linearly independent, so that the rest can be safely discarded before an attempt to solve the system. Thus, the time that would be spent processing redundant information can be saved.

The algorithm works by mapping the whole system homomorphically from the ring of multivariate polynomials to a finite field Fp, where computations are cheap and the system can be solved fast using standard Gaussian elimination. By keeping track of the required row permutations, the linearly independent equations are identified.

Future plans include to use multiple images in Fp to solve the original system via rational function reconstruction. This would avoid the intermediate expression swell that is encountered when a linear system over multivariate polynomials is solved directly.

#### 7.5.4  linear

 Report by: Edward Kmett Participants: Anthony Cowley, Ben Gamari, Jake McArthur, John Weigley, Elliott Hird, Eric Mertens, Niklas Haas, Casey McCann Status: actively developed

This package provides ‘low-dimensional’ linear algebra primitives that are based explicitly on the notion that all vector spaces are free vector spaces, and so are isomorphic to functions from some basis to an underlying field. This lets us use representable functors, which are represented by such a basis to encode all of our linear algebra operations, and provides a natural encoding for dense vector spaces.

A nice |lens|-based API is provided that permits punning of basis vector names between different vector types.

#### 7.5.5  algebra

 Report by: Edward Kmett Status: experimental

This package provides a large cross section of constructive abstract algebra.

Notable theoretical niceties include the fact that covectors form a Monad, linear maps form an Arrow, and this package bundles a rather novel notion of geometric coalgebra alongside the more traditional algebras and coalgebras.

#### 7.5.6  semigroups and semigroupoids

 Report by: Edward Kmett Participants: Nathan van Doorn, Mark Wright, Adam Curtis Status: stable

The semigroups package provides a standard location to obtain the notion of |Semigroup|.

The semigroupoids package provides the notion of a |Semigroupoid|, which is a |Category| that does not necessarily provide |id|. These arise in practice for many reasons in Haskell.

Notably, we cannot express a product category with the existing implementation of |Data Kinds|.

But more simply, there are many types for which their Kleisli category or Cokleisli category lacks identity arrows, because they lack |return| or |extract|, but could otherwise pass muster.

With semigroupoids 4.0, this package has now come to subsume the previous groupoids and semigroupoid-extras packages.

#### 7.5.7  Arithmetics packages (Edward Kmett)

 Report by: Edward Kmett Participants: Sjoerd Visscher, Austin Seipp, Daniel Bergey, Chris Schneider, Ben Gamari Status: actively developed

• The compensated package provides compensated arithmetic for when you need greater precision than the native floating point representation can provide. A |Compensated Double| has over 100 bits worth of effective significand. Unlike other “double double” variants in other languages, this construction can be iterated. A |Compensated (Compensated Double)| gives over 200 bits worth of precision.

However, not all |RealFloat| operations have yet been upgraded to work in full precision.

• The approximate package (with Sjoerd Visscher and Austin Seipp) provides a notion of approximate result values and intervals with log-domain lower bounds on confidence. It also provides fast piecewise-rational, but monotone increasing approximate versions of log and exp that execute many times faster than the native machine instructions that are suitable for use in machine learning.

• The intervals package (with Daniel Bergey and Chris Schneider) provides basic interval arithmetic. An |Interval| is a closed, convex set of floating point values.

We do not control the rounding mode of the end points of the interval when using floating point arithmetic, so be aware that in order to get precise containment of the result, you will need to use an underlying type with both lower and upper bounds like |CReal|.

• The log-domain package (with Ben Gamari) provides log domain floats, doubles and complex numbers with an emphasis on supporting probabilities biased towards conservative lower bounds.

 Report by: Edward Kmett Participants: Alex Lang, Takayuki Muranushi, Chad Scherrer, Lennart Augustsson, Ben Gamari, Christopher White Status: actively developed

This package provides an intuitive API for Automatic Differentiation (AD) in Haskell. Automatic differentiation provides a means to calculate the derivatives of a function while evaluating it. Unlike numerical methods based on running the program with multiple inputs or symbolic approaches, automatic differentiation typically only decreases performance by a small multiplier.

AD employs the fact that any program |y = F(x)| that computes one or more values does so by composing multiple primitive operations. If the (partial) derivatives of each of those operations is known, then they can be composed to derive the answer for the derivative of the entire program at a point.

This library contains at its core a single implementation that describes how to compute the partial derivatives of a wide array of primitive operations. It then exposes an API that enables a user to safely combine them using standard higher-order functions, just as you would with any other Haskell numerical type.

There are several ways to compose these individual Jacobian matrices. We hide the choice used by the API behind an explicit “Mode” type-class and universal quantification. This prevents the end user from exploiting the properties of an individual mode, and thereby potentially violating invariants or confusing infinitesimals.

We are actively seeking ways to better support unboxed vectors, new modes, new primitives, and better-optimized forms for gradient descent.

Features:

• Provides many variants on forward- and reverse- mode AD combinators with a common API.
• Type-level “branding” is used to both prevent the end user from confusing infinitesimals and to limit unsafe access to the implementation details of each mode.
• Each mode has a separate module full of combinators, with a consistent look and feel.

#### 7.5.9  integration

 Report by: Edward Kmett Participants: Adrian Keet Status: actively developed

This package provides robust numeric integration via tanh-sinh quadrature. “Tanh-Sinh quadrature scheme is the fastest known high-precision quadrature scheme, especially when the time for computing abscissas and weights is considered. It has been successfully employed for quadrature calculations of up to 20,000-digit precision. It works well for functions with blow-up singularities or infinite derivatives at endpoints.”

#### 7.5.10  categories

 Report by: Edward Kmett Participants: Gwern Branwen Status: stable

This package provides a number of classes for working with Category instances with more structure in Haskell. In many ways this package can be viewed as an alternative to working with Arrows, as working with a CCC can provide you with much more fuel for optimization.

#### 7.5.11  contravariant

 Report by: Edward Kmett Participants: Dag Odenhall, Merijn Verstraaten Status: stable

This package provides the notion of a contravariant functor, along with various forms of composition for contravariant functors and Day convolution.

#### 7.5.12  bifunctors

 Report by: Edward Kmett Status: stable

This package provides a standard location to retrieve the notion of a Bifunctor, Bifoldable or Bitraversable data type.

#### 7.5.13  profunctors

 Report by: Edward Kmett Participants: Shachaf Ben-Kiki, Elliott Hird Status: stable

This package provides profunctors, which act like an |Arrow| you don’t necessarily know how to put together.

These form the bedrock upon which |lens| (→7.1.2) is built.

With profunctors 4.0 we’ve merged together the contents of the older profunctors, profunctor-extras and representable-profunctors packages.

In addition to the basic notion of a profunctor, we also provide the category of collages for a profunctor, notions of representable and corepresentable profunctors, along with weaker notions of |Strong| and |Choice| that correspond to various |Arrow| classes, profunctor composition.

 Report by: Edward Kmett Participants: Dave Menendez, Gabor Greif, David Luposchainsky, Sjoerd Visscher, Luke Palmer, Nathan van Doorn Status: stable

You can work with this package using Dominic Orchard’s codo-notation, or use them directly.

The kan-extensions (→7.5.16) package also provides a transformer that can turn a comonad into a monad.

#### 7.5.15  recursion-schemes

 Report by: Edward Kmett Status: stable

This package provides generalized bananas, lenses and barbed wire based on the recursion schemes that came out of the constructive algorithmics community over the years.

In addition to the standard recursion schemes, all of their distributive laws can be made compositional, enabling the creation of such interesting and impractical beasts as the zygohistomorphic prepromorphism.

#### 7.5.16  kan-extensions

 Report by: Edward Kmett Status: stable

This package provides Kan extensions, Kan lifts, various forms of the Yoneda lemma, and (co)density (co)monads.

These constructions have proven useful for many purposes:

• Codensity can be used to accelerate the performance of code written for free monads or to correct the assocativity of an “almost-monad” that fails the associativity law, as it performs a sort of fusion on |(>>=)| operations.
• |CoT| can be used to turn any |Comonad| into a |Monad| transformer.
• Various forms of the Yoneda lemma give rise to ways to enforce “Functor fusion”.

#### 7.5.17  arb-fft

 Report by: Ian Ross Status: actively developed

This package started as an experiment to see how close a pure Haskell FFT implementation could get to FFTW (“the Fastest Fourier Transform in the West”). The result is a library that can do fast Fourier transforms for arbitrarily sized vectors with performance within a factor of about five of FFTW.

Future plans mostly revolve around making things go faster! In particular, the next thing to do is to write an equivalent of FFTW’s genfft, a metaprogramming tool to generate fast straight-line code for transforms of specialised sizes. Other planned work includes implementing real-to-complex and real-to-real transforms, multi-dimensional transforms, and some low-level optimisation.

#### 7.5.18  hblas

 Report by: Carter Tazio Schonwald Participants: Stephen Diehl and Csernik Flaviu Andrei Status: Actively Developed

hblas is high level, easy to extend BLAS/LAPACK FFI Binding for Haskell.

hblas has several attributes that in aggregate distinguish it from alternative BLAS/LAPACK bindings for Haskell.

1. Zero configuration install
2. FFI wrappers are written in Haskell
3. Provides the fully generality of each supported BLAS/LAPACK routine, in a type safe wrapper that still follows the naming conventions of BLAS and LAPACK.
4. Designed to be easy to extend with further bindings to BLAS/LAPACK routines (because there are many many specialized routines!)
5. Adaptively choses between unsafe vs safe foreign calls based upon estimated runtime of a computation, to ensure that long running hblas ffi calls interact safely with the GHC runtime and the rest of an application.
6. hblas is not an end user library, but is designed to easily interop with any array library that supports storable vectors.

#### 7.5.19  HROOT

 Report by: Ian-Woo Kim Status: Actively Developing

HROOT is a haskell binding to ROOT framework by fficxx, a haskell-C++ binding generator tool. ROOT (http://root.cern.ch) is an OOP framework for data analysis and statistics, which is developed at CERN. The ROOT system provides a set of OO frameworks with all the functionality needed to handle and analyze large amounts of data in a very efficient way. ROOT is a de facto standard physics analysis tool in high energy physics experiments.

This haskell binding to ROOT provides an industrial-strength statistical analysis libraries to the haskell community. The haskell code for using HROOT is very straightforward to both haskell and C++ programmers thanks to the fficxx binding generator tool. The following is a sample code and a resultant histogram for histogramming a 2D gaussian distribution:

import Data.Random.Distribution.Normal
import HROOT
main :: IO ()
main = do
tcanvas <- newTCanvas "Test" "Test" 640 480
h2 <- newTH2F "test" "test"
100 (-5.0) 5.0 100 (-5.0) 5.0
let dist1 = Normal (0 :: Double)
(2 :: Double)
let go n | n < 0 = return ()
| otherwise = do
histfill dist1 dist2 h2
go (n-1)
go 1000000
draw h2 "lego"
saveAs tcanvas "random2d.pdf" ""
histfill :: Normal Double -> TH2F -> IO ()
histfill dist1 hist = do
x <- sample dist1
y <- sample dist1
fill2 hist x y
return ()

Until ghc 7.6, HROOT cannot be used in interpreter mode of ghc, due to the linker problem. Now with ghc 7.8, ghci now uses the standard system linker for dynamically loaded library. Thus, our current focus is to have full ghc interpreter support for making HROOT a really useful analysis framework. In addition, we keep importing features from ROOT to available haskell functions.

#### 7.5.20  Numerical

 Report by: Carter Tazio Schonwald Status: actively developed

The Numerical project, starting with the numerical package, has the goal of providing a general purpose numerical computing substrate for Haskell.

To start with, the numerical provides an extensible set of type classes suitable for both dense and sparse multi dimensional arrays, high level combinators for writing good locality code, and some basic matrix computation routines that work on both dense and sparse matrix formats.

The core Numerical packages, including numerical, are now in public pre-alpha as of mid May 2014, with on going active work as of November 2014.

Development of the numerical packages is public on github, and as they stabilize, alpha releases are being made available on hackage.

### 7.6  Data Types and Data Structures

#### 7.6.1  HList — A Library for Typed Heterogeneous Collections

 Report by: Adam Vogt Participants: Oleg Kiselyov, Ralf Lämmel, Keean Schupke

HList is a comprehensive, general purpose Haskell library for typed heterogeneous collections including extensible polymorphic records and variants. HList is analogous to the standard list library, providing a host of various construction, look-up, filtering, and iteration primitives. In contrast to the regular lists, elements of heterogeneous lists do not have to have the same type. HList lets the user formulate statically checkable constraints: for example, no two elements of a collection may have the same type (so the elements can be unambiguously indexed by their type).

An immediate application of HLists is the implementation of open, extensible records with first-class, reusable, and compile-time only labels. The dual application is extensible polymorphic variants (open unions). HList contains several implementations of open records, including records as sequences of field values, where the type of each field is annotated with its phantom label. We and others have also used HList for type-safe database access in Haskell. HList-based Records form the basis of OOHaskell. The HList library relies on common extensions of Haskell 2010. HList is being used in AspectAG (http://www.haskell.org/communities/11-2011/html/report.html#sect5.4.2), typed EDSL of attribute grammars, and in Rlang-QQ.

The October 2012 version of HList library marks the significant re-write to take advantage of the fancier types offered by GHC 7.4 and 7.6. HList now relies on promoted data types and on kind polymorphism.

Since the last update, there have been several minor releases. These include features such as support for ghc-7.8 as well as additional syntax for the pun quasiquote.

#### 7.6.2  Persistent

 Report by: Greg Weber Participants: Michael Snoyman, Felipe Lessa Status: stable

Persistent is a type-safe data store interface for Haskell. After years of stability, Persistent just recently had a 2.0 release.

Persistent 2.0 features

• a flexible, yet more type-safe Key type

Haskell has many different database bindings available, but most provide few usefeul static guarantees. Persistent uses knowledge of the data schema to provide a type-safe interface to the database. Persistent is designed to work across different databases, currently working on Sqlite, PostgreSQL, MongoDB, MySQL, Redis, and ZooKeeper.

Persistent provides a high-level query interface that works against all backends.

selectList [ PersonFirstName ==. "Simon",
PersonLastName ==. "Jones"] []

The result of this will be a list of Haskell records.

Persistent can also be used to write type-safe query libraries that are specific. esqueleto is a library for writing arbitrary SQL queries that is built on Persistent.

#### Future plans

Possible future directions for Persistent:

• Declaring a schema separately from a record, possibly leveraging GHC’s new annotations feature

Persistent users may also be interested in Groundhog (→7.6.3), a similar project.

Persistent is recommended to Yesod (→5.2.5) users. However, there is nothing particular to Yesod or even web development about it. You can have a type-safe, productive way to store data for any kind of Haskell project.

#### 7.6.3  Groundhog

 Report by: Boris Lykah Status: stable

Groundhog is a library for mapping user defined datatypes to the database and manipulating them in a high-level typesafe manner. It is easy to plug Groundhog into an existing project since it does not need modifying a datatype or providing detailed settings. The schema can be configured flexibly which facilitates integration with existing databases. It supports composite keys, indexes, references across several schemas. Just one line is enough to analyze the type and map it to the table. The migration mechanism can automatically check, initialize, and migrate database schema. Groundhog has backends for Sqlite, PostgreSQL, and MySQL.

Unlike Persistent (→7.6.2) it maps the datatypes instead of creating new ones. The types can be polymorphic and contain multiple constructors. It allows creating sophisticated queries which might include arithmetic expressions, functions, and operators. The database-specific operators, for example, array-related in PostgreSQL are statically guaranteed to run only for PostgreSQL connection. Its support for the natural and composite keys is implemented using generic embedded datatype mechanism.

Groundhog has got several commercial users which have positive feedback. Most of the recent changes were done to meet their needs. The new features include PostgreSQL geometric operators, Fractional, Floating, and Integral instances for lifted expressions, logging queries, references to tables not mapped to Haskell datatype, default column values, and several utility functions.

#### 7.6.4  reflection

 Report by: Edward Kmett Participants: Elliott Hird, Oliver Charles, Carter Schonwald Status: stable

This package provides a mechanism to dynamically construct a type from a term that you can reflect back down to a term based on the ideas from “Functional Pearl: Implicit Configurations” by Oleg Kiselyov and Chung-Chieh Shan. However, the API has been implemented in a much more efficient manner.

This is useful when you need to make a typeclass instance that depends on a particular value in scope, such as a modulus or a graph.

#### 7.6.5  tag-bits

 Report by: Edward Kmett Status: stable

This package provides access to the dynamic pointer tagging bits used by GHC, and can peek into infotables to determine (unsafely) whether or not a thunk has already been evaluated.

#### 7.6.6  hyperloglog

 Report by: Edward Kmett Participants: Ozgun Ataman Status: actively developed

This package provides an approximate streaming (constant space) unique object counter.

Notably it can be used to approximate a set of several billion elements with 1-2%inaccuracy in around 1.5k of memory.

#### 7.6.7  concurrent-supply

 Report by: Edward Kmett Participants: Andrew Cowie, Christiaan Baaij Status: stable

This package provides a fast supply of concurrent unique identifiers suitable for use within a single process. This benefits from greatly reduced locking overhead compared to |Data.Unique| as it only contents for the common pool every thousand or so identifiers.

One often has a desire to generate a bunch of integer identifiers within a single process that are unique within that process. You could use UUIDs, but they can be expensive to generate; you don’t want to have your threads contending for a single external counter if the identifier is not going to be used outside the process.

concurrent-supply builds a rose-tree-like structure which can be split; you can make smaller unique supplies and then you allocate from your supplies locally. Internally it pulls from a unique supply one block at a time as you walk into parts of the tree that haven’t been explored. This ensures that computations are always replayable within a process, and that the result appears purely functional to an outside observer.

#### 7.6.8  hybrid-vectors

 Report by: Edward Kmett Status: actively developed

This package provides various ways in which you can mix the different types of Vector from Roman Leschinskiy’s vector package to work with partially unboxed structures.

#### 7.6.9  lca

 Report by: Edward Kmett Participants: Daniel Peebles, Andy Sonnenburg Status: actively developed

This package improves the previous known complexity bound of online lowest common ancestor search from O(h) to O(logh) persistently, and without preprocessing by using skew-binary random-access lists to store the paths.

#### 7.6.10  heaps

 Report by: Edward Kmett Status: actively developed

This package provides asymptotically optimal purely functional Brodal-Okasaki heaps with a “Haskelly” API.

#### 7.6.11  sparse

 Report by: Edward Kmett Participants: Carter Schonwald Status: actively developed

This package provides sparse implicitly Morton-ordered matrices based on the series ‘revisiting matrix multiplication’ on the School of Haskell. It is efficient for sufficiently sparse matrices.

#### 7.6.12  compressed

 Report by: Edward Kmett Status: stable

This package provides an LZ78-compressed stream as a data type in Haskell. Compression isn’t used directly for data compression, but rather to allow for the reuse of intermediate monoidal results when folding over the data set. LZ78 is rather distinctive among LZ-variants in that it doesn’t require exhaustively enumerating the token set or searching a window. By using conservative approximations of what possible values the stream may take, it is also possible to work with this LZ78 stream as an |Applicative| or |Monad| without sacrificing too much compression on the resulting unfolding.

A similar structure is provided for decompressing run-length encoded data efficiently by peasant exponentiation.

#### 7.6.13  charset

 Report by: Edward Kmett Status: stable

This package provides fast unicode character sets based on complemented PATRICIA tries along with common charsets for variations on the posix standard and standard unicode blocks. This encoding has the benefit that a |CharSet| and its complement take the same amount of space. This package is used as a building block by parsers (→7.3.5) and trifecta (→7.3.6).

#### 7.6.14  Convenience types (Edward Kmett)

 Report by: Edward Kmett Participants: several others Status: stable

• The either package provides an |EitherT| monad transformer, that unlike |ErrorT| does not carry the unnecessary class constraint. Removing this limitation is necessary for many operations.

|EitherT| is also used extensively by Gabriel Gonzales’ |errors| package.

With either 4.0, we consolidated many of the existing combinators from Chris Done’s eithers package and Gregory Crosswhite’s either-unwrap package, both of which are now deprecated.

• The tagged package provides a simple |Tagged| newtype that carries an extra phantom type parameter, and a |Proxy| data type that has since been merged into base with GHC 7.8.

These are useful as safer ways to plumb type arguments than by passing undefined values around.

• Th void package provides a single “uninhabited” data type in a canonical location along with all of the appropriate instances.

The need for such a data type arises in shockingly many situations as it serves as an initial object for the category of Haskell data types.

### 7.7  User Interfaces

#### 7.7.1  HsQML

 Report by: Robin KAY Status: active development

HsQML provides access to a modern graphical user interface toolkit by way of a binding to the cross-platform Qt Quick framework.

The library focuses on mechanisms for marshalling data between Haskell and Qt’s domain-specific QML language. The intention is that QML, which incorporates both a declarative syntax and JavaScript code, can be used to design and animate the front-end of an application while being able to easily interface with Haskell code for functionality.

Status The latest version at time of press is 0.3.0.0. This is the first release to support Qt 5.x (and Qt Quick 2). Other significant new features in this release include the ability to marshall list types and to signal property changes from Haskell. It has been tested on the major desktop platforms: Linux, Windows, and MacOS.

#### 7.7.2  LGtk: Lens GUI Toolkit

 Report by: Péter Divianszky Participants: Csaba Hruska Status: experimental, actively developed

LGtk is a GUI Toolkit with the following goals:

• Provide a Haskell EDSL for declarative description of interactive graphical applications
• Provide an API for custom widget design
• Provide a playground for high-level declarative features like derived state-save and undo-redo operations and type-driven GUI generation

There is a demo application which presents the current features of LGtk.

Changes in lgtk-0.8 since the last official announcement:

• New features
• New GLFW backend. One consequence is that the dependency on Gtk is not strict any more.
• Canvas widgets rendering diagrams composed with the diagrams library. Mouse and keyboard events are also supported.
• Widget toolkit generated with the diagrams library.
• Slider widgets
• Architectural changes
• Updated demo application
• Switch from data-lens to Edward Kmett’s lens library
• Upgrade to work with GHC 8.2
• Repository moved to GitHub
• Inner changes
• Generalized and cleaned up interface of references
• Cleaned up widget interface
• More efficient reference implementation

#### 7.7.3  Gtk2Hs

 Report by: Daniel Wagner Participants: Hamish Mackenzie, Axel Simon, Duncan Coutts, Andy Stewart, and many others Status: beta, actively developed

Gtk2Hs is a set of Haskell bindings to many of the libraries included in the Gtk+/Gnome platform. Gtk+ is an extensive and mature multi-platform toolkit for creating graphical user interfaces.

GUIs written using Gtk2Hs use themes to resemble the native look on Windows. Gtk is the toolkit used by Gnome, one of the two major GUI toolkits on Linux. On Mac OS programs written using Gtk2Hs are run by Apple’s X11 server but may also be linked against a native Aqua implementation of Gtk.

Gtk2Hs features:

• Automatic memory management (unlike some other C/C++ GUI libraries, Gtk+ provides proper support for garbage-collected languages)
• Unicode support
• High quality vector graphics using Cairo
• Extensive reference documentation
• An implementation of the “Haskell School of Expression” graphics API
• Bindings to many other libraries that build on Gtk: gio, GConf, GtkSourceView 2.0, glade, gstreamer, vte, webkit

Recent efforts include increasing the coverage of the gtk3 bindings, as well as myriad miscellaneous bugfixes. Thanks to all who contributed!

 Report by: Sylvain Henry Status: Experimental

The Enlightenment Foundation Libraries (EFL) [1] provide a stateful canvas with many rendering backends (X11, Windows, OpenGL, framebuffer, …) as well as a unified interface to low-level OS dependent functionalities: user input (keyboard, mouse, multi-point, unicode texts with several input methods, …), formatted text rendering, threads, timers, etc. Haskell-EFL is a binding to these C libraries whose aim is to provide a solid foundation to develop native Haskell widget toolkits.

In its current state, the binding is close to be complete for the modules we are interested in (namely Ecore and Evas). However it still needs some polishing and testing. Source code is currently available on [2] and will be made available on Hackage as soon as it is considered complete and stable enough.

In the short term, we plan to release a stable version on Hackage. In the medium term, we would like to develop a native replacement for the Edje library, that is an EDSL to create UI elements with themes, animations, data-binding (FRP), etc. Finally, the long term and more demanding goal is to develop a comprehensive set of reusable UI components.

 Report by: Henk-Jan van Tuyl Status: active development

The wxHaskell development has not been mentioned in the HCAR for years, but the last few years, a new branch is developed for wxWidgets 3.0. New functionality has been added and development is going on for a simpler installation procedure. New project participants are welcome.

wxHaskell is a portable and native GUI library for Haskell. The goal of the project is to provide an industrial strength GUI library for Haskell, but without the burden of developing (and maintaining) one ourselves.

wxHaskell is therefore built on top of wxWidgets: a comprehensive C++ library that is portable across all major GUI platforms; including GTK, Windows, X11, and MacOS X. Furthermore, it is a mature library (in development since 1992) that supports a wide range of widgets with the native look-and-feel.

#### 7.7.6  threepenny-gui

 Report by: Heinrich Apfelmus Status: active development

Threepenny-gui is a framework for writing graphical user interfaces (GUI) that uses the web browser as a display. Features include:

• Easy installation. Everyone has a reasonably modern web browser installed. Just install the library from Hackage and you are ready to go. The library is cross-platform.
• HTML. You have all capabilities of HTML at your disposal when creating user interfaces. This is a blessing, but it can also be a curse, so the library includes a few layout combinators to quickly create user interfaces without the need to deal with the mess that is CSS. A small foreign function interface (FFI) for JavaScript allows you to include JS client libraries.
• Functional Reactive Programming (FRP) promises to eliminate the spaghetti code that you usually get when using the traditional imperative style for programming user interactions. Threepenny has an FRP library built-in, but its use is completely optional. Employ FRP when it is convenient and fall back to the traditional style when you hit an impasse.

#### Status

The project is alive and kicking, the latest release is version 0.5.0.0. You can download the library from Hackage and use it right away to write that cheap GUI you need for your project. Here a screenshot from the example code:

For a collection of real world applications that use the library, have a look at the gallery on the homepage.

Compared to the previous report, the library now uses a UI monad instead of the IO monad. This simplifies many function signatures, in particular in the JavaScript FFI, and allows recursive uses of FRP. Moreover, the library now includes the full set of SVG elements and the beginnings of a small Canvas API.

#### Current development

The library is still very much in flux, significant API changes are likely in future versions. The goal is to make GUI programming as simple as possible, and that just needs some experimentation.

While the library now also features garbage collection of DOM elements, one unfortunate drawback of the current implementation is that the getElementsById and related combinators will not work anymore. The next version of threepenny-gui will fix that by completely reworking the JavaScript FFI, making it much more robust.

#### 7.7.7  reactive-banana

 Report by: Heinrich Apfelmus Status: active development

Reactive-banana is a library for functional reactive programming (FRP).

FRP offers an elegant and concise way to express interactive programs such as graphical user interfaces, animations, computer music or robot controllers. It promises to avoid the spaghetti code that is all too common in traditional approaches to GUI programming.

The goal of the library is to provide a solid foundation.

• Writing graphical user interfaces with FRP is made easy. The library can be hooked into any existing event-based framework like wxHaskell or Gtk2Hs. A plethora of example code helps with getting started. You can mix FRP and imperative style. If you don’t know how to express functionality in terms of FRP, just temporarily switch back to the imperative style.
• Programmers interested in implementing FRP will have a reference for a simple semantics with a working implementation. The library stays close to the semantics pioneered by Conal Elliott.
• It features an efficient implementation. No more spooky time leaks, predicting space &time usage should be straightforward.

Compared to the previous report, the library finally features a push-driven implementation that actually deserves that name, i.e. events that depend on other events will only be considered when the latter have an occurrence. I have also made some additional performance improvements to the library.

During my work on graphical user interfaces, mainly the threepenny-gui project (→7.7.6), I have also found that some aspects of the reactive-banana API are very cumbersome, in particular the type parameter t used to indicated starting times. I don’t think that the current API will work out in the long run, but I don’t want to shut off this part of the design space just yet. Rather than changing the entire API, I have decided to export some primitive combinators in the module Reactive.Banana.Prim instead, which you can use to implement your own flavor of FRP. This module offers two types Pulse and Latch, on top of which you can implement custom Event and Behavior types, with or without type parameters, or any other design trade-off you want to make.

Current development. I have already put some effort into the next version of reactive-banana. It will finally implement garbage collection for dynamically created events and behaviors, and it will also feature some dramatic performance improvements.

### 7.8  Graphics and Audio

#### 7.8.1  diagrams

 Report by: Jeffrey Rosenbluth Participants: Daniel Bergey, Jan Bracker, Christopher Chalmers, Daniil Frumin, Allan Gardner, Andy Gill, Niklas Haas, John Lato, Chris Mears, Jeff Rosenbluth, Michael Sloan, Ryan Yates, Brent Yorgey Status: active development

The diagrams framework provides an embedded domain-specific language for declarative drawing. The overall vision is for diagrams to become a viable alternative to DSLs like MetaPost or Asymptote, but with the advantages of being declarative—describing what to draw, not how to draw it—and embedded—putting the entire power of Haskell (and Hackage) at the service of diagram creation. There is still much more to be done, but diagrams is already quite fully-featured, with a comprehensive user manual, a large collection of primitive shapes and attributes, many different modes of composition, paths, cubic splines, images, text, arbitrary monoidal annotations, named subdiagrams, and more.

#### What’s new

There has been quite a bit going on with diagrams since the last HCAR edition. For staters version 1.0 was released. We also released version 1.1 and finally in June of 2014 the current version, 1.2. New features include:

• An API for drawing arrows including: several ways to connect diagrams with arrows, arbitrary shaped shafts, and a collection of arrowheads.
• Consistent use of the lens package to access and modify record fields and newtypes.
• Performance improvements of about 30%obtained by the use of better data structures to represent diagram output.
• Support for 3D diagrams.
• Introduction of a new measurement type and the removal of the freeze function make things like handling line widths and text sizes more flexible and predictable.
• New haskell native backends: diagrams-rasterific and diagrams-canvas.
• Many other features including support for: linear and radial gradients, tight alignment of convex shapes, improved clipping, animated GIFs (in cairo and rasterific), creating offsets paths, and both external and embedded images.

There have been many improvements and changes to the core diagrams libraries as well. The next release of diagrams is slated to include:

• Support for handling directions (vectors which have forgotten their magnitude). Which will provide a consistent API in all dimensions.
• Generic scalars values, i.e. not restricted to type Double.
• A major refactoring of the way vector spaces are handled using the linear package.
• a PGF backend with full TeX support.

#### GSoC

We had two Google Summer of Code projects dedicated to diagrams projects this past summer.

• Allan Gardner laid the groundwork for using numeric types beyond Double. After several iterations, this led to the adoption of the linear package. This paves the way for using automatic differentiation, constraint solving, and fixed or dynamic precision numbers with Diagrams.
• Niklas Haas added lenses to diagrams, in order to make it possible to (efficiently) traverse over diagrams and subdiagrams, modifying them in the process.

#### Contributing

There is plenty of exciting work to be done; new contributors are welcome! Diagrams has developed an encouraging, responsive, and fun developer community, and makes for a great opportunity to learn and hack on some “real-world” Haskell code. Because of its size, generality, and enthusiastic embrace of advanced type system features, diagrams can be intimidating to would-be users and contributors; however, we are actively working on new documentation and resources to help combat this. For more information on ways to contribute and how to get started, see the Contributing page on the diagrams wiki: http://haskell.org/haskellwiki/Diagrams/Contributing, or come hang out in the #diagrams IRC channel on freenode.

#### 7.8.2  csound-expression

 Report by: Anton Kholomiov Status: active, experimental

The csound-expression is a library for electronic music production. It’s based on very efficient and feature rich synth Csound.

It strives to be as simple and responsive as it can be. A couple of lines of code should be enough to make something interesting. There are sensible defaults that allow the user to express the musical ideas with very short sentences.

The list of main features:

• It’s easy to use. Made for artists not for algebraists.

• Easy to use band limited oscillators.

• There is a GUI. It’s not limited to text. We can create sliders, knobs, buttons and control our synth in real-time.

• The Csound can work with frequencies. The world of microtonal music opens up.

• We can use the library as a sampler to create soundscapes in real-time. Check out the csound-sampler library on the Hackage.

• Lot’s of ready to use effects (resonators, filters, delays, distortions, flangers).

• There are lots of predefined instruments. Check out the csound-catalog on Hackage.

• Good support for composition with scores. Check out the temporal-csound on Hackage.

• The Csound is very efficient

• Unlimited polyphony

• Almost all Csound audio units are available. It’s more than 1000 audio units.

• Csound is very portable. The output Csound file can run on android, i-devices, raspberry pi and even in the browser.

• The Csound is open

• There is support for MIDI and OSC. Just plug and play.

• There is support for JACK. We can use it in our DAW of choice.

• We can run it within many other languages. There is support for reading control and audio signals from the outside world.

• The library is very composable

• An audio unit is a function. It can process signals. An instrument is just a function from notes to signals.

• There is no barrier between notes and instruments. If we apply instrument to the notes we get the signal as the output. It can become a part of another instrument.

• Event streams and GUIs are based on FRP. User gets the stream of mouse clicks and can process it with fmap, filter it or merge with another signal.

#### 7.8.3  Chordify

 Report by: José Pedro Magalhães Participants: W. Bas de Haas, Dion ten Heggeler, Gijs Bekenkamp, Tijmen Ruizendaal Status: actively developed

Chordify is a music player that extracts chords from musical sources like Youtube, Deezer, Soundcloud, or your own files, and shows you which chord to play when. The aim of Chordify is to make state-of-the-art music technology accessible to a broader audience. Our interface is designed to be simple: everyone who can hold a musical instrument should be able to use it.

Behind the scenes, we use the sonic annotator for extraction of audio features. These features consist of the downbeat positions and the tonal content of a piece of music. Next, the Haskell program HarmTrace takes these features and computes the chords. HarmTrace uses a model of Western tonal harmony to aid in the chord selection. At beat positions where the audio matches a particular chord well, this chord is used in final transcription. However, in case there is uncertainty about the sounding chords at a specific position in the song, the HarmTrace harmony model will select the correct chords based on the rules of tonal harmony.

The basic functionality of Chordify is free for everyone to use. PDF and MIDI transcriptions of the chords can be obtained for a small fee. We also have monthly and yearly Premium accounts that add functionality such as organising a library, transposing chords, chord playback, etc. The code for HarmTrace is available on Hackage, and we have ICFP’11 and ISMIR’12 publications describing some of the technology behind Chordify.

#### 7.8.4  Glome

 Report by: Jim Snow Status: New Version of Glome Raytracer

Glome is a ray tracer I wrote quite some time ago. The project had been dormant for about five years until a few months ago when I decided to fix some long-standing bugs and get it back into a state that compiles with recent versions of GHC. I got a little carried away, and ended up adding some major new features.

First, some background. Glome is a ray tracer, which renders 3d images by tracing rays from the camera into the scene and testing them for intersection with scene objects. Glome supports a handful of basic primitive types including planes, spheres, boxes, triangles, cones, and cylinders. It also has a number of composite primitives that modify the behavior of other primitives, such as CSG difference and intersection.

One of the more interesting composite primitives is a BIH-based accelleration structure, which sorts primitives into a hierarchy of bounding volumes. This allows for scenes with a very large number of primitives to be rendered efficiently.

Major new changes to Glome are a re-factoring of the shader code so that it is now possible to define textures in terms of user-defined types and write your own shader (though the default should be fine for most uses), a new tagging system, some changes to the front-end viewer application (which uses SDL now instead of OpenGL), and a new triangle mesh primitive type.

Tagging requires a bit of explanation. When a ray intersects with something in the scene, Glome returns a lot of information about the properties of the location where the ray hit, but until recently it didn’t give much of a clue as to what exactly the ray hit. For 3D rendering applications, you don’t usually care, but for many computational geometry tasks you do very much care.

The new tagging system makes it possible to associate any 3D primitive with a tag, such that the tag is returned along with any ray intersection that hit the wrapped primitive. Tags are returned in a list, so that it’s possible to have a heirarchy of tagged objects.

As an example of tags in action, I tagged some of the objects in Glome’s default test scene, and instrumented the viewer so that clicking on the image causes a ray to be traced into the scene from the cursor’s location, and then we print any tags returned by the ray intersection test. (Tags can be any type, but for illustrative purposes, the test scene uses strings.)

An interesting feature of the tagging system is that you don’t necessarily have to click directly on the object to get back the tag; you could also click on the image of the object reflected off of some other shiny object in the scene.

Even though Glome is still a bit too slow for practical interactive 3D applications (I’ve been able to get around 2-3 FPS at 720x480 for reasonably complex scenes on a fairly fast machine), tags should at least make it easier to write interactive applications when Moore’s law catches up.

Glome is split into three packages: GloveVec, a vector library, GlomeTrace, the ray-tracing engine, and GlomeView, a simple front-end viewer application. All are available on hackage or via github under a GPLv2 license.

### 7.9  Text and Markup Languages

#### 7.9.1  epub-tools (Command-line epub Utilities)

 Report by: Dino Morelli Status: stable, actively developed

A suite of command-line utilities for creating and manipulating epub book files. Included are: epubmeta, epubname, epubzip.

epubmeta is a command-line utility for examining and editing epub book metadata. With it you can export, import and edit the raw OPF Package XML document for a given book. Or simply dump the metadata to stdout for viewing in a friendly format.

epubname is a command-line utility for renaming epub ebook files based on the metadata. It tries to use author names and title info to construct a sensible name.

epubzip is a handy utility for zipping up the files that comprise an epub into an .epub zip file. Using the same technology as epubname, it can try to make a meaningful filename for the book.

This project is built on the latest epub-metadata library and so supports epub3 for the first time.

epub-tools is available from Hackage and the Darcs repository below.

#### 7.9.2  lens-aeson

 Report by: Edward Kmett Participants: Paul Wilson, Benno Fünfstück, Michael Sloan, Adrian Keet Status: actively developed

This package provides a suite of combinators that wrap around Bryan O’Sullivan’s aeson library using the lens library (→7.1.2) to make many data access and manipulation problems much more succinctly expressable. We provide lenses, traversals, isomorphisms and prisms that conspire to make it easy to manipulate complex JSON objects.

#### 7.9.3  hyphenation

 Report by: Edward Kmett Status: stable

This package provides configurable Knuth-Liang hyphenation using the UTF-8 encoded hyphenation patterns for 69 languages, based on the patterns provided by the hyph-utf8 project for LaTeX. It can be mixed with a pretty-printer to provide proper break-points within words.

### 7.10  Natural Language Processing

#### 7.10.1  NLP

 Report by: Eric Kow

The Haskell Natural Language Processing community aims to make Haskell a more useful and more popular language for NLP. The community provides a mailing list, Wiki and hosting for source code repositories via the Haskell community server.

The Haskell NLP community was founded in March 2009. The list is still growing slowly as people grow increasingly interested in both natural language processing, and in Haskell.

At the present, the mailing list is mainly used to make announcements to the Haskell NLP community. We hope that we will continue to expand the list and expand our ways of making it useful to people potentially using Haskell in the NLP world.

New packages

• pdrt-sandbox 0.1.0.0 (Harm Brouwer and Noortje Venhuizen)

PDRT-SANDBOX is an implementation of Discourse Representation Theory (DRT), and its extension Projective Discourse Representation Theory (PDRT). The library includes a translation from PDRT to DRT and first-order logic, composition via different types of merge, and unresolved structures based on Montague Semantics.

• chatter-0.5.0.0 (Rogan Creswick)

Chatter is a growing collection of NLP algorithms and data structures that currently support: POS tagging and Phrasal Chunking (both via Averaged Perceptrons), document similarity, and Information Extraction patterns (via Parsec). Chatter is pure Haskell and BSD-licensed.

Details

Chatter exists to provide a liberally-licensed, “out of the box” solution for basic NLP in Haskell. It aims to achieve the ease of use of NLTK without sacrificing the pragmatic utility of detailed types. Towards that end, simple operations with Chatter require little setup:

POS Tagging

> import NLP.POS
> tgr <- defaultTagger
> tagText tgr "The quick brown fox jumped
over the lazy dog."
"The/DT quick/JJ brown/NN fox/NN jumped/VBD
over/IN the/DT lazy/JJ dog/NN ./."

Variants on the ‘tagText’ function shown above provide structured output. Typeclasses allow different corpora to use different tagsets without accidental conflict, but once a tagger is loaded, the typeclasses should be largely transparent to the programmer. The Brown corpus and the Conll2000 corpus tagsets are currently encoded as Tag types (in the NLP.Corpora.* modules).

Chunking

> import NLP.POS
> import NLP.Chunk
> tgr <- defaultTagger
> chk <- defaultChunker
> chunkText tgr chk "The quick brown fox jumped
over the lazy dog."
"[NP The/DT quick/JJ brown/NN fox/NN]
[VP jumped/VBD] [NP over/IN the/DT lazy/JJ
dog/NN] ./."

Phrasal chunking (shown above with the Conll2000 chunker and POS tagger) takes POS-tagged sentences and annotates them with Phrase Chunks, where possible. This only does one level of chunking, so it doesn’t result in a full parse tree. Similarly to the POS taggers, variants on ‘chunkText’ provide structured output.

Information Extraction with Parsec

The structured results from both POS tagging and Chunking can be consumed by Parsec parsers that reason about Phrase Chunk tags, POS tags, and literal token text.

An example module provides a demonstration of these features at: http://hackage.haskell.org/package/chatter/docs/NLP-Extraction-Examples-ParsecExamples.html

• Venhuizen, N. J. and Brouwer, H. (2014). PDRT-SANDBOX: An implementation of Projective Discourse Representation Theory. In: Rieser, V. and Muller, P. (Eds.), Proceedings of the 18th Workshop on the Semantics and Pragmatics of Dialogue, SemDial 2014 - DialWatt, pp. 249-251, September 1-3, Edinburgh, Scotland.

#### 7.10.2  GenI

 Report by: Eric Kow

GenI is a surface realizer for Tree Adjoining Grammars. Surface realization can be seen a subtask of natural language generation (producing natural language utterances, e.g., English texts, out of abstract inputs). GenI in particular takes a Feature Based Lexicalized Tree Adjoining Grammar and an input semantics (a conjunction of first order terms), and produces the set of sentences associated with the input semantics by the grammar. It features a surface realization library, several optimizations, batch generation mode, and a graphical debugger written in wxHaskell. It was developed within the TALARIS project and is free software licensed under the GNU GPL, with dual-licensing available for commercial purposes.

GenI is now mirrored on GitHub, with its issue tracker and wiki and homepage also hosted there. The most recent release, GenI 0.24 (2013-09-18), allows for custom semantic inputs, making it simpler to use GenI in a wider variety for applications. This has recently been joined by a companion geni-util package which offers a rudimentary geniserver client and a reporting tool for grammar debugging.

### 7.11  Bioinformatics

 Report by: Christian Höner zu Siederdissen Status: usable, active development

ADPfusion provides a domain-specific language (DSL) for the formulation of dynamic programs with a special emphasis on computational biology. Following ideas established in Algebraic dynamic programming (ADP) a problem is separated into a grammar defining the search space and one or more algebras that score and select elements of the search space. The DSL has been designed with performance and a high level of abstraction in mind.

As an example, consider a grammar that recognizes palindromes. Given the non-terminal p, as well as parsers for single characters c and the empty input e, the production rule for palindromes can be formulated as p ->c p c || e.

The corresponding ADPfusion code is similar:

(p, f <<< c % p % c ||| g <<< e ... h)

We need a number of combinators as “glue” and additional evaluation functions f, g, and h. With f c1 p c2 = p && (c1=c2) scoring a candidate, g e = True, and h xs = or xs determining if the current substring is palindromic.

As of now, code written in ADPfusion achieves performance close to hand-optimized C, and outperforms similar approaches (Haskell-based ADP, GAPC producing C++) thanks to stream fusion. The figure shows running times for the Nussinov algorithm.

ADPfusion currently handles formal grammars working on one or more inputs, as well as different types of input. A common case of grammars with one input are context-free grammars, which are very common in computational biology and linguistics problems. We also easily handle alignment-type linear and context-free grammars on more than one input.

A more recent addition are extensions to non-string-like input types. We can, for example, encode travelling salesman and Hamiltonian path problems and solve these efficiently – at least as efficiently as one can solve problems that are exponential in time complexity.

#### 7.11.2  Ab-initio electronic structure in Haskell

 Report by: Alessio Valentini Participants: Felipe Zapata, Angel Alvarez Status: Active

We are three friends from Alcala de Henares (Spain), two PhD students in computational chemistry from ResMol group and one sysadmin working at Alcala University computer center. We all share the same passion in programming and after some adventures in Fortran, Bash, Python and Erlang we are now fully committed to Haskell. As PhD students working in this area, every day we face codes that are both difficult to read and improve, with no guidelines and poor documentation.

The set of problems inherent in computational chemistry are mainly due to the theoretical models complexity and the need of reducing as much as possible the computational time, leading to a demand of extremely solid and efficient software. What is happening in the actual context is the result of a poor interface between the two adjoining worlds of chemist and computer science and the necessity of publishing papers and scientific material to raise funds. This usually leads to software hastily developed by a few chemists with only a side-interest in programming and therefore a limited skill set.

The very few software that can be deemed remarkable are usually the result of massive funding, and even those packages are now facing huge problems in terms of parallelization, concurrency and stability of the code. Most of the efforts are spent trying to fix these issues instead of being addressed at developing better code (improve modularity and intelligibility) or new features and new algorithms.

We witness the proliferation of projects that serve no other purpose than to provide a bridge between different software, while the main core of molecular modeling codes, in most cases written in Fortran 77, remains untouched since the eighties.

Our first purpose in this project is to become better at Haskell programming and having fun managing a package that is every day becoming bigger. But we kind of dream of a molecular modeling software that can fully express the great upsides of functional programming. Fewer lines of code, better readability, great parallelization, embedded domain specific languages (EDSL) ... and maybe more efficiency, too !

Ab-initio molecular modeling is a branch of computational chemistry that, for a set of given atoms, solves the Schrödinger equation (the analogous of Newton’s equation in quantum mechanics), with no inclusion of parameters derived from experimental data. In such systems it is quite easy to calculate forces between nuclei but things get tricky when we calculate the potential energy contribution of forces related to electrons. In this case we can adopt a first approximation, the so called Hartree-Fock, that considers the electron-electron repulsion as an average between each electron and the mean field of all the others. This theory is right now the cornerstone of more sophisticated methods, such Multiconfigurational Methods, Mø ller-Plesset Perturbation Theory or Coupled Cluster, and the mathematical models behind its implementation are vastly used throughout the world of computational chemistry.

This package can calculate the Hartree Fock energy of a given molecule geometry and a basis set solving the Roothaan Hall equations through a self consistent field procedure. It uses the Harris Functional as an initial density guess and the DIIS method to greatly improve the convergence.

The entire code is written using the Repa library and focusing our efforts on efficiency, parallelism (speedups vs cores: 2,3 on 4 and 3.5 on 8) and code readability. Using Haskell’s higher order abstraction we are trying to develop an EDSL appropriate for quantum mechanics problems, creating code operators able to fairly mimic the physical ones.

A Hartree Fock p orbital in PSB3:

We are currently developing this code in our spare time, working on analytical gradients, on the Prisma algorithm and on a solid eigenvalue problem solver. The aims of this projects are a full Haskell implementation of Multiconfigurational Methods and possibly an integration with our molecular dynamics project.

#### 7.11.3  Semi-Classical Molecular Dynamics in Haskell

 Report by: Alessio Valentini Participants: Felipe Zapata, Angel Alvarez Status: Active

As a first approximation, we can split the world of Molecular Dynamics into three branches: Force Fields, Classical (Semi-Classical) and Quantum Molecular Dynamics. The first approach completely ignores the description of the electrons, and the system is described by a "Balls and Springs" model leading to very cheap calculations that can be performed in big systems.

From a chemical point of view, anyway, this approach often suffers severe drawbacks, since every time an accurate description of electrons is needed (i.e. when studying the formation or breaking of bonds, reations involving excited states, or heavily polarized systems) we cannot rely on pure Classical Mechanics.

On the other side, even if the Quantum Dynamics approach is capable of describing the real quantum behavior of every single electron and nucleus, it comes with a huge increase in computational cost. It is basically unaffordable for systems with more than 5-6 atoms. That’s why we need to take in consideration the Classical and Semi Classical Dynamics, where the system’s forces are calculated using a Quantum method, while the geometry is updated with Classical Mechanics and some ad-hoc formulae to take into account quantum effects.

As PhD students in computational chemistry we often found ourselves in this situation: we have a chemical problem that might appear simple at first, but then it is usually quite difficult to find all the features necessary to tackle it in the same package. It is often the case where software "X" is lacking feature "Z" while software "Y" is missing feature "W".

The possible solutions to this impasse are:

1. to encode the missing features in the software of choice, a task that can reveal itself as very difficult and time consuming, since most of the time we are dealing with monolithic software written in Fortran, usually quite old and poorly maintained.

2. to write an external software (i.e. parser/launcher) capable of interact concurrently with several software, which is currently the approach employed in most cases. So much that the vast majority of computational chemists keeps a personal folder that contains just collections of parsers and scripts.

Energies vs time for a two electronic states system:

Our project takes advantage of the exceptional modularity that Haskell offers, and represents our effort to unify in a comprehensive tool all those routines that are needed in our research group to perform Classical and Semi Classical Molecular Dynamics. Our current goal is to keep a robust code and to minimize the need to use external software, limiting their application to the computation of the gradient.

Given some initial conditions and an external program (currently Molcas and Gaussian are supported) capable of calculating the energy gradient, our code is able to parse its log file and perform the whole "Semi-Classical part" of the Molecular Dynamics.

The code employs the Velocity Verlet algorithm to propagate the geometries, the NoséHoover thermostate for a constant temperature bath and the Tully Hammes Schiffer hopping algorithm (along with correction of Persico-Granucci) to take in consideration hops between different electronic states. It also features the possibility to add external forces to the molecule, to simulate constrained conditions that can be found, for example, in a protein binding pocket.

This is still a small project, but we are using it constantly in our research group as a flexible tool for molecular dynamics, waiting for our other project to calculate the ab-initio gradient for us.

 Report by: Ketil Malde Participants: Christian Höner zu Siederdissen, Michal J. Gajda, Nick Ignolia, Felipe Almeida Lessa, Dan Fornika, Maik Riechert, Ashish Agarwal, Grant Rotskoff, Florian Eggenhofer, Sarah Berkemer, Niklas Hambüchen

Bioinformatics in Haskell is a steadily growing field, and the Bio section on Hackage now contains 69 libraries and applications. The biohaskell web site coordinates this effort, and provides documentation and related information. Anybody interested in the combination of Haskell and bioinformatics is encouraged to sign up to the mailing list (currently by emailing <ketil at malde.org>Ketil), and to register and document their contributions on the http://biohaskell.org wiki.

In the summer of 2014, Sarah Berkemer was financed by Google’s Summer of Code program to work on optimizing transalign. After a summer’s work, Sarah was able to improve both space and time usage. Other new additions are parsers by Floran Eggenhofer for the NCBI Genbank format and for Clustal mulitiple sequence alignments. There is also a new library for working with EEG devices, written by Niklas Hambüchen and Patrick Chilton.

#### 7.11.5  arte-ephys: Real-time electrophysiology

 Report by: Greg Hale Participants: Alex Chen Status: work in progress

Arte-ephys is a soft real-time neural recording system for experimental systems neuroscientists.

Our lab uses electrode arrays for brain recording in freely moving animals, to determine how these neurons build, remember, and use spatial maps.

We previously recorded and analyzed our data in two separate stages. We are now building a recording system focused on streaming instead of offline analysis, for real-time feedback experiments. For example, we found that activity in the brain of resting rats often wanders back to representations of specific parts of a recently-learned maze, and we would now like to automatically detect these events and reward the rat immediately for expressing them, to see if this influences either the speed of learning of a specific part of the maze or the nature of later spatial information coding.

We now have a proof-of-concept that streams recorded data from disk, performs the necessary preprocessing, and accurately decodes neural signals in realtime, while drawing the results with gloss. Our next goal is to integrate this into a sytem that streams raw neural data during the experiment.

### 7.12  Embedding DSLs for Low-Level Processing

#### 7.12.1  Feldspar

 Report by: Emil Axelsson Status: active development

Feldspar is a domain-specific language for digital signal processing (DSP). The language is embedded in Haskell and is currently being developed by projects at Chalmers University of Technology (→9.7), SICS Swedish ICT AB and Ericsson AB.

The motivating application of Feldspar is telecoms processing, but the language is intended to be useful for DSP in general. The aim is to allow DSP functions to be written in pure functional style in order to raise the abstraction level of the code and to enable more high-level optimizations. The current version consists of an extensive library of numeric and array processing operations as well as a code generator producing C code for running on embedded targets.

At present, Feldspar can express the pure data-intensive numeric algorithms which are at the core of any DSP application. There is also support for the expression and compilation of parallel algorithms.

Ongoing work, presented at IFL 2014, extends Feldspar with basic input/output capabilities and adds a library to express streaming systems using a synchronous programming model. Future work involves extending and improving the system programming part of the language, and adding support for compilation to heterogeneous multi-core targets.

#### 7.12.2  Kansas Lava

 Report by: Andy Gill Participants: Bowe Neuenschwander Status: ongoing

Kansas Lava is a Domain Specific Language (DSL) for expressing hardware descriptions of computations, and is hosted inside the language Haskell. Kansas Lava programs are descriptions of specific hardware entities, the connections between them, and other computational abstractions that can compile down to these entities. Large circuits have been successfully expressed using Kansas Lava, and Haskell’s powerful abstraction mechanisms, as well as generic generative techniques, can be applied to good effect to provide descriptions of highly efficient circuits.

• The Fabric monad is now a Monad transformer. The Fabric monad historically provided access to named input/output ports, and now also provides named variables, implemented by ports that loop back on themselves. This additional primitive capability allows for a typed state machine monad. This design gives an elegant stratospheric pattern: purely functional circuits using streams; a monad for layout over space; and a monad for state generation, that acts over time.

• On top of the Fabric monad, we are implementing an atomic transaction layer, which provides a BSV-like interface, but in Haskell. An initial implementation has been completed, and this is being reworked to include BSV’s Ephemeral History Registers.

### 7.13  Others

#### 7.13.1  General framework for multi-agent systems

 Report by: Nickolay Kudasov Status: experimental

The goal is to create a general framework for developing and testing of multi-agent systems. That includes general representation for multi-agent systems as well as library implementations for well-known agent models, distributed algorithms and communication and coordination patterns.

Notions of agent and environment are separated with the help of free monads. Agent-environment interface is defined by an underlying functor.

The basic representation of agent and environment has been chosen and tested for an agent-based distributed graph coloring problem.

The concrete implementation is being revised frequiently and thus is not very stable.

Implementations for some general distributed algorithms (ABT, DBA, etc.) will be available shortly.

#### 7.13.2  ersatz

 Report by: Edward Kmett Participants: Johan Kiviniemi, Iain Lane Status: stable

Ersatz is a library for generating QSAT (CNF/QBF) problems using a monad. It takes care of generating the normal form, encoding your problem, marshaling the data to an external solver, and parsing and interpreting the result into Haskell types.

What differentiates Ersatz from other SAT bindings is the use of observable sharing in the API.

This enables you to use the a much richer subset of Haskell than the purely monadic meta-language, and it becomes much easier to see that the resulting encoding is correct.

Support is offered for decoding various Haskell datatypes from the solution provided by the SAT solver.

A couple of examples are included with the distribution. Neither are as fast as a dedicated solver for their respective domains, but they showcase how you can solve real world problems involving 10s or 100s of thousands of variables and constraints.

#### 7.13.3  arbtt

 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!

#### 7.13.4  Hoodle

 Report by: Ian-Woo Kim Status: Actively Developing

Hoodle is a pen-notetaking programing written in haskell using Gtk2hs. The name Hoodle is from Haskell + doodle.

This project first started as making a haskell clone of Xournal, a notetaking program developed in C. But now Hoodle has more unique features, as well as basic pen notetaking function. Pen input is directly fed into from X11 events, which has sub-pixel level accuracy for the case of wacom tablets. Therefore, the resultant pen strokes are much smoother than other similar open-source programs such as Jarnal and Gournal.

Hoodle can be used for annotation on PDF files, and also supports importing images of PNG, JPG and SVG types, and exporting Hoodle documents to PDF. One of the most interesting features is “linking”: each Hoodle document can be linked with each other by simple drag-and-drop operations. Then, the user can navigate linked Hoodle documents as we do in web browser. Another interesting feature is that one can edit a document in split views, so that a long Hoodle document can be easily edited. Hoodle can embed LaTeXtexts and the embedded text can be edited via network.

GUI programming is in general tightly tied into a GUI framework. Since most frameworks rely on callbacks for event processing, program logic is likely to be scattered in many callback functions. We cure this situation by using coroutines. In haskell, coroutine can be implemented in a straightforward way without relying on specific language feature. This abstraction enable us to reason through the program logic itself, not through an inverted logic in a GUI framework.

Hoodle is being very actively developed as an open-source project hosted on Github. The released versions are located on Hackage, and it can be installed by simple cabal install. On Linux, OS X, and Windows systems with Gtk2hs and Poppler, Hoodle can be installed without problems. Recently, it is packaged for NixOS. Making a Hoodle binary package for other linux distributions, OS X and window is planned.

The development focus as of now is to have more flexible link features (link to arbitrary position of a document) and an internal database for document management. Hoodle manages documents with a unique UUID, but it does not have a good internal database yet. This feature can also be extended to saving Hoodle documents in cloud storage in a consistent way. Refining rendering with appropriate GPU acceleration is also planned. In the long run, we plan to support mobile platforms.

#### 7.13.5  Reffit

 Report by: Greg Hale Status: work in progress

Reffit is a Snap website for collecting and organizing short comments on peer reviewed papers, blog posts, and videotaped talks. We hope to attract a community and foster a culture of open discussion of papers, with a lighthearted attitude, informality, and gamification.

#### 7.13.6  Laborantin

 Report by: Lucas DiCioccio Status: Working, development for new features

Conducting scientific experiments is hard. Laborantin is a DSL to run and analyze scientific experiments. Laborantin is well-suited for experiments that you can run offline such as benchmarks with many parameters.

Laborantin encourages users to express experiments parameters, experiment results, as well as execution, startup, and teardown procedures in a methodical manner. For instance, the following snippet defines a network ‘ping’ experiment with a destination and packet-size parameters.

Unknown begin: \begin{scriptsize}

Laborantin also lets users express dependencies between experiments. Laborantin is designed to allow multiple backend (where to run and store experiments) and multiple frontends (how a user interacts with Laborantin). The current backend stores experiment results on the filesystem and provides a command line frontend.

Contributions are welcome. In the future, we plan to enrich Laborantin with helper modules for common tasks such as starting and collecting outputs of remote processes, reformatting results, and generating plots (e.g., with Diagrams). Laborantin would also benefit from new backends (e.g., to store results in an SQL database or HDFS) and new frontends (e.g., an integration in IHaskell).

#### 7.13.7  The Amoeba-World game project

 Report by: Alexander Granin Status: work in progress

In functional programming, there is a serious problem: there are no materials for the development of large applications. As we know, this field is well studied for imperative and object-oriented languages. There are books on design, architecture, design patterns and modeling practices. But we have no idea how this big knowledge can be adapted to functional languages.

I’m working on a game called “The Amoeba World”. The goal of this project is to explore approaches to the development of large applications on Haskell. The results of my research are some articles which will be used to compose a book about functional design and architecture. Currently two articles are written out of the planned four (in Russian, but the articles will be translated to English soon). The first highlights the issue of whether the mainstream knowledge of architecture is applicable to the functional paradigm and what tools can be used for designing of architecture. It shows that the UML is ill-suited for the functional paradigm and the architecture is constructed using mind maps and concept cards. The second article talks about a low-level design of the application using the language Haskell. It has a theoretical part named what makes a good design, but there is also practical part describing of the some anti-patterns in Haskell. The third article is under development now. In it, the application design based on properties and scenarios is researched. The fourth article will be discussing the use of FRP.

Code of the game “The Amoeba World” should be written well to be a good example of the design concepts. These concepts are: using DSL, parsing, layering, using lenses, Inversion of Control, testing, FRP, SDL, usefulness of monads. The overall architecture of the game looks as follows:

At the moment, the game logic has been rewritten twice. The draft of game logic is ready. A special file format ’ARF’ (Amoeba Raw File) for the game objects is done. Parsec is used for parsing, and a custom safe translator is written, which works on rules. Now I’m are working on a Application Layer. Settings loading is done. A primitive renderer for the game world is created. A draft game cycle and IO event handler from SDL subsystem is done by using Netwire FRP library. The next objectives are to add an interaction within the game world and then move to the execution of scenarios on game objects.

#### 7.13.8  Nomyx

 Report by: Corentin Dupont Status: pre-release version

Nomyx is a unique game where you can change the rules of the game itself, while playing it! In fact, changing the rules is the goal of the game. Changing a rule is considered as a move. Of course even that can be changed! The players can submit new rules or modify existing ones, thus completely changing the behaviour of the game through time. The rules are managed and interpreted by the computer. They must be written in the Nomyx language, based on Haskell. This is the first complete implementation of a Nomic game on a computer.

At the beginning, the initial rules are describing:

• How to add new rules and change existing ones. For example a unanimity vote is necessary to have a new rule accepted.
• How to win the game. For example you win the game if you have 5 rules accepted.

But of course even that can be changed!

A Beta version has been released. A match is currently on-going, join us! A lot of learning material is available, including a video, a tutorial, a FAQ, a forum and API documentation.

If you like Nomyx, you can help! There is a development mailing list (check the website). The plans now are to fix the remaining bugs and release a V1.0 in some month.

#### 7.13.9  tempuhs

 Report by: Alexander Berntsen Status: pre-release

tempuhs is an ambitious effort by plaimi (→8.11) to chronicle time. This means recording events, and arranging them with regards to time.

The grand vision is a system capable of storing a timespan that includes The Big Bang on the scale of Planck-time, the history of the universe on the scale of milliards-of-years, your Mother’s birthday on the scale of days in the Gregorian new style calendar, and your meeting scheduler on the scale of minutes. These are represented as timespans inside of a big parent timespan as of today, allowing a frontend to present this and navigate between levels of zoom that preserve precision and resolution.

In addition to having a grand vision for functionality, careful thought is placed on the design of tempuhs and how to use it. tempuhs should be completely frontend agnostic and extendible. Generality is taken to its logical extreme in functionality and architecture both.

tempuhs consists of two pieces. tempuhs may refer to both of these pieces, or one in particular: the library which specifies how we represent our data. tempuhs-server is the Web server that makes tempuhs frontend agnostic by being a common API for communicating with the database. The tempuhs backbone will in the future need to deal with conversion between time units.

All of this is AGPLv3, and contributions would be very welcome. We would be happy to help you find your way around in the source code, or setting up your own frontend for tempuhs.

The technology currently used for tempuhs includes HSpec and HUnit for tests, the Scotty Web server, Persistent for dealing with databases (PostgreSQL for the production server and SQLite for the tests), wai for various things, The Glorious Glasgow Haskell Compiler (of course), and some other libraries.

## 8  Commercial Users

### 8.1  Well-Typed LLP

 Report by: Andres Löh Participants: Duncan Coutts

Well-Typed is a Haskell services company. We provide commercial support for Haskell as a development platform, including consulting services, training, and bespoke software development. For more information, please take a look at our website or drop us an e-mail at <info at well-typed.com>.

We are working for a variety of commercial clients, but naturally, only some of our projects are publicly visible.

Austin has been working hard to help get GHC-7.8 released.

On behalf of the Industrial Haskell Group (IHG) (→8.3), we are currently working on tasks related to Hackage 2 and Cabal.

We continue to be involved in the community, maintaining several packages on Hackage and giving talks at a number of conferences. Some of our recent projects are available online, such as for example Edsko’s ghc-events-analyze tool, or Adam’s talk about overloaded record fields in Haskell (links below).

We are continuing to offer training services. We offer regular courses in London (the next course dates are in July and in October), and on-demand on-site training courses elsewhere as well.

We are of course always looking for new clients and projects, so if you have something we could help you with, just drop us an e-mail.

### 8.2  Bluespec Tools for Design of Complex Chips and Hardware Accelerators

 Report by: Rishiyur Nikhil Status: commercial product

Bluespec, Inc. provides an industrial-strength language (BSV) and tools for high-level hardware design. Components designed with these are shipping in some commercial smartphones and tablets today.

BSV is used for all aspects of ASIC and FPGA design — specification, synthesis, modeling, and verification. All hardware behavior is expressed using rewrite rules (Guarded Atomic Actions). BSV borrows many ideas from Haskell — algebraic types, polymorphism, type classes (overloading), and higher-order functions. Strong static checking extends into correct expression of multiple clock domains, and to gated clocks for power management. BSV is universally applicable, from algorithmic “datapath” blocks to complex control blocks such as processors, DMAs, interconnects, and caches.

Bluespec’s core tool synthesizes (compiles) BSV into high-quality Verilog, which can be further synthesized into netlists for ASICs and FPGAs using third-party tools. Atomic transactions enable design-by-refinement, where an initial executable approximate design is systematically transformed into a quality implementation by successively adding functionality and architectural detail. The synthesis tool is implemented in Haskell (well over 100K lines).

Bluesim is a fast simulation tool for BSV. There are extensive libraries and infrastructure to make it easy to build FPGA-based accelerators for compute-intensive software, including for the Xilinx XUPv6 board popular in universities, and the Convey HC-1 high performance computer.

BSV is also enabling the next generation of computer architecture education and research. Students implement and explore architectural models on FPGAs, whose speed permits evaluation using whole-system software.

#### Status and availability

BSV tools, available since 2004, are in use by several major semiconductor and electronic equipment companies, and universities. The tools are free for academic teaching and research.

• Abstraction in Hardware System Design, R.S. Nikhil, in Communications of the ACM, 54:10, October 2011, pp. 36-44.

• Bluespec, a General-Purpose Approach to High-Level Synthesis Based on Parallel Atomic Transactions, R.S. Nikhil, in High Level Synthesis: from Algorithm to Digital Circuit, Philippe Coussy and Adam Morawiec (editors), Springer, 2008, pp. 129-146.

• BSV by Example, R.S. Nikhil and K. Czeck, 2010, book available on Amazon.com.

• http://bluespec.com/SmallExamples/index.html: from BSV by Example.

• http://www.cl.cam.ac.uk/~swm11/examples/bluespec/: Simon Moore’s BSV examples (U. Cambridge).

• http://csg.csail.mit.edu/6.375: Complex Digital Systems, MIT courseware.

• http://www.bluespec.com/products/BluDACu.htm: A fun example with many functional programming features — BluDACu, a parameterized Bluespec hardware implementation of Sudoku.

 Report by: Andres Löh

The Industrial Haskell Group (IHG) is an organization to support the needs of commercial users of Haskell.

The main activity of the IHG is to fund work on the Haskell development platform. It currently operates two schemes:

• The collaborative development scheme pools resources from full members in order to fund specific development projects to their mutual benefit.

• Associate and academic members contribute to a separate fund which is used for maintenance and development work that benefits the members and community in general.

Projects the IHG has funded in the past years include work on Hackage 2, Cabal and cabal-install, and GHC itself.

Details of the tasks undertaken by the IHG are appearing on the Well-Typed (→8.1) blog, on the IHG status page and on standard communication channels such as the Haskell mailing list.

In the past six months, three new associate members have joined the IHG: Jon Kristensen, alephcloud and OTAS Technologies.

The collaborative development scheme is running continuously, so if you are interested in joining as a member, please get in touch. Details of the different membership options (full, associate, or academic) can be found on the website.

We are very interested in new members.

### 8.4  Barclays Capital

 Report by: Ben Moseley

Barclays Capital has been using Haskell as the basis for our FPF (Functional Payout Framework) project for about seven years now. The project develops a DSL and associated tools for describing and processing exotic equity options. FPF is much more than just a payoff language — a major objective of the project is not just pricing but “zero-touch” management of the entire trade lifecycle through automated processing and analytic tools.

For the first half of its life the project focused only on the most exotic options — those which were too complicated for the legacy systems to handle. Over the past few years however, FPF has expanded to provide the trade representation and tooling for the vast majority of our equity exotics trades and with that the team has grown significantly in both size and geographical distribution. We now have eight permanent full-time Haskell developers spread between Hong Kong, Kiev and London (with the latter being the biggest development hub).

Our main front-end language is currently a deeply embedded DSL which has proved very successful, but we have recently been working on a new non-embedded implementation. This will allow us to bypass some of the traditional DSEL limitations (e.g., error messages and syntactical restrictions) whilst addressing some business areas which have historically been problematic. The new language is based heavily on arrows, but has a custom (restrictive but hopefully easier-to-use than raw arrow-notation) syntax. We are using a compiler from our custom DSL syntax into Haskell source (with standard transformers from Ross Paterson’s “arrows” package) to provide the semantics for the language but plan to develop a number of independent backends. Our hope is that, over time, this will gradually replace our embedded DSL as the front end for all our tools. For the parsing part of this work we have been very impressed by Doaitse Swierstra’s uu-parsinglib (→7.3.2).

We have been and remain very satisfied GHC users and feel that it would have been significantly harder to develop our systems in any other current language.

### 8.5  Oblomov Systems

 Report by: Martijn Schrage

Oblomov Systems is a one-person software company based in Utrecht, The Netherlands. Founded in 2009 for the Proxima 2.0 project (http://www.haskell.org/communities/05-2010/html/report.html#sect6.4.5), Oblomov has since then been working on a number of Haskell-related projects. The main focus lies on web-applications and (web-based) editors. Haskell has turned out to be extremely useful for implementing web servers that communicate with JavaScript clients or iPhone apps.

Awaiting the acceptance of Haskell by the world at large, Oblomov Systems also offers software solutions in Java, Objective C, and C#, as well as on the iPhone/iPad. Last year, Oblomov Systems has worked together with Ordina NV on a substantial Haskell project for the Council for the Judiciary in The Netherlands.

### 8.6  OpenBrain Ltd.

 Report by: Tom Nielsen

OpenBrain Ltd. is developing a new platform for statistical computing that enables optimal decisions taking into account all the available information. We have developed a new statistical programming language (BAYSIG) that augments a Haskell-like functional programming language with Bayesian inference and first-class ordinary and stochastic differential equations. BAYSIG is designed to support a declarative style of programming where almost all the work consists in building probabilistic models of observed data. Data analysis, risk assessment, decision, hypothesis testing and optimal control procedures are all derived mechanically from the definition of these models. We are targeting a range of application areas, including financial, clinical and life sciences data.

We are building a web application (http://BayesHive.com) to make this platform accessible to a wide range of users. Users can upload and analyse varied types of data using a point-and-click interface. Models and analyses are collected in literate programming-like documents that can be published by users as blogs.

We use Haskell for almost all aspects of implementing this platform. The BAYSIG compiler is written in Haskell, which is particularly well suited for implementing the recursive syntactical transformations underlying statistical inference. BayesHive.com is being developed in Yesod.

#### Contact

<tomn at openbrain.org>

### 8.7  Pariah Reputation System

 Report by: Jim Snow Participants: Jim Snow, Daniel Connor Status: A new kind of reputation system for online communities

Metamocracy LLC is develping social network analysis tools to be used in online communities.

Our main product is Pariah, a reputation system. It takes as input a signed directed graph where the links represent trust or distrust relationships between users, and analyzes the graph structure to compute a reputation for any user from the point of view of any other user.

There are a few interesting things about Pariah; we treat reputation as inherently subjective (you can have a good reputation from one user’s point of view, and a bad reputation from someone elses), we have a sensible interpretation of negative reputation, and our system is resistant to ballot-stuffing attacks.

Pariah is written in Haskell, and has a REST interface implemented using Yesod.

An interesting offshoot of our reputation system work is a demo site called Polink.org, which is a collaborative tool for documenting all the little connections (whether positive or negative) between public figures, organizations, corporations, etc…It is built on top of Acid-state and Yesod, with a little bit of javascript to query Pariah and visually display reputations of entities.

Pariah is commercial software. The software behind Polink.org is available under the GPLv2 license, and is available on github.

Currently, we’re trying to put together a paper describing the algorithm we use.

### 8.8  Haskell in the industry in Munich

Haskell is used by several companies specializing in the development of reliable software and hardware, for example for the automotive industry in Munich. It is also in use by the developers of medical software which needs assure the integrity of data processing algorithms. It is also used by new media and internet companies. You may contact the author of this report (<haskell.consultancy at gmail.com>) for details.

Google is using Haskell in Ganeti (http://code.google.com/p/ganeti/), a tool for managing clusters of virtual servers built on top of Xen and KVM. There is a mailing list (http://groups.google.com/group/ganeti) which is the official contact to the team.

There are lots of presentations about Ganeti online (http://downloads.ganeti.org/presentations/), and some of them are accompanied by videos to be found with a quick search on the internet.

#### Energy Flow Analysis – Ingenieurbüro Guttenberg & Hördegen

The Engineering Office provides services and tools to companies designing and operating smart systems with energy management: Smart Grids, Smart Houses, Smart Production, and so on. Smart systems are complex: efficiency is only one aspect in a challenging system design. We want to make measurement and optimisation of overall system efficiency as comfortable and easy as possible. The objective is to provide support in choosing between system functionality, performance, safety, and reliability as well as energy efficiency. We provide a support service for the whole development chain, starting with specification, through system design and simulation to system implementation and validation. The advantage of our approach is that we can directly model, investigate and optimise energy flow. This opens new possibilities, such as better optimisation of efficiency, operation, and design for local grids containing electrochemical storage, thermal storage, heat pumps, block heat and power units and so on.

Since it combines good performance and parallelization features while providing a very high level of assurance, we have chosen to execute our technology with Haskell.

#### Informatik Consulting Systems AG

ICS AG (http://ics-ag.de), with 11 offices in Germany, use Haskell for their software, as it is a good fit for their domain, which is simulation, safety, and business-critical systems. It affords ICS a competitive edge over the market. Industries ICS work with include advanced technologies, automotive, industrial solutions, and transportation and they have an impressive list of customers (http://ics-ag.de/kunden.html).

The author of this report runs a Haskell consultancy. Established in 2008, the business provides full-stack support for industries ranging from finance and media to medical and electronics design and automation, with a permanent focus on functional programming. We have a strong background in statistics and operations research. The current trend in the industry is the migration of monolithic legacy software in C, C#, Python, Java, or PHP towards a functional, service-oriented architecture, with on-site training of personnel in the new programming paradigm. Another trend is design of hard realtime applications for industrial use. Further information can be requested via email (<haskell.consultancy at gmail.com>).

#### Funktionale Programmierung – Dr. Heinrich Hördegen

Funktionale Programmierung - Dr. Heinrich Hördegen (http://funktional.info) is a Haskell and functional programming software consultancy located in Munich.

Dr. Hördegen has a lot of experience in software engineering and has been an advocate of functional programming since 2005. It follows that during his doctoral thesis at the LORIA (http://www.loria.fr) he was able to design and implement compiler modules for the AVISPA project (http://www.avispa-project.org/) using OCaml.

Dr. Hördegen has been using Haskell as his main technology to implement robust and reliable software since 2009. In his role co-founder and CTO of Ingenieurbüro Guttenberg & Hördegen (http://www.energiefluss.info) he leads the development of proprietary software for energy flow analysis. This complex system is comprised of 50000 lines of code, distributed into 130 modules.

Some of Dr. Hördegen’s favourite things about Haskell are algebraic data types, which simplify symbolic computation, the amazing speed Haskell can provide during number crunching, the powerful parallelization capabilities Haskell provides, and finally Cloud Haskell, which lets you easily distribute computations onto whole clusters.

#### codecentric AG

Here at codecentric (https://www.codecentric.de/), we believe that more than ever it’s important to keep our tools sharp in order to provide real value to our customers. The best way to do this is to provide software expertise and an environment in which people can freely express their ideas and develop their skills. One of the results is codecentric Data Lab, where mathematicians, data scientists and software developers join forces to live up to the big data hype. Another is the Functional Institute (http://clojureworkshop.com/), which helps to spread the word about functional programming with Clojure and Haskell.

We provide services in functional programming in Clojure and Haskell as well as services for Big Data projects, ranging from project support and knowledge sharing to bespoke software development and project management. We are over 200 employees strong in 10 offices around Germany and Europe. You may contact Alex Petrov (<alex.petrov at codecentric.de>) with any enquiries.

### 8.9  Better

 Report by: Carl Baatz

Better provides a platform for delivering adaptive online training to students and employees.

Companies and universities work with us to develop courses which are capable of adapting to individual learners. This adaptivity is based on evidence we collect about the learner’s understanding of the course material (primarily by means of frequent light-weight assessments). These courses run on our platform, which exposes a (mobile-compatible) web interface to learners. The platform also generates course statistics so that managers/teachers can monitor the progress of the class taking the course and evaluate its effectiveness.

The backend is entirely written in Haskell. We use the snap web framework and we have a storage layer written on top of postgres-simple which abstracts data retrieval, modification, and versioning. The choice of language has worked out well for us: as well as the joy of writing Haskell for a living, we get straightforward deployment and extensive server monitoring courtesy of ekg. Using GHC’s profiling capabilities, we have also managed to squeeze some impressive performance out of our deployment.

The application-specific logic is all written in Haskell, as is most of the view layer. As much rendering as possible is performed on the backend using blaze-html, and the results are sent to a fairly thin single-page web application written in Typescript (which, while not perfect, brings some invaluable static analysis to our front-end codebase).

The company is based in Zurich, and the majority of the engineering team are Haskellers. We enjoy a high level of involvement with the Zurich Haskell community and are delighted to be able to host the monthly HaskellerZ user group meetups and the yearly ZuriHac hackathon.

### 8.10  Keera Studios LTD

 Report by: Ivan Perez

Keera Studios Ltd. is a game development company currently working on Android games using Haskell. We have recently shown a breakout-like game running on an Android tablet at a competitive speed. New improvements, just announced on our blog, have nearly duplicated the rendering and the simulation speed, bringing both up to more than sufficient levels for commercial games and making Haskell a truly viable option for professional Android development.

The game used internally for testing is implemented using the Arrowized Functional Reactive Programming Domain-Specific Language Yampa, and relies on SDL2 for multimedia. This game is being heavily improved and will be released on the Android market. The desktop version of the game, which is almost the same as the Android version, already includes Wiimote and Kinect support.

We have also developed a DSL for graphic adventures, together with an engine and a basic IDE that allows non-programmers to create their own 2D graphic adventure games without any knowledge of programming. Supported features include multiple character states and animations, multiple scenes and layers, movement bitmasks (used for automatic shortest-path calculation), luggage, conversations, sound effects, background music, and a customizable UI. The IDE takes care of asset management, locating all the necessary assets and generating a fully portable game with all the necessary files. The engine is multiplatform, working seamlessly on Linux and Windows. An early version targeting Flash was created in HaXe, but given the possibility of targeting Android (and iPhone) instead, the future direction will be to add support for mobile platforms. The engine has just been updated from SDL 1.2 to SDL 2, and the next step will be testing on Android. Once this last stage is completed and any existing problems have been fixed, it will be added to Gale IDE as one of the officially supported target platfoms.

### 8.11  plaimi

 Report by: Alexander Berntsen

plaimi are an omnium-gatherum of researchers from Norway that are trying to solve time using Haskell. Presently, our energy is focused on tempuhs and tempuhs-server – collectively referred to as simply tempuhs. See the tempuhs entry (→7.13.9) for more details.

Haskell is the primary language used at plaimi. We use it for all our currently active development projects. Our development computers and servers all use Gentoo Linux, and consequently Gentoo-Haskell. We contribute back to the Haskell and Gentoo ecosystems, and have upstream patches for many of the libraries and tools that we use. One of the researchers at plaimi is on the Gentoo development team, and has contributed to both Gentoo-Haskell and the package manager it uses, Portage.

Our website is https://secure.plaimi.net/. Contact information may be obtained there. We are looking to hire Haskellers that are willing to relocate to Norway! We’d also love to hear from anyone that has questions, ideas or patches for our projects.

## 9  Research and User Groups

### 9.1  Haskell at Eötvös Lorand University (ELTE), Budapest

 Report by: PALI Gabor Janos Status: ongoing

#### Education

There are many different courses on Haskell that run at Eötvös Lorand University, Faculty of Informatics. Currently, we are offering the following courses with Haskell:

• Functional programming for first-year Hungarian undergraduates as part of the official curriculum. It is also taught for foreign-language students as part of their program.

• An additional semester on functional programming with Haskell, where many of the advanced concepts are featured. This is an optional course for Hungarian undergraduate and master’s students, supported by the Eotvos Jozsef Collegium.

• Advanced functional programming for Hungarian and foreign-language master’s students in Software Technology, supported by the fund TAMOP-4.1.2.A/1-11/1-2011-0052. The curriculum features discussion of parallel and concurrent programming, property-based testing, purely functional data structures, efficient I/O implementations, embedded domain-specific languages.

Another Haskell-related course is Type Systems of Programming Languages, taught for Hungarian master’s students in Software Technology. This course gives a more formal introduction to the basics and mechanics of type systems applied in many statically-typed functional languages.

There is an interactive online evaluation and testing system, called ActiveHs. It contains several dozens of systematized exercises and it may be also used as a teaching aid. Some of our course materials are available there in English as well.

Due to its great success, we have started our homebrew online assignment management system, bead for the second semester in this September. The bead system is implemented almost entirely in Haskell, using the Snap web framework and Fay. Its goal to help the lecturers with scheduling course assignments and tests, and it can automatically check the submitted solutions as an option. It currently has over 750 users and provides support for 11 courses at the department. This is still in an alpha status yet so it is not available on Hackage as of yet, only on GitHub, but so far it has been performing well, especially in combination with ActiveHs.

### 9.2  Artificial Intelligence and Software Technology at Goethe-University Frankfurt

 Report by: David Sabel Participants: Conrad Rau, Manfred Schmidt-Schauß

Semantics of Functional Programming Languages. Extended call-by-need lambda calculi model the semantics of Haskell. We are interested in analyzing the semantics of those calculi, where we focus on the correctness of program analyses and program transformations. Results of this long-standing research include the correctness of strictness analysis by abstract reduction, results on the equivalence of the call-by-name and call-by-need semantics, correctness of program transformations w.r.t. contextual equivalence.

We established theoretical results like completeness of applicative bisimilarity w.r.t. contextual equivalence, and unsoundness of applicative bisimilarity in nondeterministic languages with letrec. A further result is that any semantic investigation of Haskell should include the seq-operator, since extending the lazy lambda calculus by seq is not conservative, i.e. the semantics changes. A recent result is an analysis of a polymorphically typed core language of Haskell which uses System F-polymorphism.

We also develop practical tools to show correctness of program transformation automatically. The underlying method is syntax-oriented and computes so-called forking and commuting diagrams by a combination of several unification algorithms which are implemented in Haskell. Also automated termination provers for term rewrite systems are used in a part of the automation. Future research goals are to automate correctness proofs of program translations as they can be found during compilation of programs.

Another result is that deciding (extended) alpha-equivalence in languages with bindings (like letrec) is graph isomorphism complete. However, if the expressions are free of garbage (i.e. have no unused bindings) the problem can be solved efficiently.

Concurrency. We analyzed a higher-order functional language with concurrent threads, monadic IO, synchronizing variables and concurrent futures which models Concurrent Haskell. We proved correctness of program transformations, correctness of an abstract machine, and we proved that this language conservatively extends the pure core language of Haskell. Recently, we proved correctness of a highly concurrent implementation of Software Transactional Memory (STM) in a similar program calculus. Based on these result we recently developed an alternative implementation of STM Haskell which performs quite early conflict detection.

Grammar based compression. This research topic focuses on algorithms on grammar compressed data like strings, matrices, and terms. Our goal is to reconstruct known algorithms on uncompressed data for their use on grammars without prior decompression. We implemented several of those algorithms as a Haskell library. Recently, we added an efficient algorithm for fully compressed pattern matching of to our library.

### 9.3  Functional Programming at the University of Kent

 Report by: Olaf Chitil

The Functional Programming group at Kent is a subgroup of the Programming Languages and Systems Group of the School of Computing. We are a group of staff and students with shared interests in functional programming. While our work is not limited to Haskell, we use for example also Erlang and ML, Haskell provides a major focus and common language for teaching and research.

Our members pursue a variety of Haskell-related projects, several of which are reported in other sections of this report. Three new PhD students joined the group last September. Stephen Adams is working on advanced refactoring of Haskell programs. Andreas Reuleaux is working on refactoring dependently typed functional programs. Maarten Faddegon is working on making tracing for Haskell practical and easy to use. Currently he is looking into extending the Haskell object observation debugger Hood. He talks at TFP 2014 about Type Generic Observing (http://www.cs.uu.nl/wiki/TFP2014/PresentationSchedule). Kanae Tsushima, research fellow of the Japan Society for the Promotion of Science, visited from September 2013 to February 2014. She worked with Olaf Chitil on type error debugging and Kanae presented a joint paper “Enumerating Counter-Factual Type Error Messages with an Existing Type Checker” at PPL 2014. Earlier Olaf Chitil refactored/reimplemented Hat to use standard Hackage libraries. Scott Owens is working on verified compilers for the (strict) functional language CakeML.

We are always looking for more PhD students. We are particularly keen to recruit students interested in programming tools for verification, tracing, refactoring, type checking and any useful feedback for a programmer. The school and university have support for strong candidates: more details at http://www.cs.kent.ac.uk/pg or contact any of us individually by email.

We are also keen to attract researchers to Kent to work with us. There are many opportunities for research funding that could be taken up at Kent, as shown in the website http://www.kent.ac.uk/researchservices/sciences/fellowships/index.html. Please let us know if you’re interested in applying for one of these, and we’ll be happy to work with you on this.

Finally, if you would like to visit Kent, either to give a seminar if you’re passing through London or the UK, or to stay for a longer period, please let us know.

### 9.4  Formal Methods at DFKI and University Bremen and University Magdeburg

 Report by: Christian Maeder Participants: Mihai Codescu, Christoph Lüth, Till Mossakowski Status: active development

The activities of our groups center on formal methods, covering a variety of formal languages and also translations and heterogeneous combinations of these.

We are using the Glasgow Haskell Compiler and many of its extensions to develop the Heterogeneous tool set (Hets). Hets is a parsing, static analysis and proof management tool incorporating various provers and different specification languages, thus providing a tool for heterogeneous specifications. Logic translations are first-class citizens.

The languages supported by Hets include the CASL family, such as the Common Algebraic Specification Language (CASL) itself (which provides many-sorted first-order logic with partiality, subsorting and induction), HasCASL, CoCASL, CspCASL, and an extended modal logic based on CASL. Other languages supported include propositional logic, QBF, Isabelle, Maude, VSE, TPTP, THF, FPL (logic of functional programs), LF type theory and still Haskell (via Programatica). More recently, ontology languages like OWL, RDF, Common Logic, and DOL (the distributed Ontology, Model and Specification language) have been integrated.

Hets can speak to the following provers:

• minisat, zChaff (SAT solvers),
• SPASS, Vampire, Darwin, KRHyper and MathServe (automated first-order theorem provers),
• Pellet and Fact++ (description logic tableau provers),
• Leo-II and Satallax (automated higher-order theorem provers),
• Isabelle (an interactive higher-order theorem prover),
• CSPCASL-prover (an Isabelle-based prover for CspCASL),
• VSE (an interactive prover for dynamic logic).

The user interface of the Hets implementation (about 200K lines of Haskell code) is based on some Haskell sources such as bindings to uDrawGraph (formerly Davinci) and Tcl/TK that we maintain and also gtk2hs (→7.7.3). Additionally we have a command line interface and a prototypcial web interface based on warp (→5.2.2) with a RESTful API.

HasCASL is a general-purpose higher-order language which is in particular suited for the specification and development of functional programs; Hets also contains a translation from an executable HasCASL subset to Haskell. There is a prototypical translation of a subset of Haskell to Isabelle/HOL.

• Group activities overview:

• CASL specification language:

• DOL: the distributed Ontology, Model and Specification language

• Heterogeneous tool set:

 Report by: Mihai Maruseac

In Romania, Haskell is taught at several universities across the country: in Bucharest at both University POLITEHNICA of Bucharest and University of Bucharest, in Bacau at “Vasile Alecsandri” University, in Braçov at “Transilvania” University, …. However, everywhere the courses are only centered on the theoretical aspects of functional programming and (sometimes) type systems. As a result, very few students will use this language after the exam is taken.

However, small communities are created to promote the language. That was the case of the Ro/Haskell group from Bacau or FPBucharest group. Right now, almost all of these groups have stopped being active.

The main reason behind these failures is that the point of view in presenting the language is too deeply concerned with presenting its features and the purely functional aspect while hiding away the fact that you have to do some IO in real world applications. Basically, every activity of the previous groups and the subjects taught at universities regard Haskell only as a laboratory language.

A small group of people from Faculty of Automatic Control and Computers, University POLITEHNICA of Bucharest, decided last year to change that. The new teachers and teaching assistants from the Programming Paradigm course organised the first “Functional Programming Summer School” in June 2012 where a few real-world topics were presented among more theoretical aspects.

This year, a small subgroup of the ROSEdu (http://rosedu.org/) community developed on the feedback from the summer school and created a plan towards making Haskell a known and usable language with a community around it. There were talks on Yesod and GHC at different events (OSOM, Talks by Softbinator) or companies (IXIA), some new projects were launched – some of them being turned into bachelor or masters diploma projects – and an workshop called “Programming Haskell from N00b to Real World Programmer” was organized in June, during ROSEdu Summer Workshops (http://workshop.rosedu.org/2013/sesiuni/haskell). At the end of the workshop the students implemented IRC bots and Pacman-like games with a graphical interface and some dummy AI. Finally, some articles were published in the "Today Software Magazine" (http://www.todaysoftmag.com/tsm/en/) monthly magazine. This has prompted some Haskell-related hackathons at an byweekly Agile event called "Code and Beer".

But one of the major results of these activities is that the awareness of Haskell in Romanian communities has increased, leading to the launch of three small startup companies in Romanian towns.

### 9.6  fp-syd: Functional Programming in Sydney, Australia

 Report by: Erik de Castro Lopo Participants: Ben Lippmeier, Shane Stephens, and others

We are a seminar and social group for people in Sydney, Australia, interested in Functional Programming and related fields. Members of the group include users of Haskell, Ocaml, LISP, Scala, F#, Scheme and others. We have 10 meetings per year (Feb–Nov) and meet on the third (usually, sometimes fourth) Wednesday of each month. We regularly get 20–30 attendees, with a 70/30 industry/research split. Talks this year have included material on compilers, theorem proving, type systems, Haskell web programming, Haskell database libraries, Scala and the Free Monad. We usually have about 90 mins of talks, starting at 6:30pm, then go for drinks afterwards. All welcome.

### 9.7  Functional Programming at Chalmers

 Report by: Jean-Philippe Bernardy

Functional Programming is an important component of the CSE department at Chalmers and University of Gothenburg. In particular, Haskell has a very important place, as it is used as the vehicle for teaching and numerous research projects. Besides functional programming, language technology, and in particular domain specific languages is a common aspect in our projects. We have hosted ICFP 2014 in Gothenburg this September.

Property-based testing.QuickCheck, developed at Chalmers, is one of the standard tools for testing Haskell programs. It has been ported to Erlang and used by Ericsson, Quviq, and others. QuickCheck continues to be improved. Quickcheck-based tools and related techniques are currently being developed:

• We have shown how to successfully apply QuickCheck to test polymorphic properties.
• A new exhaustive testing tool (testing-feat on Hackage) has been developed. It is especially suited to generate test cases from large groups of mutually recursive syntax tree types. A paper describing it was presented at the Haskell Symposium 2012.
• Testing Type Class Laws: the specification of a class in Haskell often starts with stating, in comments, the laws that should be satisfied by methods defined in instances of the class, followed by the type of the methods of the class. We have developed a library (ClassLaws) that supports testing such class laws using QuickCheck.

Parsing: BNFC. The BNF Converter (BNFC) is a frontend for various parser generators in various languages. BNFC is written in Haskell and is commonly used as a frontend for the Haskell tools Alex and Happy. BNFC has recently been extended in two directions:

• A Haskell backend, which offers incremental and parallel parsing capabilities, as well as the ability to parse context-free grammars in full generality, has been added to BNFC. The underlying concepts are described in a paper published at ICFP 2013.
• BNFC has been embedded in a library (called BNFC-meta on Hackage) using Template-Haskell. An important aspect of BNFC-meta is that it automatically provides quasi-quotes for the specified language. This includes a powerful and flexible facility for anti-quotation.

Parsing: Combinators. A new package for combinator-based parsing has been released on Hackage. The combinators are based on the paper Parallel Parsing Processes. The technique is based on parsing in parallel all the possibly valid alternatives. This means that the parser never “hold onto” old input. A try combinator is also superfluous.

Parsing: Natural languages.Grammatical Framework is a declarative language for describing natural language grammars. It is useful in various applications ranging from natural language generation, parsing and translation to software localization. The framework provides a library of large coverage grammars for currently fifteen languages from which the developers could derive smaller grammars specific for the semantics of a particular application.

Generic Programming.Starting with Polytypic Programming in 1995 there is a long history of generic programming research at Chalmers. Recent developments include fundamental work on parametricity. This work has led to the development of a new kind of abstraction, to generalize notions of erasure. This means that a new kind of generic programming is available to the programmer. A paper describing the idea was presented in ICFP 2013.

Our research on generic-programming is lively, as witnessed by a constant stream of publications: Testing Type Class Laws, Functional Enumeration of Algebraic Types (FEAT), Testing versus proving in climate impact research and Dependently-typed programming in scientific computing — examples from economic modelling. The last two are part of our effort to contribute to the emerging research programme in Global Systems Science.

Program Inversion/bidirectionalization. Program transformation systems that generate pairs of programs that are some sort of inverses of each other. The pairs are guaranteed to be consistent by construction with respect to certain laws. Applications include pretty-printing/parsing ??, XML transformation etc. The work is done in collaboration with University of Tokyo and University of Bonn.

Language-based security.SecLib is a light-weight library to provide security policies for Haskell programs. The library provides means to preserve confidentiality of data (i.e., secret information is not leaked) as well as the ability to express intended releases of information known as declassification. Besides confidentiality policies, the library also supports another important aspect of security: integrity of data. SecLib provides an attractive, intuitive, and simple setting to explore the security policies needed by real programs.

Type theory.Type theory is strongly connected to functional programming research. Many dependently-typed programming languages and type-based proof assistants have been developed at Chalmers. The Agda system (→4.1) is the latest in this line, and is of particular interest to Haskell programmers. While today’s GHC incorporates much of the dependently-typed feature set, supporting plain old Haskell means a certain amount of clunkiness. Agda provides a cleaner language, while remaining close to Haskell syntax.

Embedded domain-specific languages.The functional programming group has developed several different domain-specific languages embedded in Haskell. The active ones are:

• Feldspar (→7.12.1) is a domain-specific language for digital signal processing (DSP).
• Obsidian is a language for data-parallel programming targeting GPUs. Most recently we used Obsidian to implement an interesting variation of counting sort that also removes duplicate elements. This work was presented at FHPC 2013.

We are also working on general methods for EDSL development:

• Syntactic is a library that aims to support the definition of EDSLs. The core of the library was presented at ICFP 2012. The paper presents a generic model of typed abstract syntax trees in Haskell, which can serve as a basis for a library supporting the implementation of deeply embedded DSLs.
• Names For Free. A new technique for representing names and bindings of object languages represented as Haskell data types has been developed. The essence of the technique is to represent names using typed de Bruijn indices. The type captures exactly the context where the index is valid, and hence is as safe to use as a name. The technique was presented at Haskell Symposium 2013. We are currently extending the technique to work for proofs as well as programs.
• Circular Higher-Order Syntax We have also developed a light-weight method for generating names while building an expression with binders. The method lends itself to be used in the front end of EDSLs based on higher-order syntax. The technique was presented at ICFP 2013.
• Simple and Compositional Monad Reification A method for reification of monads (compilation of monadic embedded languages) that is both simple and composable. The method was presented at ICFP 2013.

Automated reasoning.We are responsible for a suite of automated-reasoning tools:

• Equinox is an automated theorem prover for pure first-order logic with equality. Equinox actually implements a hierarchy of logics, realized as a stack of theorem provers that use abstraction 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 analysing 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.
• QuickSpec generates algebraic specifications for an API automatically, in the form of equations verified by random testing. http://www.cse.chalmers.se/~nicsma/quickspec.pdf
• Hip (the Haskell Inductive Prover) is a new tool to automatically prove properties about Haskell programs by using induction or co-induction. The approach taken is to compile Haskell programs to first order theories. Induction is applied on the meta level, and proof search is carried out by automated theorem provers for first order logic with equality.
• On top of Hip we built HipSpec, which automatically tries to find appropriate background lemmas for properties where only doing induction is too weak. It uses the translation and structural induction from Hip. The background lemmas are from the equational theories built by QuickSpec. Both the user-stated properties and those from QuickSpec are now tried to be proven with induction. Conjectures proved to be theorems are added to the theory as lemmas, to aid proving later properties which may require them. For more information, see http://web.student.chalmers.se/~danr/hipspec-atx.pdfthe draft paper.

Teaching.Haskell is present in the curriculum as early as the first year of the BSc programme. We have four courses solely dedicated to functional programming (of which three are MSc-level courses), but we also provide courses which use Haskell for teaching other aspects of computer science, such the syntax and semantics of programming languages, compiler construction, data structures and parallel programming.

### 9.8  Functional Programming at KU

 Report by: Andy Gill Status: ongoing

Functional Programming continues at KU and the Computer Systems Design Laboratory in ITTC! The System Level Design Group (lead by Perry Alexander) and the Functional Programming Group (lead by Andy Gill) together form the core functional programming initiative at KU. There are three major Haskell projects at KU (as well as numerous smaller ones): the GHC rewrite plugin HERMIT (→7.3.4), the VHDL generator Kansas Lava (→7.12.2) and the JavaScript generator Sunroof (→5.2.7).

 Report by: Andres Löh

Since autumn 2014 Haskellers in Regensburg, Bavaria, Germany have been meeting roughly once per month to socialize and discuss Haskell-related topics.

Haskell beginners and experts are equally welcome. Meetings are announced on our meetup page: http://www.meetup.com/Regensburg-Haskell-Meetup/.

### 9.10  Haskell in the Munich Area

Haskell is widely used as an educational tool for both teaching students in computer science as well as for teaching industry programmers transitioning to functional programming. It is very well suited for that and there is a huge educational body present in Munich.

#### Haskell at the Technische Universität München (Technical University Munich)

Haskell is taught at the Fakultät für Informatik (Department of Computer Science). Functional programming is mandatory in the second year of the Bachelor degree for Computer Science as well as Information Systems. During this and last winter semester, Prof. Nipkow used Haskell for the course, called Introduction to Computer Science 2 (http://www21.in.tum.de/teaching/info2/WS1314/), which was previously taught using ML; the next semester will be Haskell as well. It is attended by about 500 students. The lecture is given by Prof. Tobias Nipkow, the tutorial is given by Lars Noschinski, Lars Hupel, and Jasmin Blanchette. The staff (<fp at fp.informatik.tu-muenchen.de>) may be contacted with any questions. There are several smaller courses where Haskell shows up, such as Programming Languages and various seminars. Jasmin Blanchette organizes an extracurricular programming competition which uses Haskell and receives notable attendance from the students (http://www21.in.tum.de/teaching/info2/WS1314/wettbewerb.html).

Notably, Lars Hupel is known as the maintainer of scalaz (http://github.com/scalaz/scalaz).

#### Haskell at the Ludwig-Maximilians-Universität, Munich

Following a limited test run last year which included 12 people, the Institut für Informatik (Institute for Computer Science) has switched their Programming and Modelling (http://www.tcs.ifi.lmu.de/lehre/ss-2014/promo) course from ML to Haskell. It runs during the summer semester and is frequented by 688 students. It is a mandatory course for Computer Science and Media Information Technology students as well as many students going for degrees related to computer science, e.g. Computer Linguistics (where lambda calculus is very important) or Mathematics. The course consists of a lecture and tutorial and is led by Prof. Dr. Martin Hofmann and Dr. Steffen Jost. It started on the 7th April, 2014. It is expected that 450 students will complete the course. Notably, the course is televised and is accessible at the LMU portal for Programming and Modelling (https://videoonline.edu.lmu.de/de/sommersemester-2014/5032).

Haskell is also used in Advanced Functional Programming (https://www.tcs.ifi.lmu.de/lehre/ss-2012/fun) which runs during the winter semester and is attended by 20-30 students. It is mandatory for Computer Science as well as Media Information Technology students.

Neither of these courses has any entry requirements, and you may enter the university during the summer semester, which makes them very accessible.

Any questions may be directed to Dr. Steffen Jost (<jost at tcs.ifi.lmu.de>).

#### Haskell at the Hochschule für angewandte Wissenschaften München (Academy for applied sciences Munich)

Haskell is taught in two courses at the College: Functional Programming and Compiler Design. Both courses consist of lectures and labs. Prof. Dr. Oliver Braun has brought Haskell to the school and has been using it during the last year for both courses; before that he taught Haskell at FH Schmalkalden Thüringen (http://www.fh-schmalkalden.de/) for 3.5 years.

Compiler Design (http://ob.cs.hm.edu/lectures/compiler) is a compulsory course taught, depending on the group, using Haskell, Scheme, or Java. The Haskell version is frequented by over 40 students. Part of the note depends on a compiler authored in Haskell.

Functional Programming (http://ob.cs.hm.edu/lectures/fun) is a new, non-compulsory course attended by 20 students, taught with Haskell. The grade depends among others on an exam in Haskell knowledge and a project authored in Haskell with the Yesod web framework. It is taught with Learn You a Haskell and teaches practical skills such as Cabal, Haddock, QuickCheck, HUnit, Git, and Yesod. The school department’s website itself is in Snap.

Dr. Oliver Braun has started using Haskell in 1997, when it became the first programming language he’s used during his studies. He has later used Haskell during his thesis and afterwards his dissertation. He finds Haskell great for teaching. Oliver Braun can be reached via email (<ob at cs.hm.edu>).

#### Haskell as a teaching tool in the industry

Haskell is used in Munich to teach functional programming to industrial programmers. Since it uses the same basic programming model, it can also be used as a simple learning tool to introduce people to Scala. That is because both are based on System F and Haskell has a very clean, minimal implementation of it. It has been successfully used to teach a team of 10 PHP programmers the basics of functional programming and Scala and, together with other educational tools, get them up and running within a couple months, during which time the team remained productive. This approach makes it easy for companies to switch from the likes of PHP, Java, .NET, or C#to functional programming (Haskell, Scala, Clojure). At the same time the project switched to SOA (service oriented architecture) using the Twitter scala libraries. Having understood the basics of FP in Haskell, the team could easily move onto the more complicated task of understanding the more unique and intricate parts of Scala that correspond to extensions to System F while being able to understand Scala’s syntax. You may contact the author of this report (<haskell.consultancy at gmail.com>) for details.

There are several meetups dedicated to Haskell in Munich. The organizers have initiated cooperation in order to build and support the local community, as well as the community in Germany. There is something related to Haskell happening every week.

The organizers would like to establish contact with other Haskell communities in Germany as well as the whole world. You may write to the Haskell Hackathon organizer (<haskell.hackathon at gmail.com>). As of 2014, it is known that there is Haskell activity in Berlin, Cologne (Köln), Düsseldorf, Frankfurt am Main, Halle, Hamburg, and Stuttgart, as well as in Austria, Switzerland and the Czech Republic. If you’re from one of those communities, please write us! The Munich community welcomes any new connections from other locations.

The community receives notable guests, such as:

• Reinhard Zumkeller, one of the regular contributors to the OEIS. Reinhard likes to use Haskell for work with integer sequences.
• Lars R. Hupel, the maintainer of scalaz. Lars teaches with Haskell at the local university and enjoys advanced topics in type systems and category theory.
• Andres Löh, co-founder of Well-Typed LLP. Andres always brings up very practical discussions on the use of Haskell. For example, he has recently held a presentation on the Par monad.
• Heiko Seeberger from . Heiko is interested in all sorts of functional programming and loves Haskell for its simplicity and consistency.
• many others which the author of this report could not reach for comment before the publication due to time constraints.

The community is very lively and there are many initiatives being worked on. For example, actively popularizing Haskell in the local industry, creating a network of companies, programmers, and informational events. The author of this report may be reached for more information (<haskell.consultancy at gmail.com>).

The Haskell Hackathon is a small meeting for people who would like to build their Haskell skillset. People bring their laptops and work on one of the proposed topics together, sharing experience and teaching each other. Topics range from very easy (if you don’t know Haskell, you may come and the organizer will teach you the basics one on one) through intermediate (how to best set up the dev env, how to read the papers, how to use important libraries) to very advanced (free applicatives, comonads). Defocus is discouraged (subjects not related to Haskell are limited). The operating language is German but if you speak any other language you are welcome to join us.

The Hackathon is organized by the author of this report (<haskell.consultancy at gmail.com>) and is currently in its second year. It is frequented by the staff and students of the local universities, industry programmers, as well as Haskell enthusiasts. You may contact the Hackathon with any questions via email (<haskell.hackathon at gmail.com>).

We keep track of ideas we would like to explore during the Haskell Hackathon (http://haskell-hackathon.no-ip.org/ideen.html). Any and all new questions are welcome!

The Haskell Meetup, also called Haskell Stammtisch (which directly translates to: Haskell regulars table) is a social event for the Haskell community. It is the original Haskell event in Munich. Everyone is welcome (even non-Haskell programmers!). It happens once a month, usually at Cafe Puck which is a pub in one of the cooler parts of Munich, where the members can eat schnitzel and drink beer while chatting about topics ranging from Haskell itself to abstract mathematics, industrial programming, and so on. The group is very welcoming and they make you feel right at home. The Meetup attracts between 15 and 20 guests and there’s a large proportion of regulars. Attendance ranges from students, through mathematicians (notably the OEIS has a presence), industry programmers, physicists, and engineers. The Meetup receives international guests and sometimes we hold lectures.

The Haskell Meetup, established 29th September 2011 by Heinrich Hördegen. It is sponsored by Funktionale Programmierung Dr. Heinrich Hördegen (http://funktional.info) and Energy Flow Analysis – Ingenieurbüro Guttenberg & Hördegen (http://www.energiefluss.info).

#### Munich Lambda

Munich Lambda (http://www.meetup.com/Munich-Lambda/) was founded on Jun 28, 2013 by Alex Petrov. There have been 12 events so far, on topics including Haskell, Clojure, and generally functional programming, as well as Emacs. Meetups on the topic of Haskell occur every month to two months.

Typically, the meetup begins with a short introductory round where the visitors can talk about their work or hobbies and grab some food (provided by sponsors), followed by couple of presentations, and topped off by an informal discussion of relevant topics and getting to know each other. It is a great opportunity to meet other likeminded people who like Haskell or would like to start out with it.

Munich Lambda is sponsored by codecentric (http://www.codecentric.de/) and StyleFruits (http://www.stylefruits.de).

#### Mailing lists in Munich

There are two mailing lists in use: https://lists.fs.lmu.de/mailman/listinfo/high-order-munich and http://mailman.common-lisp.net/cgi-bin/mailman/listinfo/munich-lisp.

The lists are used for event announcements as well as to continue discussions stemming from recent events. It is usually expected that anyone subscribed to one is also on the other, but conversations normally happen only on one or the other. There are 59 subscribers to high-order-munich.

#### ZuriHac 2014, Budapest Hackathon 2014, and the Munich Hackathon

There is a group of people going to ZuriHac 2014 (http://www.haskell.org/haskellwiki/ZuriHac2014). We are currently planning the logistics. If you would like to join us, you may write to the high-order-munich mailing list (https://lists.fs.lmu.de/mailman/listinfo/high-order-munich). Some people going to ZuriHac want to visit Munich first and will be received by the Munich community. There will be events during the week before ZuriHac. Boarding in Munich is inexpensive; the bus to Zurich is only 15 Euro and you may travel with a group of Haskell enthusiasts. There is a lot to see and visit in Munich. It is an easy travel destination as the Munich Airport has direct connections with most large airports in the world. Zurich is 312 kilometers (194 miles) away and no passport is necessary to travel from Munich to Zurich.

In addition, there is a group going to the Budapest Hackathon (http://www.haskell.org/haskellwiki/BudapestHackathon2014), which is a week before ZuriHac. To connect those two together, both geographically and in time, a Munich Lambda event is planned for the 4th of June in Munich. The travel is very cheap (the bus tickets from Budapest to Munich and from Munich to Zurich are on the order of 30 Euro). This way people can attend all three, completing what has been nicknamed the Haskell World Tour 2014. For more information you may contact the organizer of the Haskell Hackathon in Munich (<haskell.hackathon at gmail.com>). You may have fun, meet people from three huge Haskell communities, travel together, and see the world, all in one week!

#### Halle

There is a group of Haskell members going to HaL-9 in Halle (http://www.haskell.org/pipermail/haskell/2014-March/024115.html), which is 439 kilometers (273 miles) away. Henning Thielemann (<schlepptop at henning-thielemann.de>), the event organizer, is in charge of car pooling for visitors coming from all locations.