86
Haskell Communities and Activities Report http://tinyurl.com/haskcar Twenty-Seventh Edition — November 2014 Mihai Maruseac, Alejandro Serrano Mena (eds.) Andreas Abel Alexander Granin Heinrich Apfelmus Emil Axelsson Carl Baatz Doug Beardsley Jean-Philippe Bernardy Alexander Berntsen Jeroen Bransen Joachim Breitner Erik de Castro Lopo Lucas DiCioccio Roman Cheplyaka Olaf Chitil Alberto Gómez Corona Duncan Coutts Atze Dijkstra Péter Diviánszky Corentin Dupont Richard Eisenberg Andrew Farmer Dennis Felsing Julian Fleischer Michal J. Gajda Andrew Gibiansky Brett G. Giles Andy Gill Jurriaan Hage Greg Hale Bastiaan Heeren Sylvain Henry Lars Hupel PÁLI Gábor János Bob Ippolito Philipp Kant Robin KAY Anton Kholomiov Ian-Woo Kim Oleg Kiselyov Edward Kmett Eric Kow Nickolay Kudasov Ben Lippmeier Andres Löh Rita Loogen Boris Lykah Ian Lynagh Christian Maeder José Pedro Magalhães Ketil Malde Mihai Maruseac Dino Morelli JP Moresmau Ben Moseley Natalia Muska Tom Nielsen Rishiyur Nikhil Kiwamu Okabe Ivan Perez Jens Petersen Haskell Consultancy Munich Simon Peyton Jones Jeffrey Rosenbluth Ian Ross David Sabel Martijn Schrage Austin Seipp Carter Tazio Schonwald Jeremy Shaw Christian Höner zu Siederdissen Gideon Sireling Jim Snow Michael Snoyman Andrei Soare Kyle Marek-Spartz Doaitse Swierstra Henk-Jan van Tuyl Bernhard Urban Alessio Valentini Adam Vogt Daniel Wagner Greg Weber Kazu Yamamoto Edward Z. Yang Brent Yorgey Alan Zimmerman

Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

Haskell Communities and Activities Reporthttp://tinyurl.com/haskcar

Twenty-Seventh Edition — November 2014

Mihai Maruseac, Alejandro Serrano Mena (eds.)

Andreas Abel Alexander Granin Heinrich ApfelmusEmil Axelsson Carl Baatz Doug Beardsley

Jean-Philippe Bernardy Alexander Berntsen Jeroen BransenJoachim Breitner Erik de Castro Lopo Lucas DiCioccioRoman Cheplyaka Olaf Chitil Alberto Gómez CoronaDuncan Coutts Atze Dijkstra Péter DiviánszkyCorentin Dupont Richard Eisenberg Andrew FarmerDennis Felsing Julian Fleischer Michal J. Gajda

Andrew Gibiansky Brett G. Giles Andy GillJurriaan Hage Greg Hale Bastiaan HeerenSylvain Henry Lars Hupel PÁLI Gábor JánosBob Ippolito Philipp Kant Robin KAY

Anton Kholomiov Ian-Woo Kim Oleg KiselyovEdward Kmett Eric Kow Nickolay KudasovBen Lippmeier Andres Löh Rita LoogenBoris Lykah Ian Lynagh Christian Maeder

José Pedro Magalhães Ketil Malde Mihai MaruseacDino Morelli JP Moresmau Ben MoseleyNatalia Muska Tom Nielsen Rishiyur NikhilKiwamu Okabe Ivan Perez Jens Petersen

Haskell Consultancy Munich Simon Peyton Jones Jeffrey RosenbluthIan Ross David Sabel Martijn Schrage

Austin Seipp Carter Tazio Schonwald Jeremy ShawChristian Höner zu Siederdissen Gideon Sireling Jim Snow

Michael Snoyman Andrei Soare Kyle Marek-SpartzDoaitse Swierstra Henk-Jan van Tuyl Bernhard UrbanAlessio Valentini Adam Vogt Daniel Wagner

Greg Weber Kazu Yamamoto Edward Z. YangBrent Yorgey Alan Zimmerman

Page 2: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

Preface

This is the 27th edition of the Haskell Communities and Activities Report. As usual, freshentries – either completely new or old entries which have been revived after a short temporarilydisappearance – are formatted using a blue background, while updated entries have a headerwith a blue background. Entries on which no new activity has been reported for a year or longerhave been dropped completely. Please do revive such entries next time if you do have news onthem.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 generationpipeline. In that case, we might issue a call to update old entries which have been completelyremoved 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, USAlejandro Serrano Mena, Utrecht University, Netherlands〈[email protected]

2

Page 3: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

Contents

1 Community 41.1 Haskellers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 Books, Articles, Tutorials 52.1 The Monad.Reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2 Oleg’s Mini Tutorials and Assorted Small Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.3 Agda Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.4 School of Haskell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3 Implementations 73.1 The Glasgow Haskell Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73.2 Ajhc Haskell Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.3 The Helium Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103.4 UHC, Utrecht Haskell Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103.5 Specific Platforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103.5.1 Haskell on FreeBSD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103.5.2 Debian Haskell Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.5.3 Fedora Haskell SIG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

4 Related Languages and Language Design 134.1 Agda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134.2 MiniAgda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134.3 Disciple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134.4 Ermine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

5 Haskell and . . . 155.1 Haskell and Parallelism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155.1.1 Eden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155.1.2 speculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165.2 Haskell and the Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165.2.1 WAI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165.2.2 Warp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165.2.3 Happstack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175.2.4 Mighttpd2 — Yet another Web Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175.2.5 Yesod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185.2.6 Snap Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195.2.7 Sunroof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195.2.8 MFlow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195.2.9 Scotty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205.3 Haskell and Compiler Writing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215.3.1 MateVM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215.3.2 UUAG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215.3.3 LQPL — A Quantum Programming Language Compiler and Emulator . . . . . . . . . . . . . . . . 225.3.4 free — Free Monads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235.3.5 bound — Making De Bruijn Succ Less . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

6 Development Tools 246.1 Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246.1.1 Haskell IDE From FP Complete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246.1.2 EclipseFP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246.1.3 ghc-mod — Happy Haskell Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256.1.4 HaRe — The Haskell Refactorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

3

Page 4: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

6.1.5 IHaskell: Haskell for Interactive Computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266.2 Code Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276.2.1 Darcs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276.2.2 DarcsWatch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276.2.3 cab — A Maintenance Command of Haskell Cabal Packages . . . . . . . . . . . . . . . . . . . . . . 276.3 Interfacing to other Languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286.3.1 java-bridge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286.3.2 fficxx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286.4 Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296.4.1 Cabal and Hackage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296.4.2 Stackage: the Library Dependency Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306.4.3 Haskell Cloud . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306.5 Others . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316.5.1 lhs2TEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316.5.2 ghc-heap-view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316.5.3 ghc-vis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316.5.4 Hat — the Haskell Tracer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326.5.5 Tasty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326.5.6 Automatic type inference from JSON . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

7 Libraries, Applications, Projects 347.1 Language Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347.1.1 Conduit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347.1.2 lens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347.1.3 folds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357.1.4 machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357.1.5 exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357.1.6 tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357.1.7 Faking even more dependent types! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367.1.8 Type checking units-of-measure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367.1.9 Dependent Haskell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367.2 Education . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377.2.1 Exercism: crowd-sourced code reviews on daily practice problems . . . . . . . . . . . . . . . . . . . 377.2.2 Talentbuddy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377.2.3 Holmes, Plagiarism Detection for Haskell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377.2.4 Interactive Domain Reasoners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387.3 Parsing and Transforming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397.3.1 epub-metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397.3.2 Utrecht Parser Combinator Library: uu-parsinglib . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397.3.3 Grammar Products, Set Grammars, and Automatic Outside Grammars . . . . . . . . . . . . . . . . 407.3.4 HERMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417.3.5 parsers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417.3.6 trifecta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427.4 Generic and Type-Level Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427.4.1 Optimising Generic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427.4.2 constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427.5 Mathematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427.5.1 Rlang-QQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427.5.2 order-statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437.5.3 Eliminating Redundancies in Linear Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437.5.4 linear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437.5.5 algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437.5.6 semigroups and semigroupoids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447.5.7 Arithmetics packages (Edward Kmett) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447.5.8 ad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447.5.9 integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457.5.10 categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457.5.11 contravariant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

4

Page 5: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

7.5.12 bifunctors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457.5.13 profunctors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457.5.14 comonad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467.5.15 recursion-schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467.5.16 kan-extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467.5.17 arb-fft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467.5.18 hblas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477.5.19 HROOT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477.5.20 Numerical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487.6 Data Types and Data Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487.6.1 HList — A Library for Typed Heterogeneous Collections . . . . . . . . . . . . . . . . . . . . . . . . 487.6.2 Persistent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487.6.3 Groundhog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497.6.4 reflection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497.6.5 tag-bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497.6.6 hyperloglog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507.6.7 concurrent-supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507.6.8 hybrid-vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507.6.9 lca . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507.6.10 heaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507.6.11 sparse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517.6.12 compressed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517.6.13 charset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517.6.14 Convenience types (Edward Kmett) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517.7 User Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517.7.1 HsQML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517.7.2 LGtk: Lens GUI Toolkit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527.7.3 Gtk2Hs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527.7.4 Haskell-EFL binding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537.7.5 wxHaskell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537.7.6 threepenny-gui . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537.7.7 reactive-banana . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547.8 Graphics and Audio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557.8.1 diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557.8.2 csound-expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567.8.3 Chordify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577.8.4 Glome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577.9 Text and Markup Languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587.9.1 epub-tools (Command-line epub Utilities) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587.9.2 lens-aeson . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597.9.3 hyphenation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597.10 Natural Language Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597.10.1 NLP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597.10.2 GenI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607.11 Bioinformatics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607.11.1 ADPfusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607.11.2 Ab-initio electronic structure in Haskell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617.11.3 Semi-Classical Molecular Dynamics in Haskell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627.11.4 Biohaskell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637.11.5 arte-ephys: Real-time electrophysiology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637.12 Embedding DSLs for Low-Level Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647.12.1 Feldspar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647.12.2 Kansas Lava . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647.13 Others . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647.13.1 General framework for multi-agent systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647.13.2 ersatz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647.13.3 arbtt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657.13.4 Hoodle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

5

Page 6: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

7.13.5 Reffit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667.13.6 Laborantin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667.13.7 The Amoeba-World game project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667.13.8 Nomyx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677.13.9 tempuhs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

8 Commercial Users 698.1 Well-Typed LLP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698.2 Bluespec Tools for Design of Complex Chips and Hardware Accelerators . . . . . . . . . . . . . . . . 698.3 Industrial Haskell Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 708.4 Barclays Capital . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 708.5 Oblomov Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718.6 OpenBrain Ltd. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718.7 Pariah Reputation System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718.8 Haskell in the industry in Munich . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 728.9 Better . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 738.10 Keera Studios LTD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 738.11 plaimi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

9 Research and User Groups 759.1 Haskell at Eötvös Loránd University (ELTE), Budapest . . . . . . . . . . . . . . . . . . . . . . . . . . 759.2 Artificial Intelligence and Software Technology at Goethe-University Frankfurt . . . . . . . . . . . . . 759.3 Functional Programming at the University of Kent . . . . . . . . . . . . . . . . . . . . . . . . . . . . 769.4 Formal Methods at DFKI and University Bremen and University Magdeburg . . . . . . . . . . . . . . 779.5 Haskell in Romania . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 779.6 fp-syd: Functional Programming in Sydney, Australia . . . . . . . . . . . . . . . . . . . . . . . . . . . 789.7 Functional Programming at Chalmers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789.8 Functional Programming at KU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 809.9 Regensburg Haskell Meetup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 809.10 Haskell in the Munich Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 809.11 HaskellMN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83

6

Page 7: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

1 Community

1.1 Haskellers

Report by: Michael SnoymanStatus: experimental

Haskellers is a site designed to promote Haskell as alanguage for use in the real world by being a centralmeeting place for the myriad talented Haskell develop-ers out there. It allows users to create profiles completewith skill sets and packages authored and gives employ-ers a central place to find Haskell professionals.Haskellers is a web site in maintenance mode. No

new features are being added, though the site remainsactive with many new accounts and job postings con-tinuing. If you have specific feature requests, feel freeto send them in (especially with pull requests!).Haskellers remains a site intended for all members

of the Haskell community, from professionals with 15years experience to people just getting into the lan-guage.

Further reading

http://www.haskellers.com/

7

Page 8: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

2 Books, Articles, Tutorials

2.1 The Monad.Reader

Report by: Edward Z. Yang

There are many academic papers about Haskell andmany informative pages on the HaskellWiki. Unfortu-nately, there is not much between the two extremes.That is where The Monad.Reader tries to fit in: moreformal than a wiki page, but more casual than a journalarticle.There are plenty of interesting ideas that might not

warrant an academic publication—but that does notmean these ideas are not worth writing about! Com-municating ideas to a wide audience is much more im-portant than concealing them in some esoteric journal.Even if it has all been done before in the Journal ofImpossibly Complicated Theoretical Stuff, explaininga neat idea about “warm fuzzy things” to the rest ofus can still be plain fun.The Monad.Reader is also a great place to write

about a tool or application that deserves more atten-tion. Most programmers do not enjoy writing manuals;writing a tutorial for The Monad.Reader, however, isan excellent way to put your code in the limelight andreach 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-completeproblems with monoids.

Further reading

http://themonadreader.wordpress.com/

2.2 Oleg’s Mini Tutorials andAssorted Small Projects

Report by: Oleg Kiselyov

The collection of various Haskell mini tutorials andassorted small projects (http://okmij.org/ftp/Haskell/)has received three additions:

Zipper from any Traversable

Zipper is a functional cursor into a data structure. Itlets us navigate to and change, without mutation, anitem deeply buried in a tree or a nested record. Theresult is a new data structure, sharing much of its com-ponents with the old one. Zipper for a data structureD is itself a data structure D′, derived (almost in thecalculus sense) from D. This zipper-as-datatype view

was the original presentation, described by Huet (JFP,1997) and Hinze and Jeuring (JFP 2001); the datastructure derivative was expounded by McBride.We advocate a different view, emphasizing not the

result of navigating through a data structure to a de-sired item and extracting it, but the process of naviga-tion. Whereas datatype-derivative zipper necessarilydepends on the data type (different data types havedifferent derivatives), our “suspended-walk” zipper isdatatype-invariant. Our approach works genericallynot only for (generalized) algebraic data types but alsofor abstract types (whose structure is hidden) and fortypes that are not data types at all. All is needed isto 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 illustratesthe process on a concrete example.Read the tutorial online.

Undelimited continuations are not functions

We alert to the misconception of explicit, or first-class,undelimited continuations as ordinary functions. Theconfusion is wide-spread, for example, in the descrip-tion and the code for the Cont monad in Haskell’smonad transformer libraries. We argue for a bettercall /cc interface, to hopefully reduce the bewildermentcommonly associated with that control operator. Wedescribe the proper undelimited continuation monad,pointing out that Haskell’s Cont is actually the monadfor delimited continuations. Delimited and undelimitedcontinuations are vastly different. Delimited continu-ations are isomorphic to functions, they do return theresult and can be composed. We emphasize the greathelp of types in understanding continuations and avoid-ing their surprises.The proper implementation of undelimited continu-

ations is surprisingly tricky. In particular, the Contmonad in Haskell’s monad transformer library has acouple of imperfections. Our ideal monad for undelim-ited continuations: (i) spells out in syntax and types ofits operations that undelimited continuations are not tobe treated as functions; (ii) statically prevents buildingor executing computations that break the undelimitedcontinuation abstraction and depend on the answer-type. We eventually develop two implementations sat-isfying both requirements; the second one is almost thesame as Cont, but with a crucial distinction of thehigher-rank type for runCont. The higher-rank typeprevents the program from using runCont internally torun parts of its computation.Read the tutorial online.

8

Page 9: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

Recursion from Iteration, an exercise in programderivation

Let us call the looping computation iteration and iden-tify the least fix-point combinator with recursion:

loop :: Monad m ⇒ (a → m a)→ (a → m b)loop g = λx → g x >>= loop gfix :: Monad m ⇒

((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 getout of it (e.g., by throwing an exception). According toits type the above fix is the applicative fix-point combi-nator (like the one typically used in strict languages),to be distinguished from the very different, lazy mfix ofHaskell. It is trivial to write loop in terms of fix. Canwe do the other way around?Intuitively, that should be possible: after all, any

recursive program, however general, is going to be ex-ecuted on a CPU, which runs in a simple tail-recursiveloop. The details are very tricky and the final result isall but intuitive or comprehensible. One wonders howit could ever work. Andrzej Filinski was the first tosystematically derive recursion from iteration in 1992.We show an alternative, shorter derivation relying onmonads and equational reasoning.We solve the problem by equationally deriving a con-

structive proof of the proposition

∀f x k.exists h y ◦ fix f x k = loop h y k

stating that fix is expressible via loop in the continua-tion monad.Read the tutorial online.

2.3 Agda Tutorial

Report by: Péter DiviánszkyParticipants: Ambrus Kaposi, students at ELTE IKStatus: experimental

Agda may be the next programming language to learnafter Haskell. Learning Agda gives more insight intothe various type system extensions of Haskell, for ex-ample.The main goal of the tutorial is to let people ex-

plore programming in Agda without learning theoret-ical background in advance. Only secondary schoolmathematics is required for the tutorial.

Further reading

http://people.inf.elte.hu/divip/AgdaTutorial/Index.html

2.4 School of Haskell

Report by: Natalia MuskaParticipants: Michael Snoyman, Edward Kmett, Simon

Peyton Jones and othersStatus: active

The School of Haskell has been available since early2013. It’s main two functions are to be an educationresource for anyone looking to learn Haskell and asa sharing resources for anyone who has built a valu-able tutorial. The School of Haskell contains tutorials,courses, and articles created by both the Haskell com-munity and the developers at FP Complete. Coursesare available for all levels of developers.Two new features were added to the School of

Haskell. First is the addition of Disqus for commentingon each tutorial and highlighting other potentially in-teresting tutorials. Second is the inclusion of autoruntags. This enables users to run a snippet as soon asthey open a tutorial.Currently 3150 tutorials have been created (a 125%

increase from this time last year) and 441 have beenofficially published (a 53% increase from this time lastyear). Some of the most visited tutorials are Text Ma-nipulation Attoparsec, Learning Haskell at the SOH,Introduction to Haskell - Haskell Basics, and A LittleLens Starter Tutorial. Over the past year the Schoolof Haskell has averaged about 16k visitors a month.All Haskell programmers are encouraged to visit the

School of Haskell and to contribute their ideas andprojects. This is another opportunity to showcase thevirtues of Haskell and the sophistication and high levelthinking of the Haskell community.

Further reading

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

9

Page 10: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

3 Implementations

3.1 The Glasgow Haskell Compiler

Report by: Austin SeippParticipants: many others

GHC development is as busy as ever, and 7.10 is goingto be no different. Our current release schedule lookslike we’d like an RC by Christmas, and a releaseclose to Feburary 2015, which is something of anadjustment based on the 7.8 release. But we’ve stillgot 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, mostof this is done by our wonderful contributors. If youwant something done, you should certainly try to getin touch and help make it a reality!

Libraries, source language, type system:

Applicative is now a superclass of Monad Aftermuch debate, in GHC 7.10, Applicative is finallya superclass of Monad, hence completing theApplicative Monad Proposal.

BBP: Foldable/Traversable As part of the so-called"Burning-Bridges Proposal", the monomorphicdefinitions in Prelude/Data.List/Control.Monadthat conflict with those from Data.Foldable andData.Traversable have been replaced by their respec-tive ones from Data.Foldable/Data.Traversable. Thiswill be in 7.10.

Signature sections Lennart Augustsson is implement-ing (::ty) to work the same as (λx → x :: ty).

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

Strict language extension Johan Tibell is working ona −XStrict language extension that will make GHCcompile programs in a by-default strict way. Detailshere.

Cloud Haskell statics Mathieu Boespflug and Fa-cundo Domínguez at TweagIO are working on sup-port for Cloud Haskell’s static feature. Details here.The current in-progress code review is available athttps://phabricator.haskell.org/D119.

Overloaded record fields In 2013, Adam Gundry im-plemented the new −XOverloadedRecordFields exten-sion for GHC, described on the wiki. We’re still aim-ing to make this part of 7.10, but there’s still workto be done!

Using an SMT Solver in the type-checker Iavor Di-atchki is working on utilizing an off-the-shelf SMTsolver in GHC’s constraint solver. Currently, themain focus for this is improved support for reason-ing with type-level natural numbers, but it opensthe doors to other interesting functionality, such assupported for lifted (i.e., type-level) (&&), and ({ }),type-level bit-vectors (perhaps this could be used toimplement 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 Corelanguage, as described in a recent paper. When thiswork is complete, all types will be promotable tokinds, and all data constructors will be promotableto types. This will include promoting type syn-onyms and type families. As the details come to-gether, 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 tobe accepted.

Partial type signatures Thomas Winant and Do-minique Devriese are working on partial type sig-natures for GHC. A partial type signature is a typesignature that can contain wildcards, written as un-derscores. These wildcards can be types unknown tothe programmer or types he doesn’t care to anno-tate. The type checker will use the annotated partsof the partial type signature to type check the pro-gram, and infer the types for the wildcards. A wild-card can also occur at the end of the constraints partof a type signature, which indicates that an arbi-trary 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 arecurrently being simplified. More details can be foundat this wiki page.

Binary literals Herbert Valerio Riedel implementedthe −XBinaryLiterals language extension which fi-nally closes the syntax gap relative to other lan-guages which allow to write base-2 literals such as0b11001001. This is in GHC 7.10.

10

Page 11: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

Propositional equality for GHC.Generics metadataGabor Greif is working on a conservative ap-proach to retrofit the metadata types generatedby −XDeriveGeneric with a runtime-observabletype equality. The feature is discussed underGenericsPropositionalEquality.

Backpack module system Edward Yang is working onextensions to GHC and Cabal to support Backpack.Details in the Backpack wiki page. At the mo-ment, module reexports, the package key infrastruc-ture change, and module thinning and renaming arein GHC HEAD and definitely shipping with 7.10;signatures and Cabal support are coming down thepike. This is in GHC 7.10.

More list fusion Based on a new compiler transforma-tion by Joachim Breitner, CallArity, foldl and relatedfunctions now can take part in list fusion. DavidFeuer then came up with fusion rules for many morefunctions. This change may not be a unambiguousimprovement in all cases, so if you find regressions,weâĂŹd like to hear about them. These changes areall in 7.10.

Back end and runtime system

CPU-specific optimizations Austin Seipp is currentlyinvestigating the implementation of CPU-specific op-timisations for GHC, including new -march and-mcpu flags to adjust tuning for a particular pro-cessor. Right now, there is some preliminary worktowards optimizing copies on later Intel machines.There’s interest in expanding this further as well.

Changes to static closures Edward Yang is workingon an overhaul of how static closures represented atruntime to eliminate some expensive memory deref-erences in the GC hotpath. The initial results areencouraging: these changes can result in an up to8% in the runtime of some GC heavy benchmarks.See ticket #8199.

New, smaller array type Johan Tibell has recentlyadded a new array type, SmallArray#, which usesless memory (2 words) than the Array# type, at thecost of being more expensive to garbage collect forarray sizes large than 128 elements. This is in GHC7.10.

DWARF-based stack tracing Peter Wortmann andArash Rouhani (with support from the Simons)are working on enabling GHC to generate and useDWARF debugging information. This should allowus to obtain stack traces and do profiling withoutthe need for instrumentation. The first stages of thiswork should land in 7.10, but it’s not clear if the fullfeature set will.

Reimplemented GMP-based Integer backendHerbert Valerio Riedel is working on this ticket toprovide a GMP-based Integer backend not relyingon registering GHC-specific custom GMP memoryallocators which cause problems when linking toother C-code also using GMP unaware of GHC’smemory management.

Frontend, build-system, and miscellaneous changes

GHC is now using Submodules for all repositoriesFor a very long time, GHC has used a mixed methodof 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 arobust way impossible. As of GHC now and forthe future, all dependent repositories are trackedthrough git submodule, making them much morerobust and reproducible.

Phabricator for code review For the past few months,many GHC developers have been doing somethingnew – public code review! To facilitate that,Haskell.org now runs a copy of Phabricator that weuse for continuous integration and code review of in-coming patches. Our instance has been tuned tosupport GHC, and many developers are actively sub-mitting their patches through the queue. This is notonly much more robust than trac tickets, it can alsodo testing of your patches, along with a nifty com-mand line tool for other utilities.

Development updates, joining in and a big ThankYou!

In the past several months, GHC has seen a surge ofcommunity involvement, and a great deal of new con-tributors.As ever, there is a ton of stuff in the future for us to

do. If you want something done — don’t wait, it mighttake a while. You should join us instead!

Links:

◦ [AMP], https://github.com/quchen/articles/blob/master/applicative_monad.md

◦ [ORF], https://ghc.haskell.org/trac/ghc/wiki/Records/OverloadedRecordFields

◦ [FC], System FC with Explicit Kind Equality - http://www.seas.upenn.edu/~eir/papers/2013/fckinds/fckinds-extended.pdf

◦ [PTS], https://ghc.haskell.org/trac/ghc/wiki/PartialTypeSignatures

◦ [HEAPALLOCED],https://ghc.haskell.org/trac/ghc/ticket/8199

◦ [PHAB],https://ghc.haskell.org/trac/ghc/wiki/Phabricator

11

Page 12: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

3.2 Ajhc Haskell Compiler

Report by: Kiwamu OkabeParticipants: John Meacham, Hiroki Mizuno, Hidekazu

Segawa, Takayuki MuranushiStatus: experimental

What is it?

Ajhc is a Haskell compiler, and acronym for “A fork ofjhc”.Jhc (http://repetae.net/computer/jhc/) converts

Haskell code into pure C language code running withjhc’s runtime. And the runtime is written with 3000lines (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 feed-back jhc any changes. Also Ajhc aims to provide theMetasepi project with a method to rewrite NetBSDkernel 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

https://www.youtube.com/watch?v=XEYcR5RG5cANetBSD kernel’s HD Audio sound driver has inter-

rupt handler. The interrupt handler of the demo isre-written by Haskell language using Ajhc.At the demo, run following operations. First, set

breakpoint at the interrupt of finding headphone, andsee Haskell function names on backtrace. Second, setbreakpoint s_alloc() function, that allocate area inHaskell heap. Make sure of calling the function whileanytime running kernel. Nevertheless, playing wav filedoes not break up.The source code is found at https:

//github.com/metasepi/netbsd-arafura-s1 Theinterrupt handler source code at https://github.com/metasepi/netbsd-arafura-s1/blob/fabd5d64f15058c198ba722058c3fb89f84d08a5/metasepi/sys/hssrc/Dev/Pci/Hdaudio/Hdaudio.hs#L15.Discussion on mailing list: http://www.haskell.org/

pipermail/haskell-cafe/2014-February/112802.htmlhttp://www.youtube.com/watch?v=n6cepTfnFooThe touchable cube application is written with

Haskell and compiled by Ajhc. In the demo, the ap-plication is breaked by ndk-gdb debugger when run-ning GC. You could watch the demo source code athttps://github.com/ajhc/demo-android-ndk.http://www.youtube.com/watch?v=C9JsJXWyajQThe demo is running code that compiled with Ajhc

on Cortex-M3 board, mbed. It’s a simple RSS readerfor reddit.com, showing the RSS titles on Text LCDpanel. You could watch the demo detail and sourcecode at https://github.com/ajhc/demo-cortex-m3.

http://www.youtube.com/watch?v=zkSy0ZroRIsThe demo is running Haskell code without any

OS. Also the clock exception handler is written withHaskell.

Usage

You can install Ajhc from Hackage.

$ cabal install ajhc$ ajhc --versionajhc 0.8.0.9 (9c264872105597700e2ba403851cf3b236cb1646)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 de-tail. (http://ajhc.metasepi.org/manual.html)

Future plans

Maintain Ajhc as compilable with latast GHC.

License

◦ Runtime: MIT License https://github.com/ajhc/ajhc/blob/master/rts/LICENSE

◦ Haskell libraries: MIT License https://github.com/ajhc/ajhc/blob/master/lib/LICENSE

◦ The others: GPLv2 or Later https://github.com/ajhc/ajhc/blob/arafura/COPYING

Contact

◦ Mailing list:http://groups.google.com/group/metasepi

◦ Bug tracker: https://github.com/ajhc/ajhc/issues◦ Metasepi team:

https://github.com/ajhc?tab=members

Further reading

◦ Ajhc – Haskell everywhere:http://ajhc.metasepi.org/

◦ jhc: http://repetae.net/computer/jhc/◦ Metasepi: Project http://metasepi.org/◦ Snatch-driven-development: http://www.slideshare.net/master_q/20131020-osc-tokyoajhc

12

Page 13: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

3.3 The Helium Compiler

Report by: Jurriaan HageParticipants: Bastiaan Heeren

Helium is a compiler that supports a substantial sub-set of Haskell 98 (but, e.g., n+k patterns are missing).Type classes are restricted to a number of built-in typeclasses and all instances are derived. The advantage ofHelium is that it generates novice friendly error feed-back, including domain specific type error diagnosis bymeans of specialized type rules. Helium and its as-sociated packages are available from Hackage. Installit by running cabal install helium. Currently He-lium is at version 1.8. You should also cabal installlvmrun on which it dynamically depends for runningthe compiled code.The Helium website is located http://www.cs.uu.nl/

wiki/Helium. This website also explains in detail whatHelium is about, what it offers, and what we plan todo in the near and far future.A student has added parsing and static checking for

type class and instance definitions to the language, buttype inferencing and code generating still need to beadded. Completing support for type classes is the firstthing on our agenda.

3.4 UHC, Utrecht Haskell Compiler

Report by: Atze DijkstraParticipants: many othersStatus: active development

UHC is the Utrecht Haskell Compiler, supporting al-most all Haskell98 features and most of Haskell2010,plus experimental extensions.

Status Current active development directly on UHC:◦ Making intermediate Core language available as acompilable language on its own (Atze Dijkstra) to beused for experimenting with alternate Agda backends(Philipp Hausmann).

◦ Making the platform independent part of UHC avail-able via Hackage, probably as a “UHC light” to-gether with a small interpreter for Core files (AtzeDijkstra).

◦ Implementing static analyses (various students, Jur-riaan Hage).Current work indirectly on or related to UHC:◦ Incrementality of analysis via the Attribute Gram-mar system used to construct UHC (Jeroen Bransen,PhD thesis soon to be finished, see also UUAGC).

◦ Rewriting the type system combining ideas from theconstrained-based approach in GHC and type errorimprovements found in Helium (Alejandro Serrano).

Background. UHC actually is a series of compilers ofwhich the last is UHC, plus infrastructure for facilitat-ing experimentation and extension. The distinguishingfeatures for dealing with the complexity of the compilerand for experimentation are (1) its stepwise organi-sation as a series of increasingly more complex stan-dalone compilers, the use of DSL and tools for its (2)aspectwise organisation (called Shuffle) and (3) tree-oriented programming (Attribute Grammars, by wayof the Utrecht University Attribute Grammar (UUAG)system (→ 5.3.2).

Further reading

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

◦ UHC Github repository:https://github.com/UU-ComputerScience/uhc

◦ UHC Javascript backend:http://uu-computerscience.github.com/uhc-js/

◦ Attribute grammar system: http://www.cs.uu.nl/wiki/HUT/AttributeGrammarSystem

3.5 Specific Platforms

3.5.1 Haskell on FreeBSD

Report by: PÁLI Gábor JánosParticipants: FreeBSD Haskell TeamStatus: ongoing

The FreeBSD Haskell Team is a small group of contrib-utors who maintain Haskell software on all actively sup-ported versions of FreeBSD. The primarily supportedimplementation is the Glasgow Haskell Compiler to-gether with Haskell Cabal, although one may also findHugs and NHC98 in the ports tree. FreeBSD is a Tier-1 platform for GHC (on both i386 and amd64) start-ing from GHC 6.12.1, hence one can always downloadvanilla binary distributions for each recent release.We have a developer repository for Haskell ports

that features around 560 ports of many popular Ca-bal packages. The updates committed to this repos-itory are continuously integrated to the official portstree on a regular basis. However, the FreeBSD PortsCollection already includes many popular and impor-tant Haskell software: GHC 7.8.3, Haskell Platform2014.2.0.0, Gtk2Hs, wxHaskell, XMonad, Pandoc, Gi-tit, Yesod, Happstack, Snap, Agda, git-annex, and soon – all of them have been incorporated into the up-coming 10.1-RELEASE.If you find yourself interested in helping us or sim-

ply want to use the latest versions of Haskell programson FreeBSD, check out our development repository on

13

Page 14: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

GitHub (see below) where you can find the latest ver-sions of the ports together with all the important point-ers and information required for contacting or con-tributing.

Further reading

https://github.com/freebsd-haskell/ports

3.5.2 Debian Haskell Group

Report by: Joachim BreitnerStatus: working

The Debian Haskell Group aims to provide an optimalHaskell experience to users of the Debian GNU/Linuxdistribution and derived distributions such as Ubuntu.We try to follow the Haskell Platform versions for thecore package and package a wide range of other use-ful libraries and programs. At the time of writing, wemaintain 786 source packages.A system of virtual package names and dependen-

cies, based on the ABI hashes, guarantees that a systemupgrade will leave all installed libraries usable. Mostlibraries are also optionally available with profiling en-abled and the documentation packages register withthe system-wide index.The recently released stable Debian release

(“wheezy”) provides the Haskell Platform 2012.3.0.0and GHC 7.4.1, while in Debian unstable, we providethe platform 2013.2.0.0 and GHC 7.6.3. The upcomingDebian release (“jessie”) will also ship the proven GHC7.6.3. GHC 7.8.2 is available in Debian experimental.Debian users benefit from the Haskell ecosystem

on 14 architecture/kernel combinations, including thenon-Linux-ports KFreeBSD and Hurd. Newly sup-ported are arm64 and ppc64el.

Further reading

http://wiki.debian.org/Haskell

3.5.3 Fedora Haskell SIG

Report by: Jens PetersenParticipants: Ricky Elrod, Ben Boeckel, and othersStatus: active

The Fedora Haskell SIG works to provide good Haskellsupport in the Fedora Project Linux distribution.Fedora 21 Beta is about to be released. Although

we have had a long development cycle – Fedora 21 willfeature new installable Cloud, Server and Workstationproducts – a lot of the work has focused on improvingour packaging tools and utilities to make it easier tomaintain our growing collection of packages going for-ward. So the good news is that going forward we shouldbe able to move a bit faster, and though we have up-dated various packages for Fedora 21 the Haskell pack-ages are not not radically newer than current Fedora20.Fedora 22 development is already underway: we plan

to update ghc to 7.8, refresh many packages to their

14

Page 15: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

latest versions, and add some more libraries and de-pendencies. We may add statically linked executablesubpackages using alternatives since static linking is arecurring request from advanced users. In the mean-time there is a ghc-7.8 Fedora Copr repo available forFedora 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, andmany other packages.At the time of writing we have now almost 300

Haskell source packages in Fedora. The cabal-rpmpackaging tool has improved further: with better han-dling for existing spec files, testsuite support, recur-sive package building and installation, and support forRHEL 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 @fedora-haskell for occasional updates.

Further reading

◦ Homepage:http://fedoraproject.org/wiki/Haskell_SIG

◦ Mailing-list: https://admin.fedoraproject.org/mailman/listinfo/haskell

◦ Package list: https://admin.fedoraproject.org/pkgdb/users/packages/haskell-sig

◦ Package changes: http://git.fedorahosted.org/cgit/haskell-sig.git/tree/packages/diffs/

15

Page 16: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

4 Related Languages and Language Design

4.1 Agda

Report by: Andreas AbelParticipants: Nils Anders Danielsson, Ulf Norell,

Makoto Takeyama, Stevan Andjelkovic,Jean-Philippe Bernardy, James Chapman,

Dominique Devriese, Péter DiviánszkyFredrik Nordvall Forsberg,

Olle Fredriksson, Daniel Gustafsson,Alan Jeffrey, Fredrik Lindblad,

Guilhem Moulin, Nicolas Pouillard,Andrés Sicard-Ramírez and many more

Status: actively developed

Agda is a dependently typed functional programminglanguage (developed using Haskell). A central featureof Agda is inductive families, i.e., GADTs which canbe indexed by values and not just types. The lan-guage also supports coinductive types, parameterizedmodules, and mixfix operators, and comes with an in-teractive interface—the type checker can assist you inthe development of your code.A lot of work remains in order for Agda to become a

full-fledged programming language (good libraries, ma-ture compilers, documentation, etc.), but already in itscurrent state it can provide lots of fun as a platformfor experiments in dependently typed programming.Since the release of Agda 2.3.2 in November 2012

the following has happened in the Agda project andcommunity:◦ Ulf Norell gave a keynote speech at ICFP 2013 ondependently typed programming in Agda.

◦ Agda has attracted new users, the traffic on the mail-ing list (and bug tracker) is increasing.

◦ Agda has seen several enhancements in its typechecker, termination checker, interactive editor, andLaTeX-backend.

◦ Copatterns are being added to Agda as a new wayto define record and coinductive values.

◦ Agda’s pattern matching can be restricted to not useStreicher’s Axiom K; which makes it more compati-ble with Homotopy Type Theory.

Release of Agda 2.3.4 is planned to happen in the sec-ond quartal of 2014.

Further reading

The Agda Wiki: http://wiki.portal.chalmers.se/agda/

4.2 MiniAgda

Report by: Andreas AbelStatus: experimental

MiniAgda is a tiny dependently-typed programminglanguage in the style of Agda (→ 4.1). It serves as a lab-oratory to test potential additions to the language andtype system of Agda. MiniAgda’s termination checkeris a fusion of sized types and size-change terminationand supports coinduction. Bounded size quantificationand destructor patterns for a more general handlingof coinduction. Equality incorporates eta-expansion atrecord and singleton types. Function arguments can bedeclared as static; such arguments are discarded duringequality checking and compilation.MiniAgda is now hosted on http://hub.darcs.net/

abel/miniagda.MiniAgda is available as Haskell source code on hack-

age and compiles with GHC 6.12.x – 7.8.2.

Further reading

http://www.cse.chalmers.se/~abela/miniagda/

4.3 Disciple

Report by: Ben LippmeierParticipants: Ben Lippmeier, Amos Robinson, Erik de

Castro Lopo, Kyle van BerendonckStatus: experimental, active development

The Disciplined Disciple Compiler (DDC) is a researchcompiler used to investigate program transformationin the presence of computational effects. It compiles afamily of strict functional core languages and supportsregion, effect and closure typing. This extra informa-tion provides a handle on the operational behaviour ofcode that isn’t available in other languages. Programscan be written in either a pure/functional or effect-ful/imperative style, and one of our goals is to provideboth styles coherently in the same language.

What is new?

DDC is in an experimental, pre-alpha state, thoughparts of it do work. In March this year we releasedDDC 0.4.1, with the following new features:◦ Added a bi-directional type inferencer based on

Joshua DunïňĄeld and Neelakantan Krishnaswami’srecent ICFP paper.

◦ Added a region extension language construct, andcoeffect system.

◦ Added the Disciple Tetra language which includesinfix operators and desugars into Disciple Core Tetra.

16

Page 17: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

◦ Compilation of Tetra and Core Tetra programs to Cand 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 incom-

plete 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

http://disciple.ouroborus.net

4.4 Ermine

Report by: Edward KmettParticipants: Dan Doel, Josh Cough, Elliot Stern,

Stephen Compall, Runar Oli Bjarnason,Paul Chiusano

Status: actively developed, experimental

Ermine is a Haskell-like programming language, ex-tended with rank-N types, kind and row polymorphismthat runs on the JVM designed at McGraw Hill Finan-cial.The language currently has two implementations, a

legacy implementation that was written in Scala, and anewer, more extensible, implementation that is activelybeing developed in Haskell.The Scala implementation is designed more or less

as a straight interpreter, while the Haskell version isdesigned to be able to compile down to a smaller, rel-atively portable core. Neither backend generates Javabytecode directly to avoid leaking “Permgen” space.In July, we were able to obtain corporate approval

to open source the existing Scala-based compiler andthe nascent Haskell implementation. The Scala versionof the language is being actively used to generate anumber of financial reports within the S&P Capital IQweb platform.An introduction to Ermine has been given at Boston

Haskell and at CUFP 2013. Stephen Compall has beenputting together a documentation project.

Further reading

◦ Ermine Github: http://github.com/ermine-language◦ Boston Haskell Presentation:http://www.youtube.com/watch?v=QCvXlOCBe5A

◦ A Taste of Ermine:https://launchpad.net/ermine-user-guide

◦ CUFP Slides: http://tinyurl.com/qem8phk

17

Page 18: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

5 Haskell and . . .

5.1 Haskell and Parallelism

5.1.1 Eden

Report by: Rita LoogenParticipants: in Madrid: Yolanda Ortega-Mallén,

Mercedes Hidalgo, Lidia Sánchez-Gil,Fernando Rubio, Alberto de la Encina,

in Marburg: Mischa Dieterle, ThomasHorstmeyer, Rita Loogen,

in Copenhagen: Jost BertholdStatus: ongoing

Eden extends Haskell with a small set of syntactic con-structs for explicit process specification and creation.While providing enough control to implement paral-lel algorithms efficiently, it frees the programmer fromthe tedious task of managing low-level details by intro-ducing automatic communication (via head-strict lazylists), 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 formthe Eden instantiation operator (#). Higher-level coor-dination is achieved by defining skeletons, ranging froma simple parallel map to sophisticated master-workerschemes. They have been used to parallelize a set ofnon-trivial programs.Eden’s interface supports a simple definition of ar-

bitrary communication topologies using Remote Data.The remote data concept can also be used to composeskeletons in an elegant and effective way, especially indistributed settings. A PA-monad enables the eagerexecution of user defined sequences of Parallel Actionsin Eden.

Survey and standard reference: Rita Loogen,Yolanda Ortega-Mallén, and Ricardo Peña: ParallelFunctional Programming in Eden, Journal of Func-tional Programming 15(3), 2005, pages 431–475.

Tutorial: Rita Loogen: Eden - Parallel FunctionalProgramming in Haskell, in: V. Zsók, Z. Horváth,and R. Plasmeijer (Eds.): CEFP 2011, Springer LNCS7241, 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 usemultiple communicating instances). Apart from MPIor PVM in cluster environments, Eden supports ashared memory mode on multicore platforms, whichuses multiple independent heaps but does not dependon 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 re-leased in April 2014. The new version fixes a numberof issues related to error shut-down and recovery, andfeatures extended support for serialising Haskell datastructures. Previous stable releases with binary pack-ages and bundles are still available on the Eden webpages.The source code repository for Eden releases is

http://james.mathematik.uni-marburg.de:8080/gitweb,the Eden libraries (Haskell-level) are also available viaHackage.

Tools and libraries

The Eden trace viewer tool EdenTV provides a visual-isation of Eden program runs on various levels. Activ-ity profiles are produced for processing elements (ma-chines), Eden processes and threads. In addition mes-sage transfer can be shown between processes and ma-chines. EdenTV is written in Haskell and is freely avail-able on the Eden web pages and on hackage.The Eden skeleton library is under constant develop-

ment. Currently it contains various skeletons for par-allel maps, workpools, divide-and-conquer, topologiesand 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-Painand No-Pain Multicore Haskells, revised and ex-tended version of TFP 2009 paper, in Special Issueof Higher-Order Symbol Computation (HOSC), toappear, Springer US.

Further reading

http://www.mathematik.uni-marburg.de/~eden

18

Page 19: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

5.1.2 speculation

Report by: Edward KmettParticipants: Jake McArthurStatus: stable

This package provides speculative function applicationand speculative folds based on

◦ Prakash Prabhu, G. Ramalingam, and KapilVaswani, “Safe Programmable Speculative Paral-lelism”, In the proceedings of Programming Lan-guage Design and Implementation (PLDI) Vol 45,Issue 6 (June 2010) pp 50-61.

Unlike the original paper, we can take advantage of im-mutability and the spark queue in Haskell to ensure wenever worsen the asymptotics of a single-threaded algo-rithm. Speculative STM transactions take the place ofthe transactional rollback machinery from the paper.

Further reading

◦ http://hackage.haskell.org/package/speculation◦ http://research.microsoft.com/pubs/118795/

pldi026-vaswani.pdf

5.2 Haskell and the Web

5.2.1 WAI

Report by: Michael SnoymanParticipants: Greg WeberStatus: stable

The Web Application Interface (WAI) is an inter-face between Haskell web applications and Haskell webservers. By targeting the WAI, a web framework or webapplication gets access to multiple deployment plat-forms. Platforms in use include CGI, the Warp webserver, and desktop webkit.WAI is also a platform for re-using code between web

applications and web frameworks through WAI mid-dleware and WAI applications. WAI middleware caninspect and transform a request, for example by auto-matically gzipping a response or logging a request. TheYesod (→ 5.2.5) web framework provides the ability toembed arbitrary WAI applications as subsites, makingthem a part of a larger web application.By targeting WAI, every web framework can share

WAI code instead of wasting effort re-implementingthe same functionality. There are also some new webframeworks that take a completely different approachto web development that use WAI, such as webwire(FRP), MFlow (continuation-based) and dingo (GUI).The Scotty (→ 5.2.9) web framework also continues tobe developed, and provides a lighter-weight alterna-tive to Yesod. Other frameworks- whether existing or

newcomers- are welcome to take advantage of the exist-ing WAI architecture to focus on the more innovativefeatures of web development.WAI applications can send a response themselves.

For example, wai-app-static is used by Yesod to servestatic files. However, one does not need to use a webframework, but can simply build a web application us-ing the WAI interface alone. The Hoogle web servicetargets WAI directly.Since the last HCAR, WAI has successfully released

version 3.0, which removes dependency on any specificstreaming data framework. A separate wai-conduitpackage provides conduit bindings, and such bindingscan easily be provided for other streaming data frame-works.The WAI community continues to grow, with new

applications and web frameworks continuing to beadded. We’ve recently started a new mailing list to dis-cuss WAI related topics. Interested parties are stronglyencouraged to join in!

Further reading

http://www.yesodweb.com/book/wai https://groups.google.com/d/forum/haskell-wai

5.2.2 Warp

Report by: Michael Snoyman

Warp is a high performance, easy to deploy HTTPserver backend for WAI (→ 5.2.1). Since the lastHCAR, Warp has followed WAI in its move from con-duit to a lower level streaming data abstraction. We’veadditionally continued work on more optimizations,and improved support for power efficiency by using theauto-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’smost 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 In-ternet Computing:◦ Issue page: http://www.computer.org/portal/web/

csdl/abs/mags/ic/2011/03/mic201103toc.htm◦ PDF: http://steve.vinoski.net/pdf/IC-Warp_a_

Haskell_Web_Server.pdf

19

Page 20: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

5.2.3 Happstack

Report by: Jeremy Shaw

Happstack is a fast, modern framework for creating webapplications. Happstack is well suited for MVC andRESTful development practices. We aim to leveragethe unique characteristics of Haskell to create a highly-scalable, robust, and expressive web framework.Happstack pioneered type-safe Haskell web program-

ming, with the creation of technologies including web-routes (type-safe URLS) and acid-state (native Haskelldatabase system). We also extended the concepts be-hind formlets, a type-safe form generation and process-ing library, to allow the separation of the presentationand validation layers.Some of Happstack’s unique advantages include:

◦ a large collection of flexible, modular, and well docu-mented libraries which allow the developer to choosethe solution that best fits their needs for databases,templating, routing, etc.

◦ the most flexible and powerful system for definingtype-safe URLs.

◦ a type-safe form generation and validation librarywhich allows the separation of validation and pre-sentation 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 thehappstack-foundation library. It combines what webelieve to be the best choices into a nicely integratedsolution. 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 andsyntax checking

Future plans

Happstack is the oldest, actively developed Haskell webframework. We are continually studying and applyingnew ideas to keep Happstack fresh. By the time thenext release is complete, we expect very little of theoriginal code will remain. If you have not looked atHappstack in a while, we encourage you to come takea fresh look at what we have done.Some of the projects we are currently working on

include:

◦ a fast pipes-based HTTP and websockets backendwith a high level of evidence for correctness

◦ a dynamic plugin loading system

◦ a more expressive system for weakly typed URL rout-ing combinators

◦ a new system for processing form data which allowsfine grained enforcement of RAM and disk quotasand avoids the use of temporary files

◦ a major refactoring of HSP (fewer packages, migra-tion to Text/Builder, a QuasiQuoter, and more).

One focus of Happstack development is to create in-dependent libraries that can be easily reused. For ex-ample, the core web-routes and reform libraries are inno way Happstack specific and can be used with otherHaskell web frameworks. Additionally, libraries thatused to be bundled with Happstack, such as IxSet, Safe-Copy, and acid-state, are now independent libraries.The new backend will also be available as an indepen-dent library.When possible, we prefer to contribute to existing

libraries rather than reinvent the wheel. For example,our preferred templating library, HSP, was created byand is still maintained by Niklas Broberg. However, asignificant portion of HSP development in the recentyears 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 pro-gramming. In addition to the new happstack-fay inte-gration library, we are also contributing directly to Fayitself.For more information check out the happstack.com

website — especially the “Happstack Philosophy” and“Happstack 8 Roadmap”.

Further reading

◦ http://www.happstack.com/◦ http:

//www.happstack.com/docs/crashcourse/index.html

5.2.4 Mighttpd2 — Yet another Web Server

Report by: Kazu YamamotoStatus: open source, actively developed

Mighttpd (called mighty) version 3 is a simple but prac-tical Web server in Haskell. It provides features to han-dle static files, redirection, CGI, reverse proxy, reload-ing configuration files and graceful shutdown. AlsoTLS is experimentally supported.Mighttpd 3 is now based on WAI 3.0. It also adopts

the auto-update library to reduce CPU power con-sumption at no connection.

20

Page 21: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

You can install Mighttpd 3 (mighttpd2) from Hack-ageDB. Note that the package name is mighttpd2, notmighttpd3, for historical reasons.

Further reading

◦ http://www.mew.org/~kazu/proj/mighttpd/en/◦ http:

//www.yesodweb.com/blog/2014/01/new-fast-logger◦ http://www.yesodweb.com/blog/2014/02/new-warp

5.2.5 Yesod

Report by: Michael SnoymanParticipants: Greg Weber, Luite Stegeman, Felipe LessaStatus: stable

Yesod is a traditional MVC RESTful framework. Byapplying Haskell’s strengths to this paradigm, Yesodhelps users create highly scalable web applications.Performance scalablity comes from the amazing

GHC compiler and runtime. GHC provides fast codeand built-in evented asynchronous IO.But Yesod is even more focused on scalable develop-

ment. The key to achieving this is applying Haskell’stype-safety to an otherwise traditional MVC REST webframework.Of course type-safety guarantees against typos or the

wrong type in a function. But Yesod cranks this upa notch to guarantee common web application errorswon’t occur.

◦ declarative routing with type-safe urls — say good-bye to broken links

◦ no XSS attacks — form submissions are automati-cally sanitized

◦ database safety through the Persistent library (→7.6.2) — no SQL injection and queries are alwaysvalid

◦ valid template variables with proper template inser-tion — variables are known at compile time andtreated differently according to their type using theshakesperean templating system.

When type safety conflicts with programmer produc-tivity, Yesod is not afraid to use Haskell’s most ad-vanced features of Template Haskell and quasi-quotingto provide easier development for its users. In partic-ular, these are used for declarative routing, declarativeschemas, and compile-time templates.MVC stands for model-view-controller. The pre-

ferred library for models is Persistent (→ 7.6.2). Viewscan be handled by the Shakespeare family of compile-time template languages. This includes Hamlet, whichtakes the tedium out of HTML. Both of these librariesare optional, and you can use any Haskell alternative.

Controllers are invoked through declarative routing andcan 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 theserver. This means that many of the powerful fea-tures of Yesod can be used in different web developmentstacks 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 wasmostly performed to break compatibility with olderversions of dependencies, which allowed us to removeapproximately 500 lines of conditionally compiled code.Notable changes in 1.4 include:

◦ New routing system with more overlap checking con-trol.

◦ yesod-auth works with your database and yourJSON.

◦ yesod-test sends HTTP/1.1 as the version.

◦ Type-based caching with keys.

The Yesod team is quite happy with the current levelof stability in Yesod. Since the 1.0 release, Yesod hasmaintained a high level of API stability, and we in-tend to continue this tradition. Future directions forYesod are now largely driven by community input andpatches. We’ve been making progress on the goal ofeasier client-side interaction, and have high-level inter-action with languages like Fay, TypeScript, and Coffe-Script. 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

http://www.yesodweb.com/

21

Page 22: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

5.2.6 Snap Framework

Report by: Doug BeardsleyParticipants: Gregory Collins, Shu-yu Guo, James

Sanders, Carl Howells, Shane O’Brien,Ozgun Ataman, Chris Smith, Jurrien

Stutterheim, Gabriel Gonzalez, and othersStatus: active development

The Snap Framework is a web application frameworkbuilt from the ground up for speed, reliability, stability,and ease of use. The project’s goal is to be a cohesivehigh-level platform for web development that leveragesthe power and expressiveness of Haskell to make build-ing websites quick and easy.Since the last HCAR, the Snap Team released a new

major version of the Heist template system. This re-lease allows you to require a namespace on all yoursplices and enable better error reporting when you havetags without a bound splice. Along with this we ex-posed a mechanism for generalized error reporting fromsplices. Now if your splices detect an error condition atapplication load time they can throw an error to bettercommunicate the problem.If you would like to contribute, get a question an-

swered, or just keep up with the latest activity, stop bythe #snapframework IRC channel on Freenode.

Further reading

◦ Heist 0.14 release announcement:http://snapframework.com/blog/2014/09/24/heist-0.14-released

◦ Snaplet Directory:http://snapframework.com/snaplets

◦ http://snapframework.com

5.2.7 Sunroof

Report by: Andy GillParticipants: Jan BrackerStatus: active

Sunroof is a Domain Specific Language (DSL) for gen-erating JavaScript. It is built on top of the JS-monad,which, like the Haskell IO-monad, allows read and writeaccess to external resources, but specifically JavaScriptresources. As such, Sunroof is primarily a feature-rich foreign function API to the browser’s JavaScriptengine, and all the browser-specific functionality, likeHTML-based rendering, event handling, and drawingto the HTML5 canvas.Furthermore, Sunroof offers two threading models

for building on top of JavaScript, atomic and block-ing threads. This allows full access to JavaScript APIs,but using Haskell concurrency abstractions, like MVars

and Channels. In combination with the push mecha-nism Kansas-Comet, Sunroof offers a great platformto build interactive web applications, giving the abilityto interleave Haskell and JavaScript computations witheach other as needed.

It has successfully been used to write smaller appli-cations. These applications range from 2D renderingusing the HTML5 canvas element, over small GUIs, upto executing the QuickCheck tests of Sunroof and dis-playing the results in a neat fashion. The developmenthas been active over the past 6 months and there is adrafted paper submitted to TFP 2013.

Further reading

◦ Homepage: http://www.ittc.ku.edu/csdl/fpg/software/sunroof.html

◦ Tutorial: https://github.com/ku-fpg/sunroof-compiler/wiki/Tutorial

◦ Main Repository:https://github.com/ku-fpg/sunroof-compiler

5.2.8 MFlow

Report by: Alberto Gómez CoronaStatus: active development

MFlow is a Web framework of the kind of other func-tional, stateful frameworks like WASH, Seaside, Ocsi-gen or Racket. MFlow does not use continuation pass-ing properly, but a backtracking monad that permitsthe synchronization of browser and server and errortracing. This monad is on top of another “Workflow”monad that adds effects for logging and recovery ofprocess/session state. In addition, MFlow is REST-ful. Any GET page in the flow can be pointed to witha REST URL. The navigation as well as the page re-sults are type safe. It also implements monadic form-lets: They can have their own flow within a page. IfJavaScript is enabled, the widget refreshes itself within

22

Page 23: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

the page. If not, the whole page is refreshed to reflectthe change of the widget.MFlow hides the heterogeneous elements of a web ap-

plication and expose a clear, modular, type safe DSLof applicative and monadic combinators to create frommultipage to single page applications. These combina-tors, called widgets or enhanced formlets, pack togetherjavascript, 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 produceexceptional conditions that may trigger the rollback ofactions in the context of failures, shutdowns and restartof the systems (long running processes). That has beendemonstrated using MFlow in [3].A web application can be considered as an special

case of integration. MFlow pack the elements of a webaplication within composable widgets. This ”deep inte-gration” is the path followed by the software industryto create from higher level framewors to operating sys-tems [4]perch and hplayground are two new packages that

make run the page logic of MFlow in the Web Browserusing Haste, the Haskell-to-JavaScript compiler. perchhas the syntax of blaze-html and hplayground uses thesyntax and primitives of the View Monad. Both per-mit the page logic of MFlow to run fully in the WebBrowser. Under the same syntax, they are completelydifferent.Perch[5] are the composable combinators of blaze-

html running in the browser. They generate trees bycalling DOM primitives directly instead of creating in-termediary, lineal descriptions. While string buildersare unary tree constructors, perch uses a generalizedbuilder for n-trees. It also has combinators for themodification of elements and it can assign perch eventhandlers to elements and it has also JQuery like opera-tions. It can be used alone for the creation of client-sideapplications.hplayground is a monadic functional reactive[6]

framework with MFlow syntax that permits the cre-ation of seamless client-side applications. hplaygroundsequence the perch events in his monad instance, it addmonadic and applicative formlets with validations, sothe code is modular and seamless. There is a site withexample Haste-perch-hplayground (made with MFlow)online[6] . There is also a tutorial for the creation ofClient-side applications, that describe the structure ofa small accounting application for haskell beginners[7].Since the event are keep in his scope and the DOMmodifications are local but there are no event handlers,Monadic Reactive may be a better alternative to func-tional Reactive in the creation of seamless Web Browserapplications whenever there are many dynamic DOMupdates[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 runthe page logic in the server or in the client. Thefirst step is to let the programmer decide it. To em-bed hplayground code inside MFlow some hacks in theHaste generated code are necessary.Perch is being ported to purescript, hplayground will

be ported too. The next target is GHCJS.

Further reading

◦ MFlow as a DSL for web applications https://www.fpcomplete.com/school/to-infinity-and-beyond/older-but-still-interesting/MFlowDSL1

◦ MFlow, a continuation-based web frameworkwithout continuations http://themonadreader.wordpress.com/2014/04/23/issue-23

◦ How Haskell can solve the integration problemhttps://www.fpcomplete.com/school/to-infinity-and-beyond/pick-of-the-week/how-haskell-can-solve-the-integration-problem

◦ Towards a deeper integration: A Web language:http://haskell-web.blogspot.com.es/2014/04/towards-deeper-integration-web-language.html

◦ Perch https://github.com/agocorona/haste-perch◦ hplayground demos http://tryplayg.herokuapp.com◦ haste-perch-hplaygroun tutorial

http://www.airpair.com/haskell/posts/haskell-tutorial-introduction-to-web-apps

◦ react.js a solution for a problem that Haskell cansolve in better wayshttp://haskell-web.blogspot.com.es/2014/11/browser-programming-reactjs-as-solution.html

◦ MFlow demo site: http://mflowdemo.herokuapp.com

5.2.9 Scotty

Report by: Andrew FarmerParticipants: Andrew FarmerStatus: active

Scotty is a Haskell web framework inspired by Ruby’sSinatra, using WAI (→ 5.2.1) and Warp (→ 5.2.2), andis designed to be a cheap and cheerful way to writeRESTful, declarative web applications.

◦ A page is as simple as defining the verb, url pattern,and Text content.

◦ It is template-language agnostic. Anything that re-turns 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 ofsimple HTTP/JSON interfaces to Haskell applications.Implemented as a monad transformer stack, Scotty ap-plications can be embedded in arbitrary MonadIOs.The Scotty API is minimal, and fully documented via

23

Page 24: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

haddock. The API has recently remained stable, witha steady stream of improvements contributed by thecommunity.

Further reading

◦ Hackage: http://hackage.haskell.org/package/scotty◦ Github: https://github.com/scotty-web/scotty

5.3 Haskell and Compiler Writing

5.3.1 MateVM

Report by: Bernhard UrbanParticipants: Harald SteinlechnerStatus: active development

MateVM is a method-based Java Just-In-Time Com-piler. That is, it compiles a method to native code ondemand (i.e. on the first invocation of a method). Weuse existing libraries:

hs-java for proccessing Java Classfiles according toThe Java Virtual Machine Specification.

harpy enables runtime code generation for i686 ma-chines in Haskell, in a domain specific language style.

We think that Haskell is suitable for compiler chal-lenges, as already many times proven. However, wehave to jump between “Haskell world” and “nativecode world”, due to the requirements of a Just-In-TimeCompiler. This poses some special challenges when itcomes to signal handling and other interesing ratherlow level operations. Not immediately visible, the taskturns out to be well suited for Haskell although weexperienced some tensions with signal handling andGHCi. We are looking forward to sharing our expe-rience on this.In the current state we are able to execute simple

Java programs. The compiler eliminates the JavaVMstack via abstract interpretation, does a liveness analy-sis, linear scan register allocation and finally code emis-sion. The architecture enables easy addition of furtheroptimization passes on an intermediate representation.Future plans are, to add an interpreter to gather pro-

file information for the compiler and also do more ag-gressive optimizations (e.g. method inlining or stackallocation). An interpreter can also be used to enablespeculation during compilation and, if such a specula-tion fails, compiled code can deoptimize to the inter-preter.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 GNUClasspath as base library some day. Other hot topicsare Hoopl and Garbage Collection.

If you are interested in this project, do not hesitateto join us on IRC (#MateVM @ OFTC) or contact us onGithub.

Further reading

◦ https://github.com/MateVM◦ http://docs.oracle.com/javase/specs/jvms/se7/html/◦ http://hackage.haskell.org/package/hs-java◦ http://hackage.haskell.org/package/harpy◦ http://www.gnu.org/software/classpath/◦ http://hackage.haskell.org/package/hoopl-3.8.7.4◦ http://en.wikipedia.org/wiki/Club-Mate

5.3.2 UUAG

Report by: Jeroen BransenParticipants: ST Group of Utrecht UniversityStatus: stable, maintained

UUAG is the Utrecht University Attribute Grammarsystem. It is a preprocessor for Haskell that makes iteasy to write catamorphisms, i.e., functions that do toany data type what foldr does to lists. Tree walks aredefined using the intuitive concepts of inherited andsynthesized attributes, while keeping the full expressivepower of Haskell. The generated tree walks are efficientin both space and time.An AG program is a collection of rules, which are

pure Haskell functions between attributes. Idiomatictree computations are neatly expressed in terms ofcopy, default, and collection rules. Attributes them-selves can masquerade as subtrees and be analyzed ac-cordingly (higher-order attribute). The order in whichto visit the tree is derived automatically from the at-tribute computations. The tree walk is a single traver-sal from the perspective of the programmer.Nonterminals (data types), productions (data con-

structors), attributes, and rules for attributes can bespecified separately, and are woven and ordered auto-matically. These aspect-oriented programming featuresmake 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 CompilerUHC (→ 3.4), the editor Proxima for structured doc-uments (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. Thecurrent version is 0.9.51 (July 2014), is extensivelytested, and is available on Hackage. There is alsoa Cabal plugin for easy use of AG files in Haskellprojects.We recently implemented the following enhance-

ments:

24

Page 25: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

Evaluation scheduling. We have done a project to im-prove the scheduling algorithms for AGs. The pre-viously implemented algorithms for scheduling AGcomputations did not fully satisfy our needs; the codewe write goes beyond the class of OAGs, but the al-gorithm by Kennedy and Warren (1976) results inan undesired increase of generated code due to non-linear evaluation orders. However, because we knowthat our code belongs to the class of linear orderableAGs, we wanted to find and algorithm that can findthis linear order, and thus lies in between the two ex-isting approaches. We have created a backtrackingalgorithm for this which is currently implemented inthe UUAG (–aoag flag).Another approach to this scheduling problem that weimplemented is the use of SAT-solvers. The schedul-ing problem can be reduced to a SAT-formula andefficiently solved by existing solvers. The advantageis that this opens up possibilities for the user to influ-ence the resulting schedule, for example by providinga cost-function that should be minimized. We havealso implemented this approach in the UUAG whichuses Minisat as external SAT-solver (–loag flag).

We are currently working on the following enhance-ments:

Incremental evaluation. We are currently running aPh.D. project that investigates incremental evalua-tion of AGs. In this ongoing work we hope to improvethe UUAG compiler by adding support for incremen-tal evaluation, for example by statically generatingdifferent evaluation orders based on changes in theinput.

Further reading

◦ http://www.cs.uu.nl/wiki/bin/view/HUT/AttributeGrammarSystem

◦ http://hackage.haskell.org/package/uuagc

5.3.3 LQPL — A Quantum ProgrammingLanguage Compiler and Emulator

Report by: Brett G. GilesParticipants: Dr. J.R.B. CockettStatus: v 0.9.1 experimental released in November

2013

LQPL (Linear Quantum Programming Language) is afunctional quantum programming language inspired byPeter Selinger’s paper “Towards a Quantum Program-ming Language”.The LQPL system consists of a compiler, a GUI

based front end and an emulator. LQPL incorporates asimple module / include system (more like C’s includethan Haskell’s import), predefined unitary transforms,quantum control and classical control, algebraic datatypes, and operations on purely classical data.

Starting with the 0.9 series, LQPL is now split intoseparate components:

◦ The compiler (Haskell) — available at the commandline and via a TCP/IP interface;

◦ The emulator (which emulates a virtual quantummachine) (Haskell) — available as a server via aTCP/IP interface;

◦ The front end (JRuby/Swing) — which connects toboth 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 faircoin 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 lessverbose;

◦ Implementing a translation of the virtual machinecode into quantum circuits.

Further reading

Documentation and executable downloads may befound at http://pll.cpsc.ucalgary.ca/lqpl/index.html.The source code, along with a wiki and bug tracker, isavailable at https://bitbucket.org/BrettGilesUofC/lqpl.

25

Page 26: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

5.3.4 free — Free Monads

Report by: Edward KmettParticipants: Gabriel Gonzalez, Aristid Breitkreuz,

Nickolay Kudasov, Ben Gamari, MatveyAksenov, Mihaly Barasz, Twan van

LaarhovenStatus: actively developed

This package provides common definitions for workingwith free monads and free applicatives. These are veryuseful 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 usedas part of a scheme to deamortize calculations in theST s monad.

Further reading

◦ http://hackage.haskell.org/package/free◦ http://www.haskellforall.com/2012/06/

you-could-have-invented-free-monads.html◦ http://www.iai.uni-bonn.de/~jv/mpc08.pdf◦ http:

//comonad.com/reader/2011/free-monads-for-less/◦ http:

//comonad.com/reader/2011/free-monads-for-less-2/◦ http:

//comonad.com/reader/2011/free-monads-for-less-3/◦ http://paolocapriotti.com/assets/applicative.pdf◦ http:

//skillsmatter.com/podcast/scala/monads-for-free◦ http://comonad.com/reader/2009/incremental-folds/◦ http://www.ioc.ee/~tarmo/tday-veskisilla/

uustalu-slides.pdf◦ https://www.fpcomplete.com/user/edwardk/

oblivious/deamortized-st

5.3.5 bound — Making De Bruijn Succ Less

Report by: Edward KmettParticipants: Nicolas Pouillard, Jean-Philippe Bernardy,

Andrea Vezzosi, Gabor Greif, Matvey B.Aksenov

Status: actively developed

This library provides convenient combinators for work-ing with “locally-nameless” terms. These can be use-ful when writing a type checker, evaluator, parser, orpretty printer for terms that contain binders like forallor lambda, as they ease the task of avoiding variablecapture and testing for alpha-equivalence.Notably, it uses a representation based on type-safe

generalized De Bruijn indices that lets you naturallymake your expression type into a Monad that permitscapture-avoiding substitution, and the use of Foldable’stoList 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 stillsafely avoiding issues with name capture.The generalized De Bruijn encoding permits asymp-

totic improvement in the running time of many cal-culations, enabling simultaneous substitution of every-thing within a complex binder, O(1) lifting, and avoid-ing paying for the traversal of lifted trees, but the com-plexity of the encoding is hidden behind a monad trans-former that provides you with variable capture.

Further reading

◦ http://fpcomplete.com/user/edwardk/bound◦ http://hackage.haskell.org/package/bound◦ http://www.slideshare.net/ekmett/

bound-making-de-bruijn-succ-less

26

Page 27: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

6 Development Tools

6.1 Environments

6.1.1 Haskell IDE From FP Complete

Report by: Natalia MuskaStatus: available, stable

Since FP CompleteTM announced the launch of FPHaskell CenterTM (FPHC) in early September 2013, alot of additions to the original IDE have been addedand the pricing structure has changed dramatically.The new features and the pricing modifications are adirect result of community feedback. The changes weregradually 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 accessunder the new Open Publish model. This means thatOpen Publish accounts will automatically publish allprojects on the FPHC site with each commit, similarto Github. This move is meant to make FPHC morevaluable, and increase support for users sharing theirwork with the community. There are still paid sub-scriptions 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 communitysupport

Over the past year the feedback and activity onFPHC has been very positive. To ensure FPHC ismeeting the demands of the Haskell community, FPcomplete is constantly seeking feedback and sugges-tions from users and the Haskell community.

Further reading

Visit www.fpcomplete.com for more information.

6.1.2 EclipseFP

Report by: JP MoresmauParticipants: building on code from Alejandro Serrano

Mena, Thomas ten Cate, B. Scott Michel,Thiago Arrais, Leif Frenzel, MartijnSchrage, Adam Foltzer and others

Status: stable, maintained, and actively developed

EclipseFP is a set of Eclipse plugins to allow workingon Haskell code projects. Its goal is to offer a fullyfeatured Haskell IDE in a platform developers comingfrom other languages may already be familiar with. Itprovides the following features, among others:

Cabal IntegrationProvides a .cabal file editor, uses Cabal settings forcompilation, allows the user to install Cabal pack-ages from within the IDE. Supports cabal sandboxes(or cabal-dev) to provide install isolation and projectdependencies inside an Eclipse workspace.

GHC IntegrationCompilation is done via the GHC API, syntax color-ing uses the GHC Lexer.

Productive CodingQuick fixes for common errors, warnings, and HLint

27

Page 28: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

suggestions. Automatic organization of imports. Au-tocompletion. Find and rename across modules andprojects. Stylish-haskell integration for consistentcode formatting.

Live ProgrammingA Haskell worksheet allows the developer to see val-ues of expressions, including images and HTML con-tent, as the code changes.

DebuggingEasy to launch GHCi sessions on any module withproper parameters. Manages breakpoints, the eval-uation of variables and expressions uses the Eclipsedebugging framework, and requires no knowledge ofGHCi syntax. Also integrates with Yesod (launchthe web application from EclipseFP). Running a pro-gram with profiling options results in profiling graphsbeing displayed in the UI for easy analysis.

BrowsingThe Haskell Browser perspective allows the user tonavigate the list of packages and their documenta-tion. It integrates seamlessly with Hackage. TheHaskell module editor provides code folding, outlineview of the module, popup of types and documenta-tion mouse hovers, etc.

TestingEclipseFP integrates with Haskell test frameworks,most notably HTF, to provide UI feedback on testfailures.

The source code is fully open source (Eclipse License)on github and anyone can contribute. Current versionis 2.6.1, released in July 2014, and more versions withadditional features are planned and actively worked on.Feedback on what is needed is welcome! The websitehas information on downloading binary releases andgetting a copy of the source code. Support and bugtracking is handled through Sourceforge forums andgithub issues. We welcome contributors!

Further reading

◦ http://eclipsefp.github.com/◦ http://jpmoresmau.blogspot.com/

6.1.3 ghc-mod — Happy Haskell Programming

Report by: Kazu YamamotoStatus: open source, actively developed

For a long time, Kazu Yamamoto was the only activedeveloper of ghc-mod, now two new developers havejoined:Alejandro Serrano merged the results of his Google

Summer of Code project. He implemented case split-ting and sophisticated typed hole handling. Daniel

Gröber brushed up the internal code and introducedthe GhcModT monad now used throughout the ex-ported API. As a result the API of ghc-mod drasticallychanged with version 5.0.0.ghc-modi used to suffer from various consistency re-

lated issues triggered by changes in the environment,for instance: changing file names of modules, addingdependencies to the cabal file and installing new li-braries. ghc-modi v5.1.1 or later handles changes inthe environment by restarting the GHC session whenthis is detected.Kazu stepped down as release manager and Daniel

took over.

Further reading

http://www.mew.org/~kazu/proj/ghc-mod/en/

6.1.4 HaRe — The Haskell Refactorer

Report by: Alan ZimmermanParticipants: Francisco Soares, Chris Brown, Stephen

Adams, Huiqing Li

Refactorings are source-to-source program transforma-tions which change program structure and organiza-tion, but not program functionality. Documented incatalogs and supported by tools, refactoring providesthe means to adapt and improve the design of existingcode, and has thus enabled the trend towards modernagile software development processes.Our project, Refactoring Functional Programs, has

as its major goal to build a tool to support refactor-ings in Haskell. The HaRe tool is now in its seventhmajor release. HaRe supports full Haskell 2010, andis integrated with (X)Emacs. All the refactorings thatHaRe supports, including renaming, scope change, gen-eralization and a number of others, are module-aware,so that a change will be reflected in all the modulesin a project, rather than just in the module where thechange is initiated.Snapshots of HaRe are available from our GitHub

repository (see below) and Hackage. There are re-lated 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’sPhD thesis). The final report for the project appearson the University of Kent Refactoring Functional Pro-grams 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 brittlenessof the token management process.As a result, the focus over the last few months has

been on improving the support in the GHC API forthis. This work is summarized here https://ghc.haskell.

28

Page 29: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

org/trac/ghc/wiki/GhcApi, but the lightning summaryis◦ More parser entry points, to allow parsing fragments.◦ Removal of landmines from the AST, allowing traver-

sals with freedom.◦ The parser can now produce annotations, which can

be used to reproduce the original source from theAST 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 itmakes use of the GHC library for analysis, has beenreleased; HaRe 0.7 is available on Hackage, and alsodownloadable from our GitHub page

◦ HaRe 0.7 is alpha software, and comes with a limitednumber of refactorings, as the work so far has con-centrated on getting the new architecture in placeto make use of the GHC AST. The new architecturehas stabilised and the token management while ma-nipulating the AST is able to preserve layout, thusmaintaining the original layout as well as syntacti-cally correct alignment as new elements are added orhave their size changed.

◦ There is plenty to do, so anyone who has an interestis welcome to fork the repo and get stuck in.

◦ Stephen Adams is continuing his PhD at the Univer-sity of Kent and will be working on data refactoringin Haskell.

Further reading

◦ http://www.cs.kent.ac.uk/projects/refactor-fp/◦ https://github.com/alanz/HaRe

6.1.5 IHaskell: Haskell for Interactive Computing

Report by: Andrew GibianskyStatus: very alpha (but usable!)

IHaskell is an interactive interface for Haskell devel-opment, designed with the goal of replacing GHCi insome contexts. In addition to a simple REPL, it pro-vides a notebook interface (in the style of Mathematicaor Maple). The notebook interface runs in a browserand provides the user with editable cells in which theycan create and execute code. The output of this codeis displayed in a rich format right below, and if it’snot quite right, the user can go back, edit the cell, andre-execute. This rich format defaults to the same bor-ing plain-text output as GHCi would give you; how-ever, library authors will be able to define their ownformats for displaying their data structures in a usefulway, with the only limit being that the display outputmust be viewable in a browser (images, HTML, CSS,Javascript). For instance, integration with graphing li-braries could produce in-browser data visualizations,

while integration with Aeson’s JSON could producea syntax-highlighted JSON output for complex datastructures.

Implementation-wise, IHaskell is a language kernelbackend for the project known as IPython. Although ithas the name “Python” in the name, IPython providesa language-agnostic protocol by which interactive codeenvironments such as REPLs and notebooks can com-municate with a language evaluator backend. IHaskellis a language kernel which uses ZeroMQ to commu-nicate with IPython frontends and the GHC API toevaluate code.

Although IHaskell is in very early stages, the fu-ture looks incredibly bright. Integration with popu-lar Haskell libraries can give us beautiful and poten-tially interactive visualizations of Haskell data struc-tures. On one hand, this could range from simple thingssuch as foldable record structures — imagine being ableto explore complex nested records by folding and un-folding bits and pieces at a time, instead of trying tomentally parse them from the GHCi output. On theother end, we could have interactive outputs, such as

29

Page 30: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

Parsec parsers which generate small input boxes thatrun the parser on any input they’re given. And thesethings are just the beginning — tight integration withIPython may eventually be able to provide things suchas code-folding in your REPL or an integrated debug-ger interface.If this sounds good to you: contribute! We’re in

dire need of developers to make this beautiful dreama reality, and I would be happy to help you get up tospeed quickly.

Further reading

https://github.com/gibiansky/IHaskell

6.2 Code Management

6.2.1 Darcs

Report by: Eric KowParticipants: darcs-users listStatus: active development

Darcs is a distributed revision control system writtenin Haskell. In Darcs, every copy of your source codeis a full repository, which allows for full operation in adisconnected environment, and also allows anyone withread access to a Darcs repository to easily create theirown branch and modify it with the full power of Darcs’revision control. Darcs is based on an underlying the-ory of patches, which allows for safe reordering andmerging of patches even in complex scenarios. For allits power, Darcs remains a very easy to use tool for ev-ery day use because it follows the principle of keepingsimple things simple.Our most recent release, Darcs 2.8.5 (with GHC 7.8

support), was in August 2014. Some key changes inDarcs 2.8 include a faster and more readable darcsannotate, a darcs obliterate -O which can be usedto conveniently “stash” patches, and hunk editing forthe darcs revert command.We have now started a feature freeze for our up-

coming release, Darcs 2.10. In our sights are the newdarcs rebase command (for merging and amendingpatches that would be hard to do with patch theoryalone), the patch index optimisation (for faster locallookups on repositories with long histories), and thepacks optimisation (for faster darcs get).

Summer of Code This summer we completed GoogleSummer of Code projects:Marcio Diaz has improved our use of the hashed file

storage mechanism, first by introducing a garbage col-lection mechanism to keep our disk space requirementsin check, and second by introducing a bucketing systemfor faster cache lookups. He has also broken ground on

a darcs undo mechanism to help users recover from oth-erwise 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 caus-ing darcs optimize reorder to hang in some places,added a darcs show dependencies prototype (whichdraws graphs showing which patches depend on eachoher), and started some work in using patch reorderingto help us generate “minimal context” patch bundlesthat can be applied in more repositories.

SFC and donations Darcs is free software licensed un-der the GNU GPL (version 2 or greater). Darcs is aproud member of the Software Freedom Conservancy,a US tax-exempt 501(c)(3) organization. We acceptdonations at http://darcs.net/donations.html.

Further reading

◦ http://darcs.net

◦ http://darcs.net/GSoC/2014-Hashed-Files-And-Cache

◦ http://darcs.net/GSoC/2014-History-Reordering-Performance-and-Features

6.2.2 DarcsWatch

Report by: Joachim BreitnerStatus: working

DarcsWatch is a tool to track the state of Darcs (→6.2.1) patches that have been submitted to someproject, usually by using the darcs send command.It allows both submitters and project maintainers toget an overview of patches that have been submittedbut 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 39repositories and 4620 patches submitted by 254 users.

Further reading

◦ http://darcswatch.nomeata.de/◦ http:

//darcs.nomeata.de/darcswatch/documentation.html

6.2.3 cab — A Maintenance Command of HaskellCabal Packages

Report by: Kazu YamamotoStatus: open source, actively developed

cab is a MacPorts-like maintenance command ofHaskell cabal packages. Some parts of this programare a wrapper to ghc-pkg and cabal.

30

Page 31: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

If you are always confused due to inconsistency ofghc-pkg and cabal, or if you want a way to check alloutdated packages, or if you want a way to remove out-dated packages recursively, this command helps you.cab can now stably run on Windows.

Further reading

http://www.mew.org/~kazu/proj/cab/en/

6.3 Interfacing to other Languages

6.3.1 java-bridge

Report by: Julian FleischerStatus: active development

The Java Bridge is a library for interfacing the JavaVirtual Machine with Haskell code and vice versa. Itcomes with a rich DSL for discovering and invokingJava methods and allows to set up callbacks into theHaskell runtime. If exported via the FFI it is also pos-sible to use Haskell libraries from within the JVM na-tively.The package also offers a bindings generator which

translates the API of a Java class or package into aHaskell API. Using the bindings generator it is possibleto generate a Haskell module with a clean Haskell APIthat invokes Java behind the scenes. Typical conver-sions, for example byte arrays to lists or Java maps tolists of key value pairs, are taken care of. The generatedbindings and predefined conversions are extensible bydefining appropriate type class instances accordingly.While the documentation for the bindings generator

still needs improvement, the overall library is in a quiteusable 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 innerworkings: The Java Bridge has been cre-ated as part of a bachelor thesis which youcan 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 KimParticipants: Ryan FengStatus: Actively Developing

fficxx (“eff fix”) is an automatic haskell Foreign Func-tion Interface (FFI) generator to C++. While haskellhas a well-specified standard for C FFI, interfacingC++ library to haskell is notoriously hard. The goalof fficxx is to ease making haskell-C++ binding andto provide relatively nice mapping between two com-pletely different programming paradigms.

To make a C++ binding, one write a haskell modelof the C++ public interfaces, and then fficxx auto-matically generates necessary boilerplate codes in sev-eral levels: C++-C shims, C-haskell FFI, low levelhaskell type representation for C++ class/object andhigh level haskell type and typeclass representation andsome casting functions. The generated codes are orga-nized into proper haskell modules to minimize namespace collision and packaged up as cabal packages.The tool is designed to adapt different configurations

and unique needs, such as splitting bindings into multi-ple cabal packages and renaming classes and functionsto resolve some obstacles that are originated from nam-ing collision, which is quite inevitable in making an FFIlibrary.The information of a C++ library can be written

in terms of simple haskell expressions, aiming at goodusability for ordinary haskell users. For example, if wehave 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 typedefined 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 isHROOT which is a haskell binding to the ROOT li-brary. ROOT is a big C++ histogramming and statis-tical analysis framework. Due to fficxx, the HROOTpackage faithfully reflects the ROOT C++ class hier-archy, and the user from C++ can use the packagerelatively 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 makefficxx more modernized with more transparent sup-port of various C/C++ data types, including consis-tent multiple pointer/reference operations and functionpointers. fficxx is still being in progress in incorporat-ing the new pointer operations. C++ template supportis now planned.

Further reading

◦ http://ianwookim.org/fficxx

31

Page 32: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

6.4 Deployment

6.4.1 Cabal and Hackage

Report by: Duncan Coutts

Background

Cabal is the standard packaging system for Haskellsoftware. It specifies a standard way in which Haskelllibraries and applications can be packaged so that itis easy for consumers to use them, or re-package them,regardless of the Haskell implementation or installationplatform.Hackage is a distribution point for Cabal packages.

It is an online archive of Cabal packages which canbe used via the website and client-side software suchas cabal-install. Hackage enables users to find, browseand download Cabal packages, plus view their API doc-umentation.cabal-install is the command line interface for the

Cabal and Hackage system. It provides a command lineprogram cabal which has sub-commands for installingand managing Haskell packages.

Recent progress

The Cabal packaging system has always faced grow-ing pains. We have been through several cycles wherewe’ve faced chronic problems, made major improve-ments which bought us a year or two’s breathing spacewhile package authors and users become ever more am-bitious and start to bump up against the limits again.In the last few years we have gone from a situationwhere 10 dependencies might be considered a lot, to asituation now where the major web frameworks havea 100+ dependencies and we are again facing chronicproblems.The Cabal/Hackage maintainers and contributors

have been pursuing a number of projects to addressthese problems:The IHG sponsored Well-Typed (→ 8.1) to work on

cabal-install resulting in a new package dependencyconstraint solver. This was incorporated into the cabal-install-0.14 release in the spring, and which is nowin the latest Haskell Platform release. The new de-pendency solver does a much better job of findinginstall plans. In addition the cabal-install tool nowwarns when installing new packages would break exist-ing packages, which is a useful partial solution to theproblem of breaking packages.We had two Google Summer of Code projects on Ca-

bal this year, focusing on solutions to other aspects ofour current problems. The first is a project by MikhailGlushenkov (and supervised by Johan Tibell) to incor-porate sandboxing into cabal-install. In this contextsandboxing means that we can have independent setsof installed packages for different projects. This goesa long way towards alleviating the problem of differ-ent projects needing incompatible versions of common

dependencies. There are several existing tools, mostnotably cabal-dev, that provide some sandboxing fa-cility. Mikhail’s project was to take some of the ex-perience from these existing tools (most of which areimplemented as wrappers around the cabal-install pro-gram) and to implement the same general idea, butproperly integrated into cabal-install itself. We expectthe results of this project will be incorporated into acabal-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), isalso aimed at the same problem: that of different pack-ages needing inconsistent versions of the same commondependencies, or equivalently the current problem thatinstalling new packages can break existing installedpackages. The solution is to take ideas from the Nixpackage manager for a persistent non-destructive pack-age store. In particular it lifts an obscure-sounding butcritical limitation: that of being able to install multi-ple instances of the same version of a package, builtagainst different versions of their dependencies. Thisis a big long-term project. We have been making stepstowards it for several years now. Philipp’s project hasmade another big step, but there’s still more work be-fore it is ready to incorporate into ghc, ghc-pkg andcabal.

Looking forward

Johan Tibell and Bryan O’Sullivan have volunteeredas new release managers for Cabal. Bryan moved allthe tickets from our previous trac instance into github,allowing us to move all the code to github. Johan man-aged the latest release and has been helping with man-aging the inflow of patches. Our hope is that thesechanges will increase the amount of contributions andgive us more maintainer time for reviewing and inte-grating those contributions. Initial indications are pos-itive. 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 forthe new site. The remaining work is mundane but im-portant tasks like making sure all the old data can beimported, and making sure the data backup system iscomprehensive. Initially the new site will have just afew extra features compared to the old one. Once weget past the deployment hurdle we hope to start get-ting more contributions for new features. The code isstructured so that features can be developed relativelyindependently, and we intend to follow Cabal and movethe code to github.We would like to encourage people considering con-

tributing to take a look at the bug tracker on github,take part in discussions on tickets and pull requests, orsubmit their own. The bug tracker is reasonably wellmaintained and it should be relatively clear to new con-

32

Page 33: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

tributors what is in need of attention and which tasksare considered relatively easy. For more in-depth dis-cussion there is also the cabal-devel mailing list.

Further reading

◦ Cabal homepage: http://www.haskell.org/cabal◦ Hackage package collection:http://hackage.haskell.org/

◦ Bug tracker: https://github.com/haskell/cabal/

6.4.2 Stackage: the Library Dependency Solution

Report by: Natalia MuskaStatus: new

Stackage began in November 2012 with the missionof making it possible to build stable, vetted sets ofpackages. The overall goal was to make the Cabalexperience better. Two years into the project, a lotof progress has been made and now it includes bothStackage and the Stackage Server. To date, there areover 700 packages available in Stackage. The officialsite is www.stackage.org.Stackage Update: Stackage is an infrastructure to

create stable builds of complete package sets referredto as "snapshots." Stackage provides users with the as-surance that their packages will always build, will ac-tually compile, all tests suites pass, and all will workacross three GHC versions (7.8, 7.6, and 7.4). Users ofa snapshot verified by Stackage can expect all packagesto install the first time.Each snapshot is given a unique hash which is a di-

gest of that snapshot’s package set. Snapshots don’tchange. Once a hash is provided, it refers only to thatsnapshot. So if a user writes a project using snapshotaba1b51af, and in two months switches to another ma-chine and builds their project with aba1b51af, it willsucceed.For package authors, Stackage gives them the valu-

able knowledge that their package builds and tests suc-cessfully across the current, stable and old GHC ver-sions. Library authors have guarantees that users ofStackage can easily use their library and can do so ona reasonable number of GHCs. Authors are also in-formed when a newly uploaded package breaks theirs,meaning it’s time to update the package for it to beincluded in the latest snapshot.Recently Stackage added some additional features in-

cluding Haddock documentation and cabal.config files.By including Haddock documentation in Stackage allnew exclusive snapshots have Haddock links allowingusers to view documentation of all packages includedin the snapshot. This means users can generally vieweverything in one place, on one high-availability ser-vice. By creating a cabal.config link on snapshot pages,

Stackage users don’t have to change their remote-repofield.

Stackage Server: Before Stackage Server, use ofStackage was limited to either manually downloadinga project and building it all locally, or by using FPHaskell Center. With Stackage Server, users are ableto go to the server web site and pick a snapshot. Onthe build is a simple copy/paste line to use as a Cabalrepo, to replace the users existing remote-repo line.

When a new package is released and has been prop-erly updated, users can go to the Stackage home pageand get the latest snapshot and update their repo. TheStackage server also supports the uploading of customsnapshots, this allows a company, a Linux distribution,an organization, a university, or just as a general hackerwho wants to keep all their projects under one packageset, to maintain their own custom series of snapshots,and also make it available to other people. Then theburden will be on those users to make sure it builds,rather than the recommended and Stackage maintainedsnapshots.

If you’ve written some code that you’re activelymaintaining, don’t hesitate to get it in Stackage. You’llbe widening the potential audience of users for yourcode by getting your package into Stackage, and you’llget some helpful feedback from the automated buildsso that users can more reliably build your code.

6.4.3 Haskell Cloud

Report by: Gideon Sireling

Haskell Cloud is an OpenShift cartridge for deployingHaskell on Red Hat’s open source PaaS cloud. It in-cludes the latest version of GHC, cabal-install, Goldlinker, and a choice of pre-installed frameworks - a fulllist can be viewed on the Wiki.Using a Haskell Cloud cartridge, existing Haskell

projects can be uploaded, build, and run from the cloudwith minimal changes. Ongoing development is focusedon OpenShift’s upcoming Docker release.

Further reading

◦ http://code.accursoft.com/haskell-cloud◦ http://www.haskell.org/haskellwiki/Web/Cloud#

OpenShift◦ https://blog.openshift.com/

functional-programming-in-the-cloud-how-to-run-haskell-on-openshift/

33

Page 34: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

6.5 Others

6.5.1 lhs2TEX

Report by: Andres LöhStatus: stable, maintained

This tool by Ralf Hinze and Andres Löh is a preproces-sor that transforms literate Haskell or Agda code intoLATEX documents. The output is highly customizableby means of formatting directives that are interpretedby lhs2TEX. Other directives allow the selective inclu-sion of program fragments, so that multiple versionsof a program and/or document can be produced froma common source. The input is parsed using a lib-eral parser that can interpret many languages with aHaskell-like syntax.The program is stable and can take on large docu-

ments.The current version is 1.18 and has been released

in September 2012. Development repository and bugtracker are on GitHub. There are still plans for arewrite of lhs2TEX with the goal of cleaning up the in-ternals and making the functionality of lhs2TEX avail-able as a library.

Further reading

◦ http://www.andres-loeh.de/lhs2tex◦ https://github.com/kosmikus/lhs2tex

6.5.2 ghc-heap-view

Report by: Joachim BreitnerParticipants: Dennis FelsingStatus: active development

The library ghc-heap-view provides means to inspectthe GHC’s heap and analyze the actual layout ofHaskell objects in memory. This allows you to inves-tigate memory consumption, sharing and lazy evalua-tion.This means that the actual layout of Haskell objects

in memory can be analyzed. You can investigate shar-ing as well as lazy evaluation using ghc-heap-view.The package also provides the GHCi command

:printHeap, which is similar to the debuggers’ :printcommand but is able to show more closures and theirsharing behaviour:

> let x = cycle [True, False]> :printHeap x_bco> head xTrue> :printHeap xlet x1 = True : _thunk x1 [False]in x1

> take 3 x[True,False,True]> :printHeap xlet x1 = True : False : x1in 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

◦ http://www.joachim-breitner.de/blog/archives/548-ghc-heap-view-Complete-referential-opacity.html

◦ http://www.joachim-breitner.de/blog/archives/580-GHCi-integration-for-GHC.HeapView.html

◦ http://www.joachim-breitner.de/blog/archives/590-Evaluation-State-Assertions-in-Haskell.html

6.5.3 ghc-vis

Report by: Dennis FelsingParticipants: Joachim BreitnerStatus: active development

The tool ghc-vis visualizes live Haskell data structuresin GHCi. Since it does not force the evaluation of thevalues under inspection it is possible to see Haskell’slazy evaluation and sharing in action while you interactwith the data.Ghc-vis supports two styles: A linear rendering sim-

ilar to GHCi’s :print, and a graph-based view whereclosures in memory are nodes and pointers betweenthem are edges. In the following GHCi session a par-tially evaluated list of fibonacci numbers is visualized:

> let f = 0 : 1 : zipWith (+) f (tail f)> f !! 2> :view f

34

Page 35: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

At this point the visualization can be used interac-tively: To evaluate a thunk, simply click on it and im-mediately see the effects. You can even evaluate thunkswhich are normally not reachable by regular Haskellcode.Ghc-vis can also be used as a library and in combi-

nation with GHCi’s debugger.

Further reading

http://felsin9.de/nnis/ghc-vis

6.5.4 Hat — the Haskell Tracer

Report by: Olaf Chitil

Hat is a source-level tracer for Haskell. Hat gives ac-cess to detailed, otherwise invisible information abouta computation.Hat helps locating errors in programs. Furthermore,

it is useful for understanding how a (correct) programworks, especially for teaching and program mainte-nance. Hat is not a time or space profiler. Hat can beused for programs that terminate normally, that ter-minate with an error message or that terminate wheninterrupted by the programmer.Tracing a program with Hat consists of two phases:

First the program needs to be run such that it addi-tionally writes a trace to file. To add trace-writing,hat-trans translates all the source modules Module ofa Haskell program into tracing versions Hat.Module.These are compiled as normal and when run the pro-gram does exactly the same as the original programexcept for additionally writing a trace to file. Second,after the program has terminated, you view the tracewith a tool. Hat comes with several tools for selec-tively viewing fragments of the trace in different ways:hat-observe for Hood-like observations, hat-trail for ex-ploring a computation backwards, hat-explore for freelystepping through a computation, hat-detect for algo-rithmic debugging, . . .Hat is distributed as a package on Hackage that

contains all Hat tools and tracing versions of stan-dard libraries. Currently Hat supports Haskell 98 plussome language extensions such as multi-parameter typeclasses and functional dependencies. For portability allviewing tools have a textual interface; however, manytools use some Unix-specific features and thus run onUnix / Linux / OS X, but not on Windows.Hat was mostly built around 2000–2004 and then

disappeared because of lack of maintenance. Now it isback and new developments have started.The source-to-source transformation of hat-trans has

been completely rewritten to use the haskell-src-extsparser. Thus small bugs of the old parser disappearedand in the future it will be easier to cover more Haskelllanguage extensions. This work was released on Hack-age as Hat 2.8.

When a traced program uses any libraries besidesthe standard Haskell 98 / 2010 ones, these librariescurrently have to be transformed (in trusted mode). Sothe plan for the next release of Hat is to enable Hat touse trusted libraries without having to transform them.Feedback on Hat is welcome.

Further reading

◦ Initial website: http://projects.haskell.org/hat◦ Hackage package:

http://hackage.haskell.org/package/hat

6.5.5 Tasty

Report by: Roman Cheplyaka, Lars HupelParticipants: Eric Seidel, Danny Navarro, Lars

Noschinski, Manuel Eberl, and manyothers

Status: actively maintained

Tasty is a new testing framework for Haskell that isquickly 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’veheard from several companies that use Tasty to testtheir Haskell software. It is also used for teaching, asLars Hupel tells us:

Technische Universität München uses Tasty toassess homework submitted for the introductoryfunctional programming course, which is compul-sory for second-year Bachelor’s students in com-puter science. Students can upload their sourcecode to a web application, which compiles themand executes tests (mostly QuickCheck). Graph-ical reports are generated with ’tasty-html’ andpresented to the students. Grading happens au-tomatically with a custom test reporter, which –roughly speaking – checks that a minimum num-ber of significant tests have passed. This is a hugeimprovement over the past years, where tests wererun by a homegrown framework which offered onlytextual output. Tasty however is nicely extensibleand allows for easy customization to the instruc-tors’ and students’ needs.

What’s new since the last HCAR?

◦ Thanks to a patch from Eric Seidel, Tasty now dis-plays 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 HU-nit. It was using a fraction of HUnit’s code anyway,so we decided to include that code in tasty-hunitdirectly. This change means fewer packages for usersto install, and smaller surface for possible breakage.

35

Page 36: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

Further reading

For more information about Tasty and how to useit, 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. GajdaStatus: beta

New rapid software development tool json-autotypeinterprets JSON data and converts them into Haskellmodule with data type declarations.

$ json-autotype input.json -o JSONTypes.hs"

The generated declarations use automatically de-rived Aeson class instances to read and write data di-rectly from/to JSON strings, and facilitate interactionwith 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 ro-

bustly interprets most ambiguities using clever typing.The author welcomes comments and suggestions at〈[email protected]〉.

Further reading

http://hackage.haskell.org/packages/json-autotype

36

Page 37: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

7 Libraries, Applications, Projects

7.1 Language Features

7.1.1 Conduit

Report by: Michael SnoymanStatus: stable

While lazy I/O has served the Haskell community wellfor many purposes in the past, it is not a panacea.The inherent non-determinism with regard to resourcemanagement can cause problems in such situations asfile serving from a high traffic web server, where thebottleneck is the number of file descriptors available toa process.The left fold enumerator was one of the first ap-

proaches to dealing with streaming data without us-ing lazy I/O. While it is certainly a workable solution,it requires a certain inversion of control to be appliedto code. Additionally, many people have found theconcept daunting. Most importantly for our purposes,certain kinds of operations, such as interleaving datasources and sinks, are prohibitively difficult under thatmodel.The conduit package was designed as an alternate

approach to the same problem. The root of our simplifi-cation is removing one of the constraints in the enumer-ator approach. In order to guarantee proper resourcefinalization, the data source must always maintain theflow of execution in a program. This can lead to con-fusing code in many cases. In conduit, we separate outguaranteed resource finalization as its own component,namely the ResourceT transformer.Once this transformation is in place, data produc-

ers, consumers, and transformers (known as Sources,Sinks, and Conduits, respectively) can each maintaincontrol of their own execution, and pass off control viacoroutines. The user need not deal directly with anyof this low-level plumbing; a simple monadic interface(inspired greatly by the pipes package) is sufficient foralmost all use cases.Since its initial release, conduit has been through

many design iterations, all the while keeping to its ini-tial core principles. Since the last HCAR, we’ve re-leased version 1.2. This release introduces two changes:it adds a stream fusion implementation to allow muchmore optimized runs for some forms of pipelines, anduses the codensity transform to provide better behaviorof monadic bind.Additionally, much work has gone into

conduit-combinators and streaming-commons,both of which are packages introduced in the lastHCAR.

There is a rich ecosystem of libraries available tobe used with conduit, including cryptography, networkcommunications, serialization, XML processing, andmore.The library is available on Hackage. There is an in-

teractive tutorial available on the FP Complete Schoolof Haskell. You can find many conduit-based packagesin the Conduit category on Hackage as well.

Further reading

◦ http://hackage.haskell.org/package/conduit◦ https://www.fpcomplete.com/user/snoyberg/

library-documentation/conduit-overview◦ http://hackage.haskell.org/packages/archive/pkg-list.

html#cat:conduit

7.1.2 lens

Report by: Edward KmettParticipants: many othersStatus: very actively developed

The lens package provides families of lenses, isomor-phisms, folds, traversals, getters and setters. That isto say, it provides a rich, compositional vocabulary forseparating “what you want to do” from “what you wantto do it to” built upon rigorous foundations.Compared to other libraries that provide lenses, key

distinguishing features for lens are that it comes “bat-teries included” with many useful lenses for the typescommonly used from the Haskell Platform, and withtools for automatically generating lenses and isomor-phisms 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 combina-tors 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) lensesor most of the other lens-like constructions offered bythis package.

Further reading

◦ Simon Peyton Jones:http://skillsmatter.com/podcast/scala/lenses-compositional-data-access-and-manipulation

◦ Edward Kmett:http://www.youtube.com/watch?v=cefnmjtAolY

◦ Lens Development, Visualized:http://www.youtube.com/watch?v=ADAprOOgi-A&feature=youtu.be&hd=1

◦ http://hackage.haskell.org/package/lens

37

Page 38: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

◦ http://lens.github.io/◦ https://github.com/ekmett/lens/wiki◦ https://github.com/ekmett/lens/issues◦ http://statusfailed.com/blog/2013/01/26/

haskells-strength-generalising-with-lenses.html◦ http://ocharles.org.uk/blog/posts/

2012-12-09-24-days-of-hackage-lens.html◦ http://www.haskellforall.com/2013/05/

program-imperatively-using-haskell.html◦ https://www.fpcomplete.com/school/

to-infinity-and-beyond/pick-of-the-week/a-little-lens-starter-tutorial

◦ http://stackoverflow.com/questions/5767129/lenses-fclabels-data-accessor-which-library-for-structure-access-and-mutatio/5769285#5769285

◦ http://comonad.com/reader/2012/mirrored-lenses/◦ http://r6.ca/blog/20121209T182914Z.html◦ http://r6.ca/blog/20120623T104901Z.html

7.1.3 folds

Report by: Edward KmettStatus: actively developed

This package provides a playground full of resumablecomonadic folds and folding homomorphisms betweenthem.

Further reading

◦ http://hackage.haskell.org/package/folds◦ https://www.fpcomplete.com/user/edwardk/

cellular-automata/part-2◦ http://squing.blogspot.com/2008/11/

beautiful-folding.html◦ http://conal.net/blog/posts/

another-lovely-example-of-type-class-morphisms◦ http:

//conal.net/blog/posts/more-beautiful-fold-zipping◦ http://www.haskellforall.com/2013/08/

composable-streaming-folds.html

7.1.4 machines

Report by: Edward KmettParticipants: Anthony Cowley, Shachaf Ben-Kiki, Paul

Chiusano, Nathan van DoornStatus: actively developed

Ceci n’est pas une pipeThis package exists to explore the design space of

streaming calculations. Machines are demand-driveninput sources like pipes or conduits, but can supportmultiple 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 Pro-

cess. More generally you can attach a Process to the

output of any type of Machine, yielding a new Ma-chine. More complicated machines provide other waysof connecting to them.Typically the use of machines proceeds by using sim-

ple plans into machine Tees and Wyes, capping manyof the inputs to those with possibly monadic sources,feeding the rest input (possibly repeatedly) and callingrun 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 itsown monadic effects or delegating that responsibility toa custom driver.

Further reading

◦ https://vimeo.com/77164337◦ http://acowley.github.io/NYHUG/

FunctionalRoboticist.pdf◦ https://github.com/runarorama/scala-machines◦ https://dl.dropbox.com/u/4588997/Machines.pdf

7.1.5 exceptions

Report by: Edward KmettParticipants: Gabriel Gonzales, Michael Snoyman, John

Weigley, Mark Lentczner, AlpMestanogullari, Fedor Gogolev, Merijn

Verstraaten, Matvey B. AksenovStatus: actively developed

This package was begun as an effort to define a stan-dard way to deal with exception handling in monadtransformer stacks that could scale to the needs of realapplications in terms of handling asynchronous excep-tions, could support GHC now that block and unblockhave been removed from the compiler, and which wecould reason about the resulting behavior, and still sup-port mocking on monad transformer stacks that are notbuilt atop IO.

Further reading

http://hackage.haskell.org/package/exceptions

7.1.6 tables

Report by: Edward KmettParticipants: Nathan van Doorn, Tim Dixon, Niklas

Haas, Dag Odenhall, Petr Pilar, AustinSeipp

Status: actively developed

The tables package provides a multiply-indexedin-memory data store in the spirit of ixset ordata-store, but with a lens-based API.

Further reading

◦ http://hackage.haskell.org/package/tables◦ https://github.com/ekmett/tables#examples

38

Page 39: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

7.1.7 Faking even more dependent types!

Report by: Richard EisenbergParticipants: Jan StolarekStatus: released

The singletons package enables users to fake dependenttypes in Haskell via the technique of singletons. Inbrief, a singleton type is a type with exactly one value;by knowing the value, you also know the type, andvice versa. See “Dependently typed programming withsingletons” (Haskell ’12) for more background.Jan Stolarek and Richard Eisenberg have released

a major update to singletons, which will include pro-cessing of a much larger subset of Haskell, includ-ing case and let statements, where clauses, anony-mous functions, and classes. Since the release (ofversion 1.0), more improvements have been made tothe 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 def-initions 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 workon promoted datatypes at the type level.

Further reading

◦ Dependently typed programming with singletons, byRichard A. Eisenberg and Stephanie Weirich.Haskell Symposium ’12. http://www.cis.upenn.edu/~eir/papers/2012/singletons/paper.pdf

◦ Promoting Functions to Type Families in Haskell,by Richard A. Eisenberg and Jan Stolarek. HaskellSymposium ’14. http://www.cis.upenn.edu/~eir/papers/2014/promotion/promotion.pdf

◦ GitHub repo:http://github.com/goldfirere/singletons

7.1.8 Type checking units-of-measure

Report by: Richard EisenbergParticipants: Takayuki MuranushiStatus: released

The units package, available on Hackage, allows you totype-check your Haskell code with respect to units ofmeasure. It prevents you from adding, say, meters toseconds while allowing you to add meters to feet anddividing meters by seconds. A Double can be convertedinto a dimensioned quantity only by specifying its units,and a dimensioned quantity can be converted to anordinary Double only by specifying the desired units ofthe 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 def-initions for SI dimensions and units, as well as the UScustomary units. Because of units’s extensibility, thepackage is suitable for use outside of physics applica-tions, such as finance or keeping your apples apart fromyour bananas.The magic under the hood uses lots of type families

and no functional dependencies. One upshot of thisdesign is that user code can generally be free of con-straints on types. Here is some sample code:

kinetic_energy :: Mass→ Velocity→ Energykinetic_energy m v = redim $ 0.5 ∗|m | ∗ | v | ∗ | vg_earth :: Accelerationg_earth = redim $ 9.8 % (Meter : / (Second : ˆ sTwo))

Type annotations are not necessary – all types canbe inferred.

Further reading

◦ GitHub repo: http://github.com/goldfirere/units

◦ Experience Report: Type-checking PolymorphicUnits for Astrophysics Research in Haskell, byTakayuki Muranushi and Richard A. Eisenberg.Haskell Symposium ’14. http://www.cis.upenn.edu/~eir/papers/2014/units/units.pdf

7.1.9 Dependent Haskell

Report by: Richard EisenbergStatus: work in progress

I am working on an ambitious update to GHC thatwill bring full dependent types to the language. On mybranch [1] the Core language has already been updatedaccording to the description in our ICFP’13 paper [2]. Iam now in the midst of rewriting type inference accord-ingly. When this stage is done, all type-level constructswill simultaneously be kind-level constructs, as therewill be no distinction between types and kinds. Specif-ically, GADTs and type families will be promotable tokinds. At that point, I conjecture that any constructwritable in those other dependently-typed languageswill be expressible in Haskell through the use of single-tons.After this all works, I will embark on working a

proper Π-binder into the language, much along thelines of Adam Gundry’s thesis on the topic [3]. HavingΠ would give us “proper” dependent types, and therewould be no more need for singletons. A sampling ofwhat I hope is possible when this work is done is online[4], excerpted here:

39

Page 40: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

data Vec :: ∗ → Integer→ ∗ whereNil :: Vec a 0(:::) :: a → Vec a n → Vec a (1 ’+ n)

replicate :: π n. ∀a. a → Vec a nreplicate @0 = Nilreplicate x = x ::: replicate x

Of course, the design here (especially for the properdependent types) is very preliminary, and input is en-couraged.

Further reading

◦ [1]: https://github.com/goldfirere/ghc, the nokindsbranch. This is under active development and mostof the time does not build.

◦ [2]: System FC with Explicit Kind Equality, byStephanie Weirich, Justin Hsu, and RichardA. Eisenberg. ICFP ’13. http://www.cis.upenn.edu/~eir/papers/2013/fckinds/fckinds.pdf

◦ [3]: Type Inference, Haskell and Dependent Types,by Adam Gundry. PhD Thesis, 2013.https://personal.cis.strath.ac.uk/adam.gundry/thesis/

◦ [4]: https://github.com/goldfirere/nyc-hug-oct2014/blob/master/Tomorrow.hs

◦ Haskell Implementors’ Workshop 2014 presentationon Dependent Haskell. Slides:http://www.cis.upenn.edu/~eir/talks/2014/hiw-dependent-haskell.pdf; Video:https://www.youtube.com/watch?v=O805YjOsQjI

◦ Repo for presentation on Dependent Haskell at theNYC Haskell Users’ Group:https://github.com/goldfirere/nyc-hug-oct2014

◦ Wiki page with elements of the design: https://ghc.haskell.org/trac/ghc/wiki/DependentHaskell

7.2 Education

7.2.1 Exercism: crowd-sourced code reviews ondaily practice problems

Report by: Bob IppolitoStatus: available

Exercism.io is an open source (AGPL) site that pro-vides programming exercises suitable for new program-mers, or programmers new to a programming language.The feature that differentiates exercism from self-

study is that once a solution is submitted, others whohave completed that exercise have an opportunity toprovide code review. Anecdotally, this seems to put

programmers on the right track quickly, especially withregard to the subtler points of Haskell style, non-strictevaluation, and GHC-specific features.Exercism fully supports Haskell as of August 2013,

with more than 50 exercises currently available. As ofthis writing, 165 people have completed at least oneHaskell exercise.I intend to continue actively participating in the code

review process and ensure that the Haskell exercisepath is well maintained.

Further reading

http://exercism.io/

7.2.2 Talentbuddy

Report by: Andrei SoareStatus: available

Talentbuddy is a fun way for developers to practicetheir skills.It offers access to a diverse selection of problems and

it makes it easy to get feedback from your peers onceyou solve them.You can write code in multiple languages — includ-

ing Haskell — and if you get stuck, you can ask for help.The members of the community that already solved thechallenge get to see your question and suggest ways tomake progress.Once you solve a problem, you get access to every-

one else’s solutions. By comparing your solution withthe other ones you acquire knowledge about alterna-tive strategies for solving the problem, or more elegantways to write the solution.Another great way to learn on Talentbuddy is by ask-

ing your peers to review your solution. Their reviewshelp increase your solution’s readability and elegance.

Further reading

http://www.talentbuddy.co/

7.2.3 Holmes, Plagiarism Detection for Haskell

Report by: Jurriaan HageParticipants: Brian Vermeer, Gerben Verburg

Holmes is a tool for detecting plagiarism in Haskellprograms. A prototype implementation was made byBrian Vermeer under supervision of Jurriaan Hage, inorder to determine which heuristics work well. Thisimplementation could deal only with Helium programs.We found that a token stream based comparison andMoss style fingerprinting work well enough, if you re-move template code and dead code before the compari-son. Since we compute the control flow graphs anyway,we decided to also keep some form of similarity check-ing of control-flow graphs (particularly, to be able todeal with certain refactorings).

40

Page 41: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

In November 2010, Gerben Verburg started toreimplement Holmes keeping only the heuristics wefigured were useful, basing that implementation onhaskell-src-exts. A large scale empirical validationhas been made, and the results are good. We havefound quite a bit of plagiarism in a collection of about2200 submissions, including a substantial number inwhich refactoring was used to mask the plagiarism. Apaper has been written, which has been presented atCSERC’13, and should become available in the ACMDigital Library.The tool will be made available through Hackage at

some point, but before that happens it can already beobtained on request from Jurriaan Hage.

Contact

[email protected]

7.2.4 Interactive Domain Reasoners

Report by: Bastiaan HeerenParticipants: Johan Jeuring, Alex Gerdes, Josje Lodder,

Hieke KeuningStatus: experimental, active development

The Ideas project at the Open Universiteit andUtrecht University aims at developing domain reason-ers for stepwise exercises on various topics. These rea-soners assist students in solving exercises incrementallyby checking intermediate steps, providing feedback onhow to continue, and detecting common mistakes. Thereasoners are based on a strategy language, and feed-back is derived automatically from rewriting strategiesthat are expressed in this language. The calculationof feedback is offered as a set of web services, enablingexternal (mathematical) learning environments to useour work. We currently have a binding with the DigitalMathematics Environment of the Freudenthal Institute(first/left screenshot), the ActiveMath learning systemof the DFKI and Saarland University (second/rightscreenshot), and several exercise assistants of our own.

We have used our domain reasoners to model dia-logues in Communicate!, which is a serious game fortraining communication skills. This game is being de-veloped by a team of teachers and students at UtrechtUniversity.A group of bachelor students from the Open Univer-

siteit has developed a new web interface for our tutor

for logic, to which we have added exercises for provingequivalences.We have continued working on the domain reason-

ers that are used by our programming tutors. TheAsk-Elle functional programming tutor lets you prac-tice introductory functional programming exercises inHaskell. We have extended this tutor with QuickCheckproperties for testing the correctness of student pro-grams, and for the generation of counterexamples. Wehave analysed the usage of the tutor to find out howmany student submissions are correctly diagnosed asright or wrong. Tim Olmer has developed a tutor inwhich a student can practice with evaluating Haskellexpressions. Finally, Hieke Keuning has developed aprogramming tutor for imperative programming.

The library for developing domain reasoners withfeedback services is available as a Cabal source pack-age. We have written a tutorial on how to make yourown domain reasoner with this library. We have alsoreleased our domain reasoner for mathematics and logicas a separate package.

Further reading

◦ Bastiaan Heeren, Johan Jeuring, and Alex Gerdes.Specifying Rewrite Strategies for InteractiveExercises. Mathematics in Computer Science,3(3):349–370, 2010.

◦ Bastiaan Heeren and Johan Jeuring. Feedbackservices for stepwise exercises. Science of ComputerProgramming, Special Issue on SoftwareDevelopment Concerns in the e-Learning Domain,volume 88, 110–129, 2014.

◦ Tim Olmer, Bastiaan Heeren, Johan Jeuring.Evaluating Haskell expressions in a tutoringenvironment. Trends in Functional Programming inEducation 2014.

◦ Hieke Keuning, Bastiaan Heeren, Johan Jeuring.Strategy-based feedback in a programming tutor.Computer Science Education Research Conference(CSERC 2014).

◦ Johan Jeuring, Thomas van Binsbergen, AlexGerdes, Bastiaan Heeren. Model solutions andproperties for diagnosing student programs inAsk-Elle. Computer Science Education ResearchConference (CSERC 2014).

41

Page 42: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

7.3 Parsing and Transforming

7.3.1 epub-metadata

Report by: Dino MorelliStatus: experimental, actively developed

Library for parsing and manipulating epub OPF pack-age data. Now with epub3 support.

◦ Added support for epub3 documents. This was doneusing a single set of datatypes, not specific to eitherepub2 or epub3.

◦ Redesigned the book file querying API to be an edsl.Actions are to be combined together based on whatthe developer needs from the document.

◦ Data structures to contain epub metadata “sections”were redesigned to no longer be nested. Part of thischange includes a typeclass-based pretty-print APIfor displaying this data.

◦ Documentation rewrites and additions, including aworking code example in the API docs.

epub-metadata is available from Hackage and theDarcs repository below.See also epub-tools (→ 7.9.1).

Further reading

◦ Project page:http://ui3.info/d/proj/epub-metadata.html

◦ Source repository: darcs gethttp://ui3.info/darcs/epub-metadata

7.3.2 Utrecht Parser Combinator Library:uu-parsinglib

Report by: Doaitse SwierstraStatus: actively developed

With respect to the previous version the code for build-ing interleaved parsers was split off into a separatepackage uu-interleaved, such that it can be usedby other parsing libraries too. Based on this an-other small package uu-options was constructed whichcan be used to parse command line options and fileswith preferences. The internals of these are describedin a technical report: http://www.cs.uu.nl/research/techreps/UU-CS-2013-005.html.As an example of its use we show how to fill a record

from the command line. We start out by defining therecord which is to hold the options to be possibly set:

data Prefers = Agda | Haskell deriving Showdata Address = Address {city_ :: String

, street_ :: String}deriving Show

data Name = Name { name_ :: String, prefers_ :: Prefers, ints_ :: [ Int], address_ :: Address}

deriving Show$ (deriveLenses ” Name)$ (deriveLenses ” Address)

The next thing to do is to specify a default record con-taining the default values:

defaults = Name "Doaitse" Haskell [ ](Address "Utrecht"

"Princetonplein")

Next we define the parser for the options, by specifyingeach 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 commandrun (($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, auto-matic error reporting and correction steps in and youget the following message:

./OptionsDemo --street=Zandlust -nDoaitse-i3 --city=Tynaarlo--name [Char] optional Name--ints Int recurring Some numbers

42

Page 43: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

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 pro-duce their results online, do not hang on to the in-put and provide excellent error messages. As suchthey are “surprise free” when used by people not fullyaware of their internal workings.

◦ Parsers “correct” the input such that parsing canproceed when an erroneous input is encountered.

◦ The library basically provides the to be preferred ap-plicative interface and a monadic interface where thisis really needed (which is hardly ever).

◦ No need for try-like constructs which make writingParsec based parsers tricky.

◦ Scanners can be switched dynamically, so several dif-ferent languages can occur intertwined in a single in-put file.

◦ Parsers can be run in an interleaved way, thus gen-eralizing the merging and permuting parsers into asingle applicative interface. This makes it e.g. pos-sible to deal with white space or comments in theinput in a completely separate way, without havingto think about this in the parser for the languageat hand (provided of course that white space is notsyntactically relevant).

Future plans

Future versions will contain a check for grammars beingnot left-recursive, thus taking away the only remainingsource of surprises when using parser combinator li-braries. This makes the library even greater for use inteaching environments. Future versions of the library,using even more abstract interpretation, will make useof computed look-ahead information to speed up theparsing process further.

Contact

If you are interested in using the current version of thelibrary in order to provide feedback on the providedinterface, contact 〈[email protected]〉. There is alow volume, moderated mailing list which was movedto 〈[email protected]〉 (see also http://www.cs.uu.nl/wiki/bin/view/HUT/ParserCombinators).

7.3.3 Grammar Products, Set Grammars, andAutomatic Outside Grammars

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

Grammars Products

We have developed a theory of algebraic operationsover linear and context-free grammars. This theory al-lows us to combine simple “atomic” grammars to createmore complex ones.With the compiler that accompanies our theory, we

make it easy to experiment with grammars and theirproducts. Atomic grammars are user-defined and thealgebraic operations on the atomic grammars are em-bedded in a rigerous mathematical framework.Our immediate applications are problems in compu-

tational biology and linguistics. In these domains, al-gorithms that combine structural features on individ-ual inputs (or tapes) with an alignment or structurebetween tapes are becoming more commonplace. Ourtheory will simplify building grammar-based applica-tions by dealing with the intrinsic complexity of thesealgorithms.We provide multiple types of output. LATEX is avail-

able to those users who prefer to manually write the re-sulting grammars. Alternatively, Haskell modules canbe created. TemplateHaskell and QuasiQuoting ma-chinery is also available turning this framework into afully usable embedded domain-specific language. TheDSL or Haskell module use ADPfusion (→ 7.11.1) withmultitape extensions, delivering “close-to-C” perfor-mance.

Set Grammars

Most dynamic programming frameworks we are awareof deal with problems over sequence data. Thereare, however, many dynamic programming solutions toproblems that are inherently non-sequence like. Hamil-tonian path problems, finding optimal paths through agraph while visiting each node, are a well-studied ex-ample.We have extended our formal grammar library to

deal with problems that can not be encoded via lineardata types. This provides the user of our frameworkwith two benifits. She can now easily encode problems

43

Page 44: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

based on set-like inputs and obtain dynamic program-ming solutions. On a more general level, the extensionof ADPfusion and the formal grammars library showshow to encode new classes of problems that are nowgaining traction and are being studied.

Automatic Outside Grammars

Our third contribution to high-level and efficient dy-namic programming is the ability to automatically con-struct Outside algorithms given an Inside algorithm.The combination of an Inside algorithm and its cor-responding Outside algorithm allow the developer toanswer refined questions for the ensemble of all (sub-optimal) solutions.The image below depicts one such automatically cre-

ated grammar that parses a string from the Outside in.T and C are non-terminal symbols of the Outside gram-mar; the production rules also make use of the S andB non-terminals of the Inside version.

One can, for example, not only ask for the most effi-cient path through all cities on a map, but also answerwhich path between two cities is the most frequentedone, given all possible travel routes. In networks, thisallows one to determine paths that are chosen with highlikelihood.

Further reading

◦ http://www.bioinf.uni-leipzig.de/Software/gramprod/◦ http://www.bioinf.uni-leipzig.de/Software/setgram/◦ http://dx.doi.org/10.1109/TCBB.2014.2326155◦ http://dx.doi.org/10.1007/978-3-319-12418-6_8

7.3.4 HERMIT

Report by: Andy GillParticipants: Andrew Farmer, Ed Komp, Neil

Sculthorpe, Adam Howell, Ryan ScottStatus: active

The Haskell Equational Reasoning Model-to-Implementation Tunnel (HERMIT) is an NSF-fundedproject being run at KU (→ 9.8), which aims to im-prove the applicability of Haskell-hosted Semi-FormalModels to High Assurance Development. Specifically,HERMIT uses a Haskell-hosted DSL and a newrefinement user interface to perform rewrites directlyon Haskell Core, the GHC internal representation.This project is a substantial case study of the appli-

cation of Worker/Wrapper. In particular, we want todemonstrate the equivalences between efficient Haskell

programs, and their clear specification-style Haskellcounterparts. In doing so there are several open prob-lems, including refinement scripting and managing scal-ing issues, data representation and presentation chal-lenges, and understanding the theoretical boundariesof the worker/wrapper transformation.We have reworked KURE (http://www.haskell.org/

communities/11-2008/html/report.html#sect5.5.7), aHaskell-hosted DSL for strategic programming, asthe basis of our rewrite capabilities, and constructedthe rewrite kernel making use of the GHC Pluginsarchitecture. A journal writeup of the KURE internalshas been submitted to JFP, and is available on thegroup webpage. As for interfaces to the kernel, wecurrently have a command-line REPL, and an Androidversion is under development. We have used HERMITto successfully mechanize many smaller examples ofprogram transformations, drawn from the literatureon techniques such as concatenate vanishes, tuplingtransformation, and worker/wrapper.We are scaling up our capabilities, and working on

larger examples, including the mechanization of im-provements to the classical game of life. We also sub-mitted a paper to the Haskell Symposium 2014 with adescription of our support for equational reasoning inHERMIT, including a mechanization of Bird’s “Makinga Century”.HERMIT is also being used in three projects.

◦ Michael Adams used HERMIT to mechanize the op-timization of scrap your boilerplate generics, lead-ing to execution speeds that were as fast as hand-optimized code (→ 7.4.1). The result was publishedin PEPM, where it was awarded a best paper award.

◦ Andrew Farmer has used HERMIT to implement acustom GHC optimization pass which enables fusionof nested streams within the Stream Fusion frame-work. This work was also published in PEPM.

◦ Finally, Conal Elliott is working on typed reificationof Core using HERMIT.

Further reading

https://github.com/ku-fpg/hermit

7.3.5 parsers

Report by: Edward KmettParticipants: Nathan Filardo, Dag Odenall, Mario

Blazevic, Tony Morris, Tim Dixon, GregFitzgerald

Status: actively developed

This package provides a common lingua franca forworking with parsec-like parsing combinator libraries,such that the combinators support being lifted overmonad transformers. Instances are provided for usewith the parsec Parser and base’s ReadP, and it is

44

Page 45: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

used by trifecta (→ 7.3.6) to provide its suite of pars-ing combinators.Notably, many of the combinators have been modi-

fied to only require the use of Alternative rather thanMonadPlus, enabling some base Parser instances to op-erate more efficiently.

Further reading

http://hackage.haskell.org/package/parsers

7.3.6 trifecta

Report by: Edward KmettParticipants: Austin Seipp, Nathan Filardo, John

WeigleyStatus: actively developed

This package is designed to explore the space of “hu-man scale” parsers for programming languages. That isto say, it isn’t optimized for parsing protocols or otherhuge streaming datasets, but rather to provide nice er-ror messages for files that are usually written by handby human beings.Trifecta supports clang-style colored diagnostics

with markup denoting locations, spans and fixits foruser 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 func-

tionality beyond basic parsing, such as syntax high-lighting, that arise once you have a programming lan-guage.In the long term, we plan to support built-in CPP,

auto-completion and parser transformers to supportHaskell-style layout.

Further reading

http://hackage.haskell.org/package/trifecta

7.4 Generic and Type-Level Programming

7.4.1 Optimising Generic Functions

Report by: José Pedro MagalhãesParticipants: Michael D. Adams, Andrew FarmerStatus: actively developed

Datatype-generic programming increases program re-liability by reducing code duplication and enhancingreusability and modularity. However, it is known thatdatatype-generic programs often run slower than type-specific variants, and this factor can prevent adoptionof generic programming altogether. There can be mul-tiple reasons for the performance penalty, but often it iscaused by conversions to and from representation typesthat do not get eliminated during compilation.Fortunately, it is also known that generic functions

can be specialised to concrete datatypes, removing anyoverhead from the use of generic programming. We

have investigated compilation techniques to specialisegeneric functions and remove the performance over-head of generic programs in Haskell. We used a rep-resentative generic programming library and inspectedthe generated code for a number of example genericfunctions. After understanding the necessary com-piler optimisations for producing efficient generic code,we benchmarked the runtime of our generic functionsagainst handwritten variants, and concluded that allthe overhead can indeed be removed automatically bythe compiler. More details can be found in the IFL’12paper linked below.We have also investigated how to optimise the pop-

ular Scrap Your Boilerplate (SYB) generic program-ming library. Using a HERMIT (→ 7.3.4) script forimplementing an optimisation pass in the compiler, wehave removed all runtime overhead from SYB func-tions. More details can be found in the draft paperlinked below.

Further reading

◦ Optimisation of Generic Programs through Inlining◦ Optimizing SYB Is Easy!

7.4.2 constraints

Report by: Edward KmettParticipants: Sjoerd Visscher, Austin SeippStatus: actively developed

This package provides data types and classes for ma-nipulating values of kind Constraint as exposed by GHCsince 7.4.

Further reading

◦ http://hackage.haskell.org/package/constraints◦ http://comonad.com/reader/2011/

what-constraints-entail-part-1/◦ http://comonad.com/reader/2011/

what-constraints-entail-part-2/

7.5 Mathematics

7.5.1 Rlang-QQ

Report by: Adam VogtStatus: active development

Rlang-QQ is intended to make it easier to call R fromHaskell programs. This allows access to a large num-ber of R packages for graphing, statistics or other uses.Rlang-QQ provides a quasiquoter which runs the R in-terpreter and tries to translate values between the twolanguages.Haskell expressions can be referenced from R using

syntax like $(take 10 [1.0 .. ]). Haskell variablescan also be passed in by prefixing them with hs_: hs_xrefers to x. Values that can be taken out of a Haskell

45

Page 46: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

x :: Chan t are accessible using ch_x. When theR code has an assignment such as hs_x <- f(), thequasiquote evaluates to an HList record which containsthe result from f().Future work may include supporting the serialization

of more data types between the two languages, passingdata between the two runtimes in-memory instead ofthrough files, and doing inference when possible on theR-code to restrict the types of the Haskell values thatare serialized or deserialized.

Further reading

◦ http://hackage.haskell.org/package/Rlang-QQ◦ http://www.r-project.org/◦ http://www.haskell.org/haskellwiki/Quasiquotation

7.5.2 order-statistics

Report by: Edward KmettStatus: stable

This package extends Bryan O’Sullivan’s statisticspackage 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, andhave the benefit that you can jackknife them withoutchanging their asymptotics.This package provides a compositional vocabulary

for describing order statistics.

Further reading

◦ http://hackage.haskell.org/package/order-statistics◦ http://en.wikipedia.org/wiki/Order_statistic◦ http://en.wikipedia.org/wiki/L-estimator

7.5.3 Eliminating Redundancies in Linear Systems

Report by: Philipp KantStatus: active

A recurring task in perturbative quantum field theory isthe exact solution of very large systems of linear equa-tions, where the coefficients are multivariate polynomi-als. The systems can contain hundreds of thousands ofequations, where many of those equations are linearlydependent. In complicated cases, solving the systemrequires several months of CPU time.ICE is a small Haskell program that detects which

equations in a given set are linearly independent, sothat the rest can be safely discarded before an attemptto solve the system. Thus, the time that would be spentprocessing redundant information can be saved.

The algorithm works by mapping the whole systemhomomorphically from the ring of multivariate polyno-mials to a finite field Fp, where computations are cheapand the system can be solved fast using standard Gaus-sian elimination. By keeping track of the required rowpermutations, the linearly independent equations areidentified.Future plans include to use multiple images in Fp to

solve the original system via rational function recon-struction. This would avoid the intermediate expres-sion swell that is encountered when a linear systemover multivariate polynomials is solved directly.

Further reading

http://arxiv.org/abs/1309.7287

7.5.4 linear

Report by: Edward KmettParticipants: Anthony Cowley, Ben Gamari, Jake

McArthur, John Weigley, Elliott Hird, EricMertens, Niklas Haas, Casey McCann

Status: actively developed

This package provides ‘low-dimensional’ linear algebraprimitives that are based explicitly on the notion thatall vector spaces are free vector spaces, and so are iso-morphic to functions from some basis to an underlyingfield. This lets us use representable functors, which arerepresented by such a basis to encode all of our linearalgebra operations, and provides a natural encoding fordense vector spaces.A nice lens-based API is provided that permits pun-

ning of basis vector names between different vectortypes.

Further reading

http://hackage.haskell.org/package/linear

7.5.5 algebra

Report by: Edward KmettStatus: experimental

This package provides a large cross section of construc-tive abstract algebra.Notable theoretical niceties include the fact that cov-

ectors form a Monad, linear maps form an Arrow, andthis package bundles a rather novel notion of geometriccoalgebra alongside the more traditional algebras andcoalgebras.

Further reading

http://hackage.haskell.org/package/algebra

46

Page 47: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

7.5.6 semigroups and semigroupoids

Report by: Edward KmettParticipants: Nathan van Doorn, Mark Wright, Adam

CurtisStatus: stable

The semigroups package provides a standard locationto obtain the notion of Semigroup.The semigroupoids package provides the notion of

a Semigroupoid, which is a Category that does not nec-essarily provide id. These arise in practice for manyreasons 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 iden-tity arrows, because they lack return or extract, butcould otherwise pass muster.With semigroupoids 4.0, this package has now

come to subsume the previous groupoids andsemigroupoid-extras packages.

Further reading

◦ http://hackage.haskell.org/package/semigroups◦ http://hackage.haskell.org/package/semigroupoids

7.5.7 Arithmetics packages (Edward Kmett)

Report by: Edward KmettParticipants: Sjoerd Visscher, Austin Seipp, Daniel

Bergey, Chris Schneider, Ben GamariStatus: actively developed

◦ The compensated package provides compensatedarithmetic for when you need greater precision thanthe native floating point representation can provide.A Compensated Double has over 100 bits worth ofeffective significand. Unlike other “double double”variants in other languages, this construction canbe iterated. A Compensated (Compensated Double)gives over 200 bits worth of precision.However, not all RealFloat operations have yet beenupgraded to work in full precision.

◦ The approximate package (with Sjoerd Visscherand Austin Seipp) provides a notion of approximateresult values and intervals with log-domain lowerbounds on confidence. It also provides fast piecewise-rational, but monotone increasing approximate ver-sions of log and exp that execute many times fasterthan the native machine instructions that are suit-able for use in machine learning.

◦ The intervals package (with Daniel Bergey andChris Schneider) provides basic interval arithmetic.An Interval is a closed, convex set of floating pointvalues.

We do not control the rounding mode of the endpoints of the interval when using floating point arith-metic, so be aware that in order to get precise con-tainment of the result, you will need to use an un-derlying type with both lower and upper bounds likeCReal.

◦ The log-domain package (with Ben Gamari) pro-vides log domain floats, doubles and complex num-bers with an emphasis on supporting probabilitiesbiased towards conservative lower bounds.

Further reading

◦ http://hackage.haskell.org/package/compensated◦ http://hackage.haskell.org/package/approximate◦ http://hackage.haskell.org/package/intervals◦ http://hackage.haskell.org/package/log-domain

7.5.8 ad

Report by: Edward KmettParticipants: Alex Lang, Takayuki Muranushi, Chad

Scherrer, Lennart Augustsson, BenGamari, Christopher White

Status: actively developed

This package provides an intuitive API for AutomaticDifferentiation (AD) in Haskell. Automatic differenti-ation provides a means to calculate the derivatives ofa function while evaluating it. Unlike numerical meth-ods based on running the program with multiple inputsor symbolic approaches, automatic differentiation typi-cally 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 mul-tiple primitive operations. If the (partial) derivativesof each of those operations is known, then they can becomposed to derive the answer for the derivative of theentire program at a point.This library contains at its core a single implementa-

tion that describes how to compute the partial deriva-tives of a wide array of primitive operations. It thenexposes an API that enables a user to safely combinethem using standard higher-order functions, just as youwould with any other Haskell numerical type.There are several ways to compose these individual

Jacobian matrices. We hide the choice used by theAPI behind an explicit “Mode” type-class and universalquantification. This prevents the end user from exploit-ing the properties of an individual mode, and therebypotentially violating invariants or confusing infinitesi-mals.We are actively seeking ways to better support un-

boxed 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.

47

Page 48: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

◦ Type-level “branding” is used to both prevent theend user from confusing infinitesimals and to limitunsafe access to the implementation details of eachmode.

◦ Each mode has a separate module full of combina-tors, with a consistent look and feel.

Further reading

◦ http://hackage.haskell.org/package/ad◦ http:

//en.wikipedia.org/wiki/Automatic_differentiation◦ http://www.autodiff.org/

7.5.9 integration

Report by: Edward KmettParticipants: Adrian KeetStatus: actively developed

This package provides robust numeric integration viatanh-sinh quadrature. “Tanh-Sinh quadrature schemeis the fastest known high-precision quadrature scheme,especially when the time for computing abscissas andweights is considered. It has been successfully em-ployed for quadrature calculations of up to 20,000-digitprecision. It works well for functions with blow-up sin-gularities or infinite derivatives at endpoints.”

Further reading

◦ http://hackage.haskell.org/package/integration◦ http://en.wikipedia.org/wiki/Tanh-sinh_quadrature◦ http://crd-legacy.lbl.gov/~dhbailey/dhbpapers/

dhb-tanh-sinh.pdf

7.5.10 categories

Report by: Edward KmettParticipants: Gwern BranwenStatus: stable

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

Further reading

http://hackage.haskell.org/package/categories

7.5.11 contravariant

Report by: Edward KmettParticipants: Dag Odenhall, Merijn VerstraatenStatus: stable

This package provides the notion of a contravariantfunctor, along with various forms of composition forcontravariant functors and Day convolution.

Further reading

◦ http://hackage.haskell.org/package/contravariant◦ http://ncatlab.org/nlab/show/Day+convolution

7.5.12 bifunctors

Report by: Edward KmettStatus: stable

This package provides a standard location to retrievethe notion of a Bifunctor, Bifoldable or Bitraversabledata type.

Further reading

◦ http://hackage.haskell.org/package/bifunctors◦ http://ncatlab.org/nlab/show/bifunctor

7.5.13 profunctors

Report by: Edward KmettParticipants: Shachaf Ben-Kiki, Elliott HirdStatus: stable

This package provides profunctors, which act like anArrow 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 con-

tents of the older profunctors, profunctor-extrasand 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 profunc-tors, along with weaker notions of Strong and Choicethat correspond to various Arrow classes, profunctorcomposition.

Further reading

◦ http://hackage.haskell.org/package/profunctors◦ http://blog.sigfpe.com/2011/07/

profunctors-in-haskell.html◦ https://www.fpcomplete.com/school/

to-infinity-and-beyond/pick-of-the-week/profunctors◦ http://ncatlab.org/nlab/show/profunctor

48

Page 49: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

7.5.14 comonad

Report by: Edward KmettParticipants: Dave Menendez, Gabor Greif, David

Luposchainsky, Sjoerd Visscher, LukePalmer, Nathan van Doorn

Status: stable

This package provides the comonads, the categoricaldual of monads, along with comonad transformers, andthe comonadic equivalent of the mtl.With comonad 4.0 we’ve merged together the con-

tents of the older comonad, comonad-transformers,and comonads-fd packages.You can work with this package using Dominic Or-

chard’s codo-notation, or use them directly.The kan-extensions (→ 7.5.16) package also pro-

vides a transformer that can turn a comonad into amonad.

Further reading

◦ http://hackage.haskell.org/package/comonad◦ http://comonad.com/haskell/Comonads_1.pdf◦ http://www.cs.ox.ac.uk/ralf.hinze/WG2.8/28/slides/

Comonad.pdf◦ http://www.cl.cam.ac.uk/~dao29/publ/

codo-notation-orchard-ifl12.pdf◦ http://www.ioc.ee/~tarmo/papers/cmcs08.pdf◦ http://cs.ioc.ee/~tarmo/papers/essence.pdf

7.5.15 recursion-schemes

Report by: Edward KmettStatus: stable

This package provides generalized bananas, lenses andbarbed wire based on the recursion schemes that cameout of the constructive algorithmics community overthe years.In addition to the standard recursion schemes, all of

their distributive laws can be made compositional, en-abling the creation of such interesting and impracticalbeasts as the zygohistomorphic prepromorphism.

Further reading

◦ http://hackage.haskell.org/package/recursion-schemes

◦ http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.174.8068&rep=rep1&type=pdf

◦ http://math.ut.ee/~eugene/kabanov-vene-mpc-06.pdf

◦ http://www.ioc.ee/~tarmo/tday-viinistu/kabanov-slides.pdf

◦ http://www.ioc.ee/~tarmo/papers/msfp08.pdf◦ http://www.cs.uu.nl/wiki/pub/GP/Schedule/

JoaoAlpuim.pdf◦ http://eprints.eemcs.utwente.nl/7281/01/

db-utwente-40501F46.pdf◦ http://www.mii.lt/informatica/pdf/INFO141.pdf

◦ http://wwwhome.ewi.utwente.nl/~fokkinga/mmfphd.pdf

◦ http://comonad.com/reader/2008/elgot-coalgebras/◦ http://comonad.com/reader/2008/

time-for-chronomorphisms/◦ http://comonad.com/reader/2008/

dynamorphisms-as-chronomorphisms/◦ http://comonad.com/reader/2008/

generalized-hylomorphisms/◦ http://web.engr.oregonstate.edu/~erwig/meta/◦ http://citeseerx.ist.psu.edu/viewdoc/download?doi=

10.1.1.4.9706&rep=rep1&type=pdf◦ http://www.cs.ox.ac.uk/people/jeremy.gibbons/

publications/metamorphisms-scp.pdf

7.5.16 kan-extensions

Report by: Edward KmettStatus: stable

This package provides Kan extensions, Kan lifts, var-ious forms of the Yoneda lemma, and (co)density(co)monads.These constructions have proven useful for many pur-

poses:◦ Codensity can be used to accelerate the performance

of code written for free monads or to correct the as-socativity of an “almost-monad” that fails the asso-ciativity law, as it performs a sort of fusion on (>>=)operations.

◦ CoT can be used to turn any Comonad into a Monadtransformer.

◦ Various forms of the Yoneda lemma give rise to waysto enforce “Functor fusion”.

Further reading

◦ http://hackage.haskell.org/package/kan-extensions◦ http://blog.sigfpe.com/2006/11/yoneda-lemma.html◦ http:

//blog.sigfpe.com/2006/12/yonedic-addendum.html◦ http://comonad.com/reader/2008/kan-extensions/◦ http://comonad.com/reader/2008/kan-extensions-ii/◦ http://comonad.com/reader/2008/kan-extension-iii/◦ http://blog.ezyang.com/2012/01/

problem-set-the-codensity-transformation/◦ http://www.iai.uni-bonn.de/~jv/mpc08.pdf◦ http://www.cs.ox.ac.uk/ralf.hinze/Kan.pdf◦ http://ncatlab.org/nlab/show/Kan+lift◦ http://hackage.haskell.org/package/monad-ran

7.5.17 arb-fft

Report by: Ian RossStatus: actively developed

This package started as an experiment to see howclose a pure Haskell FFT implementation could get toFFTW (“the Fastest Fourier Transform in the West”).

49

Page 50: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

The result is a library that can do fast Fourier trans-forms for arbitrarily sized vectors with performancewithin 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 writean equivalent of FFTW’s genfft, a metaprogrammingtool to generate fast straight-line code for transforms ofspecialised sizes. Other planned work includes imple-menting real-to-complex and real-to-real transforms,multi-dimensional transforms, and some low-level op-timisation.

Further reading

◦ http://hackage.haskell.org/package/arb-fft◦ http://www.skybluetrades.net/haskell-fft-index.html

7.5.18 hblas

Report by: Carter Tazio SchonwaldParticipants: Stephen Diehl and Csernik Flaviu AndreiStatus: Actively Developed

hblas is high level, easy to extend BLAS/LAPACKFFI Binding for Haskell.hblas has several attributes that in aggregate distin-

guish it from alternative BLAS/LAPACK bindings forHaskell.

1. Zero configuration install

2. FFI wrappers are written in Haskell

3. Provides the fully generality of each supportedBLAS/LAPACK routine, in a type safe wrapper thatstill follows the naming conventions of BLAS andLAPACK.

4. Designed to be easy to extend with further bindingsto BLAS/LAPACK routines (because there are manymany specialized routines!)

5. Adaptively choses between unsafe vs safe foreigncalls based upon estimated runtime of a computa-tion, to ensure that long running hblas ffi calls in-teract safely with the GHC runtime and the rest ofan application.

6. hblas is not an end user library, but is designed toeasily interop with any array library that supportsstorable vectors.

Further reading

◦ http://www.wellposed.com◦ http://www.github.com/wellposed/hblas◦ http://hackage.haskell.org/package/hblas

7.5.19 HROOT

Report by: Ian-Woo KimStatus: Actively Developing

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

industrial-strength statistical analysis libraries to thehaskell community. The haskell code for using HROOTis very straightforward to both haskell and C++ pro-grammers thanks to the fficxx binding generator tool.The following is a sample code and a resultant his-togram for histogramming a 2D gaussian distribution:

import Data.Random.Distribution.Normalimport HROOT

main :: IO ()main = dotcanvas <- newTCanvas "Test" "Test" 640 480h2 <- newTH2F "test" "test"

100 (-5.0) 5.0 100 (-5.0) 5.0let dist1 = Normal (0 :: Double)

(2 :: Double)let go n | n < 0 = return ()

| otherwise = dohistfill dist1 dist2 h2go (n-1)

go 1000000draw h2 "lego"saveAs tcanvas "random2d.pdf" ""

histfill :: Normal Double -> TH2F -> IO ()histfill dist1 hist = dox <- sample dist1y <- sample dist1fill2 hist x yreturn ()

50

Page 51: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

Until ghc 7.6, HROOT cannot be used in interpretermode of ghc, due to the linker problem. Now with ghc7.8, ghci now uses the standard system linker for dy-namically loaded library. Thus, our current focus is tohave full ghc interpreter support for making HROOT areally useful analysis framework. In addition, we keepimporting features from ROOT to available haskellfunctions.

Further reading

http://ianwookim.org/HROOT

7.5.20 Numerical

Report by: Carter Tazio SchonwaldStatus: actively developed

The Numerical project, starting with the numericalpackage, has the goal of providing a general purposenumerical computing substrate for Haskell.To start with, the numerical provides an extensible

set of type classes suitable for both dense and sparsemulti dimensional arrays, high level combinators forwriting good locality code, and some basic matrix com-putation routines that work on both dense and sparsematrix formats.The core Numerical packages, including numerical,

are now in public pre-alpha as of mid May 2014, withon going active work as of November 2014.Development of the numerical packages is public on

github, and as they stabilize, alpha releases are beingmade available on hackage.

Further reading

◦ http://www.wellposed.com◦ http://www.github.com/wellposed/numerical◦ http://hackage.haskell.org/package/numerical

7.6 Data Types and Data Structures

7.6.1 HList — A Library for Typed HeterogeneousCollections

Report by: Adam VogtParticipants: Oleg Kiselyov, Ralf Lämmel, Keean

Schupke

HList is a comprehensive, general purpose Haskell li-brary for typed heterogeneous collections including ex-tensible polymorphic records and variants. HList isanalogous to the standard list library, providing a hostof various construction, look-up, filtering, and iterationprimitives. In contrast to the regular lists, elements ofheterogeneous lists do not have to have the same type.HList lets the user formulate statically checkable con-straints: for example, no two elements of a collection

may have the same type (so the elements can be un-ambiguously indexed by their type).An immediate application of HLists is the im-

plementation of open, extensible records with first-class, reusable, and compile-time only labels. Thedual application is extensible polymorphic variants(open unions). HList contains several implementa-tions of open records, including records as sequencesof field values, where the type of each field is an-notated with its phantom label. We and othershave also used HList for type-safe database accessin Haskell. HList-based Records form the basis ofOOHaskell. The HList library relies on commonextensions of Haskell 2010. HList is being usedin AspectAG (http://www.haskell.org/communities/11-2011/html/report.html#sect5.4.2), typed EDSL ofattribute grammars, and in Rlang-QQ.The October 2012 version of HList library marks

the significant re-write to take advantage of the fanciertypes offered by GHC 7.4 and 7.6. HList now relies onpromoted data types and on kind polymorphism.Since the last update, there have been several mi-

nor releases. These include features such as supportfor ghc-7.8 as well as additional syntax for the punquasiquote.

Further reading

◦ HList repository: http://code.haskell.org/HList/◦ HList:

http://okmij.org/ftp/Haskell/types.html#HList◦ OOHaskell:

https://web.archive.org/web/20130129031410/http://homepages.cwi.nl/~ralf/OOHaskell

7.6.2 Persistent

Report by: Greg WeberParticipants: Michael Snoyman, Felipe LessaStatus: stable

Persistent is a type-safe data store interface for Haskell.After years of stability, Persistent just recently had a2.0 release.Persistent 2.0 features◦ a flexible, yet more type-safe Key type◦ a simplified monad stackHaskell has many different database bindings avail-

able, but most provide few usefeul static guarantees.Persistent uses knowledge of the data schema to pro-vide a type-safe interface to the database. Persistent isdesigned to work across different databases, currentlyworking on Sqlite, PostgreSQL, MongoDB, MySQL,Redis, and ZooKeeper.Persistent provides a high-level query interface that

works against all backends.

51

Page 52: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

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 writ-ing arbitrary SQL queries that is built on Persistent.

Future plans

Possible future directions for Persistent:◦ Declaring a schema separately from a record, possi-bly leveraging GHC’s new annotations featurePersistent 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 evenweb development about it. You can have a type-safe,productive way to store data for any kind of Haskellproject.

Further reading

◦ http://www.yesodweb.com/book/persistent◦ http://hackage.haskell.org/package/esqueleto◦ http:

//www.yesodweb.com/blog/2014/09/persistent-2◦ http://www.yesodweb.com/blog/2014/08/

announcing-persistent-2

7.6.3 Groundhog

Report by: Boris LykahStatus: stable

Groundhog is a library for mapping user defineddatatypes to the database and manipulating them in ahigh-level typesafe manner. It is easy to plug Ground-hog into an existing project since it does not need mod-ifying a datatype or providing detailed settings. Theschema can be configured flexibly which facilitates inte-gration with existing databases. It supports compositekeys, indexes, references across several schemas. Justone line is enough to analyze the type and map it tothe table. The migration mechanism can automati-cally check, initialize, and migrate database schema.Groundhog has backends for Sqlite, PostgreSQL, andMySQL.Unlike Persistent (→ 7.6.2) it maps the datatypes in-

stead of creating new ones. The types can be poly-morphic and contain multiple constructors. It al-lows creating sophisticated queries which might includearithmetic expressions, functions, and operators. Thedatabase-specific operators, for example, array-relatedin PostgreSQL are statically guaranteed to run onlyfor PostgreSQL connection. Its support for the natu-ral and composite keys is implemented using genericembedded 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 includePostgreSQL geometric operators, Fractional, Floating,and Integral instances for lifted expressions, loggingqueries, references to tables not mapped to Haskelldatatype, default column values, and several utilityfunctions.

Further reading

◦ Tutorial,http://www.fpcomplete.com/user/lykahb/groundhog

◦ Homepage, http://github.com/lykahb/groundhog◦ Hackage package,

http://hackage.haskell.org/package/groundhog

7.6.4 reflection

Report by: Edward KmettParticipants: Elliott Hird, Oliver Charles, Carter

SchonwaldStatus: stable

This package provides a mechanism to dynamicallyconstruct a type from a term that you can reflect backdown to a term based on the ideas from “FunctionalPearl: Implicit Configurations” by Oleg Kiselyov andChung-Chieh Shan. However, the API has been imple-mented 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.

Further reading

◦ http://hackage.haskell.org/package/reflection◦ http:

//www.cs.rutgers.edu/~ccshan/prepose/prepose.pdf◦ http://comonad.com/reader/2009/incremental-folds/◦ http://comonad.com/reader/2009/clearer-reflection/◦ https://www.fpcomplete.com/user/thoughtpolice/

using-reflection

7.6.5 tag-bits

Report by: Edward KmettStatus: stable

This package provides access to the dynamic pointertagging bits used by GHC, and can peek into infotablesto determine (unsafely) whether or not a thunk hasalready been evaluated.

Further reading

◦ http://hackage.haskell.org/package/tag-bits◦ http://research.microsoft.com/en-us/um/people/

simonpj/papers/ptr-tag/◦ http://ghc.haskell.org/trac/ghc/wiki/Commentary/

Rts/HaskellExecution/PointerTagging◦ http://ghc.haskell.org/trac/ghc/wiki/Commentary/

Rts/Storage/HeapObjects

52

Page 53: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

7.6.6 hyperloglog

Report by: Edward KmettParticipants: Ozgun AtamanStatus: actively developed

This package provides an approximate streaming (con-stant space) unique object counter.Notably it can be used to approximate a set of several

billion elements with 1-2% inaccuracy in around 1.5kof memory.

Further reading

◦ http://hackage.haskell.org/package/hyperloglog◦ http:

//algo.inria.fr/flajolet/Publications/FlFuGaMe07.pdf

7.6.7 concurrent-supply

Report by: Edward KmettParticipants: Andrew Cowie, Christiaan BaaijStatus: stable

This package provides a fast supply of concurrentunique identifiers suitable for use within a single pro-cess. This benefits from greatly reduced locking over-head compared to Data.Unique as it only contents forthe common pool every thousand or so identifiers.One often has a desire to generate a bunch of inte-

ger identifiers within a single process that are uniquewithin that process. You could use UUIDs, but theycan be expensive to generate; you don’t want to haveyour threads contending for a single external counter ifthe identifier is not going to be used outside the pro-cess.concurrent-supply builds a rose-tree-like structure

which can be split; you can make smaller unique sup-plies and then you allocate from your supplies locally.Internally it pulls from a unique supply one block ata time as you walk into parts of the tree that haven’tbeen explored. This ensures that computations are al-ways replayable within a process, and that the resultappears purely functional to an outside observer.

Further reading

http://hackage.haskell.org/package/concurrent-supply

7.6.8 hybrid-vectors

Report by: Edward KmettStatus: actively developed

This package provides various ways in which you canmix the different types of Vector from Roman Leschin-skiy’s vector package to work with partially unboxedstructures.

Further reading

◦ http://hackage.haskell.org/package/hybrid-vectors◦ https://www.fpcomplete.com/user/edwardk/

revisiting-matrix-multiplication/part-3

7.6.9 lca

Report by: Edward KmettParticipants: Daniel Peebles, Andy SonnenburgStatus: actively developed

This package improves the previous known complexitybound of online lowest common ancestor search fromO(h) to O(log h) persistently, and without preprocess-ing by using skew-binary random-access lists to storethe paths.

Further reading

◦ http://hackage.haskell.org/package/lca◦ https:

//www.fpcomplete.com/user/edwardk/online-lca◦ http://www.slideshare.net/ekmett/

skewbinary-online-lowest-common-ancestor-search

7.6.10 heaps

Report by: Edward KmettStatus: actively developed

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

Further reading

◦ http://hackage.haskell.org/package/heaps◦ http://citeseerx.ist.psu.edu/viewdoc/summary?doi=

10.1.1.48.973

53

Page 54: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

7.6.11 sparse

Report by: Edward KmettParticipants: Carter SchonwaldStatus: actively developed

This package provides sparse implicitly Morton-ordered matrices based on the series ‘revisiting matrixmultiplication’ on the School of Haskell. It is efficientfor sufficiently sparse matrices.

Further reading

◦ http://hackage.haskell.org/package/sparse◦ https://www.fpcomplete.com/user/edwardk/

revisiting-matrix-multiplication

7.6.12 compressed

Report by: Edward KmettStatus: stable

This package provides an LZ78-compressed stream asa data type in Haskell. Compression isn’t used directlyfor data compression, but rather to allow for the reuseof intermediate monoidal results when folding over thedata set. LZ78 is rather distinctive among LZ-variantsin that it doesn’t require exhaustively enumerating thetoken set or searching a window. By using conservativeapproximations of what possible values the stream maytake, it is also possible to work with this LZ78 streamas an Applicative or Monad without sacrificing too muchcompression on the resulting unfolding.A similar structure is provided for decompressing

run-length encoded data efficiently by peasant expo-nentiation.

Further reading

◦ http://hackage.haskell.org/package/compressed◦ http://oldwww.rasip.fer.hr/research/compress/

algorithms/fund/lz/lz78.html◦ http://www.binaryessence.com/dct/en000140.htm

7.6.13 charset

Report by: Edward KmettStatus: stable

This package provides fast unicode character sets basedon complemented PATRICIA tries along with commoncharsets for variations on the posix standard and stan-dard unicode blocks. This encoding has the benefit thata CharSet and its complement take the same amount ofspace. This package is used as a building block byparsers (→ 7.3.5) and trifecta (→ 7.3.6).

Further reading

http://hackage.haskell.org/package/charset

7.6.14 Convenience types (Edward Kmett)

Report by: Edward KmettParticipants: several othersStatus: stable

◦ The either package provides an EitherT monadtransformer, that unlike ErrorT does not carry theunnecessary class constraint. Removing this limita-tion is necessary for many operations.EitherT is also used extensively by Gabriel Gonzales’errors package.With either 4.0, we consolidated many of the ex-isting combinators from Chris Done’s eithers pack-age and Gregory Crosswhite’s either-unwrap pack-age, both of which are now deprecated.

◦ The tagged package provides a simple Tagged new-type that carries an extra phantom type parameter,and a Proxy data type that has since been mergedinto base with GHC 7.8.These are useful as safer ways to plumb type argu-ments than by passing undefined values around.

◦ Th void package provides a single “uninhabited”data type in a canonical location along with all ofthe appropriate instances.The need for such a data type arises in shockinglymany situations as it serves as an initial object forthe category of Haskell data types.

Further reading

◦ http://hackage.haskell.org/package/either◦ http://hackage.haskell.org/package/errors◦ http://hackage.haskell.org/package/tagged◦ http://hackage.haskell.org/package/void

7.7 User Interfaces

7.7.1 HsQML

Report by: Robin KAYStatus: active development

HsQML provides access to a modern graphical userinterface 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 QMLlanguage. The intention is that QML, which incorpo-rates both a declarative syntax and JavaScript code,can be used to design and animate the front-end ofan application while being able to easily interface withHaskell code for functionality.

54

Page 55: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

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 Quick2). Other significant new features in this release includethe ability to marshall list types and to signal propertychanges from Haskell. It has been tested on the majordesktop platforms: Linux, Windows, and MacOS.

Further reading

http://www.gekkou.co.uk/software/hsqml/

7.7.2 LGtk: Lens GUI Toolkit

Report by: Péter DiviánszkyParticipants: Csaba HruskaStatus: experimental, actively developed

LGtk is a GUI Toolkit with the following goals:

◦ Provide a Haskell EDSL for declarative descriptionof interactive graphical applications

◦ Provide an API for custom widget design

◦ Provide a playground for high-level declarative fea-tures like derived state-save and undo-redo opera-tions and type-driven GUI generation

There is a demo application which presents the cur-rent features of LGtk.

Changes in lgtk-0.8 since the last official announce-ment:

◦ 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 keyboardevents are also supported.

– Widget toolkit generated with the diagrams li-brary.

– 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 refer-

ences– Cleaned up widget interface– More efficient reference implementation

Further reading

◦ haskell.org wiki page:http://www.haskell.org/haskellwiki/LGtk

◦ Haddock documentation on HackageDB:http://hackage.haskell.org/package/lgtk

◦ Wordpress blog: http://lgtk.wordpress.com/

◦ GitHub repository: https://github.com/divipp/lgtk

7.7.3 Gtk2Hs

Report by: Daniel WagnerParticipants: Hamish Mackenzie, Axel Simon, Duncan

Coutts, Andy Stewart, and many othersStatus: beta, actively developed

Gtk2Hs is a set of Haskell bindings to many of thelibraries included in the Gtk+/Gnome platform. Gtk+is an extensive and mature multi-platform toolkit forcreating graphical user interfaces.GUIs written using Gtk2Hs use themes to resemble

the native look on Windows. Gtk is the toolkit used byGnome, one of the two major GUI toolkits on Linux.On Mac OS programs written using Gtk2Hs are runby Apple’s X11 server but may also be linked againsta native Aqua implementation of Gtk.Gtk2Hs features:

55

Page 56: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

◦ Automatic memory management (unlike some otherC/C++ GUI libraries, Gtk+ provides proper sup-port for garbage-collected languages)

◦ Unicode support◦ High quality vector graphics using Cairo◦ Extensive reference documentation◦ An implementation of the “Haskell School of Expres-

sion” 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 thegtk3 bindings, as well as myriad miscellaneous bugfixes.Thanks to all who contributed!

Further reading

◦ News and downloads: http://haskell.org/gtk2hs/◦ Development version: darcs gethttp://code.haskell.org/gtk2hs/

7.7.4 Haskell-EFL binding

Report by: Sylvain HenryStatus: Experimental

The Enlightenment Foundation Libraries (EFL) [1]provide a stateful canvas with many rendering backends(X11, Windows, OpenGL, framebuffer, . . . ) as well as aunified interface to low-level OS dependent functionali-ties: user input (keyboard, mouse, multi-point, unicodetexts with several input methods, . . . ), formatted textrendering, threads, timers, etc. Haskell-EFL is a bind-ing to these C libraries whose aim is to provide a solidfoundation to develop native Haskell widget toolkits.In its current state, the binding is close to be com-

plete for the modules we are interested in (namelyEcore and Evas). However it still needs some polishingand testing. Source code is currently available on [2]and will be made available on Hackage as soon as it isconsidered complete and stable enough.In the short term, we plan to release a stable version

on Hackage. In the medium term, we would like todevelop a native replacement for the Edje library, thatis an EDSL to create UI elements with themes, anima-tions, data-binding (FRP), etc. Finally, the long termand more demanding goal is to develop a comprehen-sive set of reusable UI components.

Further reading

[1] http://www.enlightenment.org/p.php?p=docs&l=en[2] https://github.com/hsyl20/graphics-efl

7.7.5 wxHaskell

Report by: Henk-Jan van TuylStatus: active development

The wxHaskell development has not been mentionedin the HCAR for years, but the last few years, a newbranch is developed for wxWidgets 3.0. New function-ality has been added and development is going on fora simpler installation procedure. New project partici-pants are welcome.wxHaskell is a portable and native GUI library for

Haskell. The goal of the project is to provide an indus-trial strength GUI library for Haskell, but without theburden of developing (and maintaining) one ourselves.wxHaskell is therefore built on top of wxWidgets: a

comprehensive C++ library that is portable across allmajor GUI platforms; including GTK, Windows, X11,and MacOS X. Furthermore, it is a mature library (indevelopment since 1992) that supports a wide range ofwidgets with the native look-and-feel.

Further reading

http://haskell.org/haskellwiki/WxHaskell

7.7.6 threepenny-gui

Report by: Heinrich ApfelmusStatus: active development

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

◦ Easy installation. Everyone has a reasonably mod-ern web browser installed. Just install the libraryfrom Hackage and you are ready to go. The libraryis cross-platform.

◦ HTML. You have all capabilities of HTML at yourdisposal when creating user interfaces. This is ablessing, but it can also be a curse, so the libraryincludes a few layout combinators to quickly createuser interfaces without the need to deal with themess that is CSS. A small foreign function interface(FFI) for JavaScript allows you to include JS clientlibraries.

◦ Functional Reactive Programming (FRP) promisesto eliminate the spaghetti code that you usuallyget when using the traditional imperative style forprogramming user interactions. Threepenny has anFRP library built-in, but its use is completely op-tional. Employ FRP when it is convenient and fallback to the traditional style when you hit an impasse.

56

Page 57: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

Status

The project is alive and kicking, the latest release isversion 0.5.0.0. You can download the library fromHackage and use it right away to write that cheap GUIyou need for your project. Here a screenshot from theexample code:

For a collection of real world applications that use thelibrary, 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. Thissimplifies many function signatures, in particular inthe JavaScript FFI, and allows recursive uses of FRP.Moreover, the library now includes the full set of SVGelements and the beginnings of a small Canvas API.

Current development

The library is still very much in flux, significant APIchanges are likely in future versions. The goal is tomake GUI programming as simple as possible, and thatjust needs some experimentation.While the library now also features garbage col-

lection of DOM elements, one unfortunate draw-back of the current implementation is that thegetElementsById and related combinators will notwork anymore. The next version of threepenny-guiwill fix that by completely reworking the JavaScriptFFI, making it much more robust.

Further reading

◦ Project homepage:http://haskell.org/haskellwiki/Threepenny-gui

◦ Example code:https://github.com/HeinrichApfelmus/threepenny-gui/tree/master/samples#readme

◦ Application gallery: http://haskell.org/haskellwiki/Threepenny-gui#Gallery

7.7.7 reactive-banana

Report by: Heinrich ApfelmusStatus: active development

Reactive-banana is a library for functional reactiveprogramming (FRP).FRP offers an elegant and concise way to express

interactive programs such as graphical user interfaces,animations, computer music or robot controllers. Itpromises to avoid the spaghetti code that is all too com-mon in traditional approaches to GUI programming.The goal of the library is to provide a solid founda-

tion.

◦ Writing graphical user interfaces with FRP is madeeasy. The library can be hooked into any existingevent-based framework like wxHaskell or Gtk2Hs. Aplethora of example code helps with getting started.You can mix FRP and imperative style. If you don’tknow how to express functionality in terms of FRP,just temporarily switch back to the imperative style.

◦ Programmers interested in implementing FRP willhave a reference for a simple semantics with a work-ing implementation. The library stays close to thesemantics pioneered by Conal Elliott.

◦ It features an efficient implementation. No morespooky time leaks, predicting space & time usageshould be straightforward.

Status. The latest version of the reactive-banana li-brary is 0.8.0.2.Compared to the previous report, the library finally

features a push-driven implementation that actuallydeserves that name, i.e. events that depend on otherevents will only be considered when the latter have anoccurrence. I have also made some additional perfor-mance improvements to the library.During my work on graphical user interfaces, mainly

the threepenny-gui project (→ 7.7.6), I have alsofound that some aspects of the reactive-banana API arevery cumbersome, in particular the type parameter tused to indicated starting times. I don’t think that thecurrent API will work out in the long run, but I don’twant to shut off this part of the design space just yet.Rather than changing the entire API, I have decidedto export some primitive combinators in the module

57

Page 58: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

Reactive.Banana.Prim instead, which you can use toimplement your own flavor of FRP. This module offerstwo types Pulse and Latch, on top of which you canimplement custom Event and Behavior types, with orwithout type parameters, or any other design trade-offyou want to make.

Current development. I have already put some effortinto the next version of reactive-banana. It will finallyimplement garbage collection for dynamically createdevents and behaviors, and it will also feature some dra-matic performance improvements.

Further reading

◦ Project homepage:http://haskell.org/haskellwiki/Reactive-banana

◦ Example code: http://haskell.org/haskellwiki/Reactive-banana/Examples

◦ threepenny-gui:http://haskell.org/haskellwiki/Threepenny-gui

7.8 Graphics and Audio

7.8.1 diagrams

Report by: Jeffrey RosenbluthParticipants: Daniel Bergey, Jan Bracker, Christopher

Chalmers, Daniil Frumin, Allan Gardner,Andy Gill, Niklas Haas, John Lato, ChrisMears, Jeff Rosenbluth, Michael Sloan,

Ryan Yates, Brent YorgeyStatus: active development

The diagrams framework provides an embeddeddomain-specific language for declarative drawing. Theoverall vision is for diagrams to become a viable alter-native to DSLs like MetaPost or Asymptote, but withthe advantages of being declarative—describing whatto draw, not how to draw it—and embedded—puttingthe entire power of Haskell (and Hackage) at the ser-vice of diagram creation. There is still much more tobe done, but diagrams is already quite fully-featured,with a comprehensive user manual, a large collection ofprimitive shapes and attributes, many different modesof composition, paths, cubic splines, images, text, arbi-trary monoidal annotations, named subdiagrams, andmore.

What’s new

There has been quite a bit going on with diagrams sincethe last HCAR edition. For staters version 1.0 wasreleased. We also released version 1.1 and finally inJune of 2014 the current version, 1.2. New featuresinclude:

◦ An API for drawing arrows including: several waysto connect diagrams with arrows, arbitrary shapedshafts, and a collection of arrowheads.

◦ Consistent use of the lens package to access andmodify record fields and newtypes.

◦ Performance improvements of about 30% obtainedby the use of better data structures to represent di-agram output.

◦ Support for 3D diagrams.

◦ Introduction of a new measurement type and the re-moval of the freeze function make things like han-dling line widths and text sizes more flexible andpredictable.

◦ New haskell native backends: diagrams-rasterificand diagrams-canvas.

◦ Many other features including support for: lin-ear and radial gradients, tight alignment of convexshapes, improved clipping, animated GIFs (in cairoand rasterific), creating offsets paths, and both ex-ternal and embedded images.

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

◦ Support for handling directions (vectors which haveforgotten their magnitude). Which will provide aconsistent API in all dimensions.

◦ Generic scalars values, i.e. not restricted to typeDouble.

◦ A major refactoring of the way vector spaces are han-dled using the linear package.

◦ a PGF backend with full TeX support.

58

Page 59: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

GSoC

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

◦ Allan Gardner laid the groundwork for using numerictypes beyond Double. After several iterations, thisled to the adoption of the linear package. Thispaves the way for using automatic differentiation,constraint solving, and fixed or dynamic precisionnumbers with Diagrams.

◦ Niklas Haas added lenses to diagrams, in order tomake it possible to (efficiently) traverse over dia-grams and subdiagrams, modifying them in the pro-cess.

Contributing

There is plenty of exciting work to be done; new con-tributors are welcome! Diagrams has developed anencouraging, responsive, and fun developer commu-nity, and makes for a great opportunity to learn andhack on some “real-world” Haskell code. Because of itssize, generality, and enthusiastic embrace of advancedtype system features, diagrams can be intimidating towould-be users and contributors; however, we are ac-tively working on new documentation and resourcesto help combat this. For more information on waysto contribute and how to get started, see the Con-tributing page on the diagrams wiki: http://haskell.org/haskellwiki/Diagrams/Contributing, or come hang out inthe #diagrams IRC channel on freenode.

Further reading

◦ http://projects.haskell.org/diagrams◦ http://projects.haskell.org/diagrams/gallery.html◦ http://haskell.org/haskellwiki/Diagrams◦ http://github.com/diagrams◦ https://byorgey.wordpress.com/2012/08/28/

creating-documents-with-embedded-diagrams/◦ http://www.cis.upenn.edu/~byorgey/pub/

monoid-pearl.pdf◦ http://www.youtube.com/watch?v=X-8NCkD2vOw

7.8.2 csound-expression

Report by: Anton KholomiovStatus: active, experimental

The csound-expression is a library for electronic musicproduction. It’s based on very efficient and feature richsynth Csound.It strives to be as simple and responsive as it can

be. A couple of lines of code should be enough to makesomething interesting. There are sensible defaults thatallow the user to express the musical ideas with veryshort 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 oursynth in real-time.

– The Csound can work with frequencies. Theworld of microtonal music opens up.

– We can use the library as a sampler to cre-ate soundscapes in real-time. Check out thecsound-sampler library on the Hackage.

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

– There are lots of predefined instruments. Checkout 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.

59

Page 60: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

– Csound is very portable. The output Csoundfile can run on android, i-devices, raspberry piand 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 audiosignals from the outside world.

– We can play sound fonts in sf2 format. Withthis feature we get access to thousands offree sampled instruments. Just google for freesoundfonts.

◦ The library is very composable– An audio unit is a function. It can process sig-

nals. An instrument is just a function fromnotes to signals.

– There is no barrier between notes and instru-ments. If we apply instrument to the notes weget the signal as the output. It can become apart of another instrument.

– Event streams and GUIs are based on FRP.User gets the stream of mouse clicks and canprocess it with fmap, filter it or merge with an-other signal.

Further reading

https://github.com/anton-k/csound-expression

7.8.3 Chordify

Report by: José Pedro MagalhãesParticipants: W. Bas de Haas, Dion ten Heggeler, Gijs

Bekenkamp, Tijmen RuizendaalStatus: actively developed

Chordify is a music player that extracts chords frommusical sources like Youtube, Deezer, Soundcloud, oryour 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 whocan 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 consistof the downbeat positions and the tonal content of apiece of music. Next, the Haskell program HarmTracetakes these features and computes the chords. Harm-Trace uses a model of Western tonal harmony to aidin the chord selection. At beat positions where the au-dio matches a particular chord well, this chord is usedin final transcription. However, in case there is uncer-tainty about the sounding chords at a specific positionin the song, the HarmTrace harmony model will selectthe correct chords based on the rules of tonal harmony.The basic functionality of Chordify is free for every-

one to use. PDF and MIDI transcriptions of the chordscan be obtained for a small fee. We also have monthlyand yearly Premium accounts that add functional-ity such as organising a library, transposing chords,chord playback, etc. The code for HarmTrace is avail-able on Hackage, and we have ICFP’11 and ISMIR’12publications describing some of the technology behindChordify.

Further reading

http://chordify.net

7.8.4 Glome

Report by: Jim SnowStatus: New Version of Glome Raytracer

Glome is a ray tracer I wrote quite some time ago. Theproject had been dormant for about five years untila few months ago when I decided to fix some long-standing bugs and get it back into a state that compileswith 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 intothe scene and testing them for intersection with sceneobjects. Glome supports a handful of basic primitivetypes including planes, spheres, boxes, triangles, cones,and cylinders. It also has a number of composite primi-tives that modify the behavior of other primitives, suchas CSG difference and intersection.One of the more interesting composite primitives is

a BIH-based accelleration structure, which sorts primi-tives into a hierarchy of bounding volumes. This allowsfor scenes with a very large number of primitives to berendered efficiently.Major new changes to Glome are a re-factoring of

the shader code so that it is now possible to definetextures in terms of user-defined types and write yourown shader (though the default should be fine for most

60

Page 61: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

uses), a new tagging system, some changes to the front-end viewer application (which uses SDL now instead ofOpenGL), and a new triangle mesh primitive type.

Tagging requires a bit of explanation. When a rayintersects with something in the scene, Glome returnsa lot of information about the properties of the loca-tion where the ray hit, but until recently it didn’t givemuch of a clue as to what exactly the ray hit. For 3Drendering applications, you don’t usually care, but formany computational geometry tasks you do very muchcare.

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

As an example of tags in action, I tagged some of theobjects in Glome’s default test scene, and instrumentedthe viewer so that clicking on the image causes a rayto be traced into the scene from the cursor’s location,and then we print any tags returned by the ray inter-section test. (Tags can be any type, but for illustrativepurposes, the test scene uses strings.)

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

Even though Glome is still a bit too slow for practi-cal interactive 3D applications (I’ve been able to getaround 2-3 FPS at 720x480 for reasonably complexscenes on a fairly fast machine), tags should at leastmake it easier to write interactive applications whenMoore’s law catches up.

Glome is split into three packages: GloveVec, a vec-tor library, GlomeTrace, the ray-tracing engine, andGlomeView, a simple front-end viewer application. Allare available on hackage or via github under a GPLv2license.

Further reading

◦ https://github.com/jimsnow/glome◦ http://www.haskell.org/haskellwiki/Glome

7.9 Text and Markup Languages

7.9.1 epub-tools (Command-line epub Utilities)

Report by: Dino MorelliStatus: stable, actively developed

A suite of command-line utilities for creating and ma-nipulating 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 ex-port, import and edit the raw OPF Package XML doc-ument for a given book. Or simply dump the metadatato stdout for viewing in a friendly format.epubname is a command-line utility for renaming

epub ebook files based on the metadata. It tries touse author names and title info to construct a sensiblename.epubzip is a handy utility for zipping up the files

that comprise an epub into an .epub zip file. Usingthe same technology as epubname, it can try to makea meaningful filename for the book.This project is built on the latest epub-metadata li-

brary and so supports epub3 for the first time.See also epub-metadata (→ 7.3.1).epub-tools is available from Hackage and the Darcs

repository below.

Further reading

◦ Project page: http://ui3.info/d/proj/epub-tools.html◦ Source repository: darcs get

http://ui3.info/darcs/epub-tools

61

Page 62: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

7.9.2 lens-aeson

Report by: Edward KmettParticipants: Paul Wilson, Benno FÃijnfstÃijck, Michael

Sloan, Adrian KeetStatus: actively developed

This package provides a suite of combinators that wraparound Bryan O’Sullivan’s aeson library using the lenslibrary (→ 7.1.2) to make many data access and ma-nipulation problems much more succinctly expressable.We provide lenses, traversals, isomorphisms and prismsthat conspire to make it easy to manipulate complexJSON objects.

Further reading

◦ http://hackage.haskell.org/package/lens-aeson◦ https://www.fpcomplete.com/user/tel/

lens-aeson-traversals-prisms

7.9.3 hyphenation

Report by: Edward KmettStatus: stable

This package provides configurable Knuth-Liang hy-phenation using the UTF-8 encoded hyphenation pat-terns for 69 languages, based on the patterns providedby the hyph-utf8 project for LATEX. It can be mixedwith a pretty-printer to provide proper break-pointswithin words.

Further reading

◦ http://hackage.haskell.org/package/hyphenation◦ http://www.ctan.org/tex-archive/language/hyph-utf8

7.10 Natural Language Processing

7.10.1 NLP

Report by: Eric Kow

The Haskell Natural Language Processing communityaims to make Haskell a more useful and more popularlanguage for NLP. The community provides a mailinglist, Wiki and hosting for source code repositories viathe Haskell community server.The Haskell NLP community was founded in March

2009. The list is still growing slowly as people growincreasingly interested in both natural language pro-cessing, 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 andexpand our ways of making it useful to people poten-tially using Haskell in the NLP world.

New packages

◦ pdrt-sandbox 0.1.0.0 (Harm Brouwer and NoortjeVenhuizen)PDRT-SANDBOX is an implementation of Dis-course Representation Theory (DRT), and its ex-tension Projective Discourse Representation Theory(PDRT). The library includes a translation fromPDRT to DRT and first-order logic, composition viadifferent types of merge, and unresolved structuresbased on Montague Semantics.See Venhuizen and Brouwer (2014, SemDial proceed-ings) for more information.http://hbrouwer.github.io/pdrt-sandbox/

◦ chatter-0.5.0.0 (Rogan Creswick)Chatter is a growing collection of NLP algorithmsand data structures that currently support: POStagging and Phrasal Chunking (both via AveragedPerceptrons), document similarity, and InformationExtraction patterns (via Parsec). Chatter is pureHaskell and BSD-licensed.

Details Chatter exists to provide a liberally-licensed, “out of the box” solution for basic NLPin Haskell. It aims to achieve the ease of use ofNLTK without sacrificing the pragmatic utility ofdetailed types. Towards that end, simple operationswith Chatter require little setup:

POS Tagging

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

Variants on the ‘tagText’ function shown above pro-vide structured output. Typeclasses allow differ-ent corpora to use different tagsets without acciden-tal conflict, but once a tagger is loaded, the type-classes should be largely transparent to the program-mer. The Brown corpus and the Conll2000 corpustagsets are currently encoded as Tag types (in theNLP.Corpora.* modules).

Chunking

> import NLP.POS> import NLP.Chunk> tgr <- defaultTagger> chk <- defaultChunker> chunkText tgr chk "The quick brown fox jumpedover the lazy dog."

62

Page 63: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

"[NP The/DT quick/JJ brown/NN fox/NN][VP jumped/VBD] [NP over/IN the/DT lazy/JJdog/NN] ./."

Phrasal chunking (shown above with the Conll2000chunker and POS tagger) takes POS-tagged sen-tences and annotates them with Phrase Chunks,where possible. This only does one level of chunk-ing, so it doesn’t result in a full parse tree. Similarlyto the POS taggers, variants on ‘chunkText’ providestructured output.

Information Extraction with Parsec The struc-tured results from both POS tagging and Chunkingcan be consumed by Parsec parsers that reason aboutPhrase Chunk tags, POS tags, and literal token text.An example module provides a demon-stration of these features at: http://hackage.haskell.org/package/chatter/docs/NLP-Extraction-Examples-ParsecExamples.html

Further reading

◦ The Haskell NLP page http://projects.haskell.org/nlp

◦ Venhuizen, N. J. and Brouwer, H. (2014).PDRT-SANDBOX: An implementation ofProjective Discourse Representation Theory. In:Rieser, V. and Muller, P. (Eds.), Proceedings of the18th Workshop on the Semantics and Pragmatics ofDialogue, 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 naturallanguage generation (producing natural language ut-terances, e.g., English texts, out of abstract inputs).GenI in particular takes a Feature Based LexicalizedTree Adjoining Grammar and an input semantics (aconjunction of first order terms), and produces the setof sentences associated with the input semantics bythe grammar. It features a surface realization library,several optimizations, batch generation mode, and agraphical debugger written in wxHaskell. It was de-veloped within the TALARIS project and is free soft-ware licensed under the GNU GPL, with dual-licensingavailable for commercial purposes.GenI is now mirrored on GitHub, with its issue

tracker and wiki and homepage also hosted there. Themost recent release, GenI 0.24 (2013-09-18), allows forcustom semantic inputs, making it simpler to use GenIin a wider variety for applications. This has recentlybeen joined by a companion geni-util package whichoffers a rudimentary geniserver client and a reportingtool for grammar debugging.

GenI is available on Hackage, and can be installedvia cabal-install, along with its GUI and HTTP serveruser interfaces. For more information, please contactus on the geni-users mailing list.

Further reading

◦ http://github.com/kowey/GenI◦ http://projects.haskell.org/GenI◦ Paper from Haskell Workshop 2006:

http://hal.inria.fr/inria-00088787/en◦ http://websympa.loria.fr/wwsympa/info/geni-users

7.11 Bioinformatics

7.11.1 ADPfusion

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

ADPfusion provides a domain-specific language (DSL)for the formulation of dynamic programs with a specialemphasis on computational biology. Following ideasestablished in Algebraic dynamic programming (ADP)a problem is separated into a grammar defining thesearch space and one or more algebras that score andselect elements of the search space. The DSL has beendesigned with performance and a high level of abstrac-tion in mind.As an example, consider a grammar that recognizes

palindromes. Given the non-terminal p, as well as

63

Page 64: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

parsers for single characters c and the empty input ε,the production rule for palindromes can be formulatedas p→ c p c | ε.The corresponding ADPfusion code is similar:

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

We need a number of combinators as “glue” andadditional evaluation functions f , g, and h. Withf c1 p c2 = p && (c1 ≡ c2) scoring a candidate,g e = True, and h xs = or xs determining if thecurrent substring is palindromic.As of now, code written in ADPfusion achieves per-

formance close to hand-optimized C, and outperformssimilar approaches (Haskell-based ADP, GAPC pro-ducing C++) thanks to stream fusion. The figure showsrunning times for the Nussinov algorithm.

ADPfusion currently handles formal grammars work-ing on one or more inputs, as well as different types ofinput. A common case of grammars with one inputare context-free grammars, which are very common incomputational biology and linguistics problems. Wealso 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 trav-elling salesman and Hamiltonian path problems andsolve these efficiently – at least as efficiently as one cansolve problems that are exponential in time complexity.

Further reading

◦ http://www.bioinf.uni-leipzig.de/~choener/adpfusion◦ http://hackage.haskell.org/package/ADPfusion◦ http://dx.doi.org/10.1145/2364527.2364559

7.11.2 Ab-initio electronic structure in Haskell

Report by: Alessio ValentiniParticipants: Felipe Zapata, Angel AlvarezStatus: Active

We are three friends from Alcalá de Henares (Spain),two PhD students in computational chemistry fromResMol group and one sysadmin working at Alcalá Uni-versity computer center. We all share the same passionin programming and after some adventures in Fortran,

Bash, Python and Erlang we are now fully committedto Haskell. As PhD students working in this area, everyday we face codes that are both difficult to read andimprove, with no guidelines and poor documentation.The set of problems inherent in computational chem-

istry are mainly due to the theoretical models complex-ity and the need of reducing as much as possible thecomputational time, leading to a demand of extremelysolid and efficient software. What is happening in theactual context is the result of a poor interface betweenthe two adjoining worlds of chemist and computer sci-ence and the necessity of publishing papers and sci-entific material to raise funds. This usually leads tosoftware hastily developed by a few chemists with onlya side-interest in programming and therefore a limitedskill set.The very few software that can be deemed remark-

able are usually the result of massive funding, and eventhose packages are now facing huge problems in termsof parallelization, concurrency and stability of the code.Most of the efforts are spent trying to fix these issuesinstead of being addressed at developing better code(improve modularity and intelligibility) or new featuresand new algorithms.We witness the proliferation of projects that serve no

other purpose than to provide a bridge between differ-ent software, while the main core of molecular model-ing codes, in most cases written in Fortran 77, remainsuntouched since the eighties.Our first purpose in this project is to become bet-

ter at Haskell programming and having fun managinga package that is every day becoming bigger. Butwe kind of dream of a molecular modeling softwarethat can fully express the great upsides of functionalprogramming. Fewer lines of code, better readability,great parallelization, embedded domain specific lan-guages (EDSL) ... and maybe more efficiency, too !Ab-initio molecular modeling is a branch of com-

putational chemistry that, for a set of given atoms,solves the Schrödinger equation (the analogous of New-ton’s equation in quantum mechanics), with no inclu-sion of parameters derived from experimental data. Insuch systems it is quite easy to calculate forces be-tween nuclei but things get tricky when we calculatethe potential energy contribution of forces related toelectrons. In this case we can adopt a first approxi-mation, the so called Hartree-Fock, that considers theelectron-electron repulsion as an average between eachelectron and the mean field of all the others. This the-ory is right now the cornerstone of more sophisticatedmethods, such Multiconfigurational Methods, Møller-Plesset Perturbation Theory or Coupled Cluster, andthe mathematical models behind its implementationare vastly used throughout the world of computationalchemistry.This package can calculate the Hartree Fock energy

of a given molecule geometry and a basis set solving theRoothaan Hall equations through a self consistent field

64

Page 65: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

procedure. It uses the Harris Functional as an initialdensity guess and the DIIS method to greatly improvethe convergence.The entire code is written using the Repa library and

focusing our efforts on efficiency, parallelism (speedupsvs cores: 2,3 on 4 and 3.5 on 8) and code readabil-ity. Using Haskell’s higher order abstraction we aretrying to develop an EDSL appropriate for quantummechanics problems, creating code operators able tofairly mimic the physical ones.The code is available for download in Felipe’s gitHub

page.A Hartree Fock π orbital in PSB3:

We are currently developing this code in our sparetime, working on analytical gradients, on the Prisma al-gorithm and on a solid eigenvalue problem solver. Theaims of this projects are a full Haskell implementationof Multiconfigurational Methods and possibly an inte-gration with our molecular dynamics project.

Further reading

◦ https://github.com/felipeZ/Haskell-abinitio.git◦ http://themonadreader.files.wordpress.com/2013/03/

issue214.pdf

7.11.3 Semi-Classical Molecular Dynamics inHaskell

Report by: Alessio ValentiniParticipants: Felipe Zapata, Angel AlvarezStatus: Active

As a first approximation, we can split the world ofMolecular Dynamics into three branches: Force Fields,Classical (Semi-Classical) and Quantum Molecular Dy-namics. The first approach completely ignores the de-scription of the electrons, and the system is describedby a "Balls and Springs" model leading to very cheapcalculations that can be performed in big systems.From a chemical point of view, anyway, this approach

often suffers severe drawbacks, since every time an ac-curate description of electrons is needed (i.e. whenstudying the formation or breaking of bonds, reationsinvolving excited states, or heavily polarized systems)we cannot rely on pure Classical Mechanics.

On the other side, even if the Quantum Dynamics ap-proach is capable of describing the real quantum behav-ior of every single electron and nucleus, it comes witha huge increase in computational cost. It is basicallyunaffordable for systems with more than 5-6 atoms.That’s why we need to take in consideration the Clas-sical and Semi Classical Dynamics, where the system’sforces are calculated using a Quantum method, whilethe geometry is updated with Classical Mechanics andsome ad-hoc formulae to take into account quantumeffects.As PhD students in computational chemistry we of-

ten found ourselves in this situation: we have a chemi-cal problem that might appear simple at first, but thenit is usually quite difficult to find all the features nec-essary to tackle it in the same package. It is oftenthe case where software "X" is lacking feature "Z" whilesoftware "Y" is missing feature "W".The possible solutions to this impasse are:

1. to encode the missing features in the software ofchoice, a task that can reveal itself as very difficultand time consuming, since most of the time we aredealing 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 soft-ware, which is currently the approach employed inmost cases. So much that the vast majority of com-putational chemists keeps a personal folder that con-tains just collections of parsers and scripts.

Energies vs time for a two electronic states system:

Our project takes advantage of the exceptional mod-ularity that Haskell offers, and represents our effort tounify in a comprehensive tool all those routines thatare needed in our research group to perform Classicaland Semi Classical Molecular Dynamics. Our currentgoal is to keep a robust code and to minimize the needto use external software, limiting their application tothe computation of the gradient.Given some initial conditions and an external pro-

gram (currently Molcas and Gaussian are supported)capable of calculating the energy gradient, our code is

65

Page 66: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

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 thermostatefor a constant temperature bath and the Tully HammesSchiffer hopping algorithm (along with correction ofPersico-Granucci) to take in consideration hops be-tween different electronic states. It also features thepossibility to add external forces to the molecule, tosimulate constrained conditions that can be found, forexample, in a protein binding pocket.This is still a small project, but we are using it con-

stantly in our research group as a flexible tool for molec-ular dynamics, waiting for our other project to calcu-late the ab-initio gradient for us.

Further reading

https://github.com/AngelitoJ/HsDynamics

7.11.4 Biohaskell

Report by: Ketil MaldeParticipants: Christian Höner zu Siederdissen, Michal J.

Gajda, Nick Ignolia, Felipe Almeida Lessa,Dan Fornika, Maik Riechert, Ashish

Agarwal, Grant Rotskoff, FlorianEggenhofer, Sarah Berkemer, Niklas

Hambüchen

Bioinformatics in Haskell is a steadily growing field,and the Bio section on Hackage now contains 69 li-braries and applications. The biohaskell web site co-ordinates this effort, and provides documentation andrelated information. Anybody interested in the com-bination of Haskell and bioinformatics is encouragedto sign up to the mailing list (currently by emailing〈[email protected]〉Ketil), and to register and documenttheir 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 op-timizing transalign. After a summer’s work, Sarah wasable to improve both space and time usage. Othernew additions are parsers by Floran Eggenhofer forthe NCBI Genbank format and for Clustal mulitiplesequence alignments. There is also a new library for

working with EEG devices, written by Niklas Ham-büchen and Patrick Chilton.

Further reading

◦ http://biohaskell.org◦ http://blog.malde.org◦ http://www.bioinf.uni-leipzig.de/~choener/haskell/◦ https://bioinf.eva.mpg.de/biohazard/

7.11.5 arte-ephys: Real-time electrophysiology

Report by: Greg HaleParticipants: Alex ChenStatus: work in progress

Arte-ephys is a soft real-time neural recording systemfor experimental systems neuroscientists.Our lab uses electrode arrays for brain recording in

freely moving animals, to determine how these neuronsbuild, remember, and use spatial maps.We previously recorded and analyzed our data in two

separate stages. We are now building a recording sys-tem focused on streaming instead of offline analysis,for real-time feedback experiments. For example, wefound that activity in the brain of resting rats oftenwanders back to representations of specific parts of arecently-learned maze, and we would now like to au-tomatically detect these events and reward the rat im-mediately for expressing them, to see if this influenceseither the speed of learning of a specific part of themaze or the nature of later spatial information coding.We now have a proof-of-concept that streams

recorded data from disk, performs the necessary pre-processing, and accurately decodes neural signals in re-altime, while drawing the results with gloss. Our nextgoal is to integrate this into a sytem that streams rawneural data during the experiment.

Further reading

◦ http://github.com/ImAlsoGreg/arte-ephys◦ http://github.com/ImAlsoGreg/haskell-tetrode-ephys◦ http://web.mit.edu/wilsonlab/html/research.html

66

Page 67: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

7.12 Embedding DSLs for Low-LevelProcessing

7.12.1 Feldspar

Report by: Emil AxelssonStatus: active development

Feldspar is a domain-specific language for digital sig-nal processing (DSP). The language is embedded inHaskell and is currently being developed by projectsat Chalmers University of Technology (→ 9.7), SICSSwedish ICT AB and Ericsson AB.The motivating application of Feldspar is telecoms

processing, but the language is intended to be usefulfor DSP in general. The aim is to allow DSP functionsto be written in pure functional style in order to raisethe abstraction level of the code and to enable morehigh-level optimizations. The current version consistsof an extensive library of numeric and array processingoperations as well as a code generator producing C codefor running on embedded targets.At present, Feldspar can express the pure data-

intensive numeric algorithms which are at the core ofany DSP application. There is also support for theexpression and compilation of parallel algorithms.Ongoing work, presented at IFL 2014, extends

Feldspar with basic input/output capabilities and addsa library to express streaming systems using a syn-chronous programming model. Future work involvesextending and improving the system programming partof the language, and adding support for compilation toheterogeneous multi-core targets.

Further reading

◦ http://feldspar.github.io◦ http://hackage.haskell.org/package/feldspar-language◦ http://hackage.haskell.org/package/feldspar-compiler

7.12.2 Kansas Lava

Report by: Andy GillParticipants: Bowe NeuenschwanderStatus: ongoing

Kansas Lava is a Domain Specific Language (DSL) forexpressing hardware descriptions of computations, andis hosted inside the language Haskell. Kansas Lava pro-grams are descriptions of specific hardware entities, theconnections between them, and other computationalabstractions that can compile down to these entities.Large circuits have been successfully expressed usingKansas Lava, and Haskell’s powerful abstraction mech-anisms, as well as generic generative techniques, can beapplied to good effect to provide descriptions of highlyefficient circuits.

◦ The Fabric monad is now a Monad transformer. TheFabric monad historically provided access to namedinput/output ports, and now also provides namedvariables, implemented by ports that loop back onthemselves. This additional primitive capability al-lows for a typed state machine monad. This designgives an elegant stratospheric pattern: purely func-tional circuits using streams; a monad for layout overspace; and a monad for state generation, that actsover time.

◦ On top of the Fabric monad, we are implementing anatomic transaction layer, which provides a BSV-likeinterface, but in Haskell. An initial implementationhas been completed, and this is being reworked toinclude BSV’s Ephemeral History Registers.

Further reading

http://www.ittc.ku.edu/csdl/fpg/Tools/KansasLava

7.13 Others

7.13.1 General framework for multi-agent systems

Report by: Nickolay KudasovStatus: experimental

The goal is to create a general framework for developingand testing of multi-agent systems. That includes gen-eral representation for multi-agent systems as well aslibrary implementations for well-known agent models,distributed algorithms and communication and coordi-nation patterns.Notions of agent and environment are separated with

the help of free monads. Agent-environment interfaceis defined by an underlying functor.The basic representation of agent and environment

has been chosen and tested for an agent-based dis-tributed graph coloring problem.The concrete implementation is being revised fre-

quiently and thus is not very stable.Implementations for some general distributed algo-

rithms (ABT, DBA, etc.) will be available shortly.

Further reading

https://github.com/fizruk/free-agent

7.13.2 ersatz

Report by: Edward KmettParticipants: Johan Kiviniemi, Iain LaneStatus: stable

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

67

Page 68: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

What differentiates Ersatz from other SAT bindingsis 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 itbecomes much easier to see that the resulting encodingis correct.Support is offered for decoding various Haskell

datatypes from the solution provided by the SATsolver.A couple of examples are included with the distri-

bution. Neither are as fast as a dedicated solver fortheir respective domains, but they showcase how youcan solve real world problems involving 10s or 100s ofthousands of variables and constraints.

Further reading

http://hackage.haskell.org/package/ersatz

7.13.3 arbtt

Report by: Joachim BreitnerStatus: working

The program arbtt, the automatic rule-based timetracker, allows you to investigate how you spend yourtime, without having to manually specify what you aredoing. arbtt records what windows are open and active,and provides you with a powerful rule-based languageto afterwards categorize your work. And it comes withdocumentation!

Further reading

◦ http://arbtt.nomeata.de/◦ http://www.joachim-breitner.de/blog/archives/

336-The-Automatic-Rule-Based-Time-Tracker.html◦ http://arbtt.nomeata.de/doc/users_guide/

7.13.4 Hoodle

Report by: Ian-Woo KimStatus: Actively Developing

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

This project first started as making a haskell cloneof Xournal, a notetaking program developed in C. Butnow Hoodle has more unique features, as well as basicpen notetaking function. Pen input is directly fed intofrom X11 events, which has sub-pixel level accuracyfor the case of wacom tablets. Therefore, the resultantpen 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 SVGtypes, and exporting Hoodle documents to PDF. Oneof the most interesting features is “linking”: each Hoo-dle document can be linked with each other by simpledrag-and-drop operations. Then, the user can navi-gate linked Hoodle documents as we do in web browser.Another interesting feature is that one can edit a doc-ument in split views, so that a long Hoodle documentcan be easily edited. Hoodle can embed LATEXtexts andthe embedded text can be edited via network.GUI programming is in general tightly tied into a

GUI framework. Since most frameworks rely on call-backs for event processing, program logic is likely to bescattered in many callback functions. We cure this sit-uation by using coroutines. In haskell, coroutine can beimplemented in a straightforward way without relyingon specific language feature. This abstraction enable usto reason through the program logic itself, not throughan inverted logic in a GUI framework.Hoodle is being very actively developed as an open-

source project hosted on Github. The released versionsare located on Hackage, and it can be installed by sim-ple cabal install. On Linux, OS X, and Windows sys-tems with Gtk2hs and Poppler, Hoodle can be installedwithout problems. Recently, it is packaged for NixOS.Making a Hoodle binary package for other linux distri-butions, OS X and window is planned.The development focus as of now is to have more flex-

ible link features (link to arbitrary position of a doc-ument) and an internal database for document man-agement. Hoodle manages documents with a uniqueUUID, but it does not have a good internal databaseyet. This feature can also be extended to saving Hoo-dle documents in cloud storage in a consistent way.

68

Page 69: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

Refining rendering with appropriate GPU accelerationis also planned. In the long run, we plan to supportmobile platforms.

Further reading

http://ianwookim.org/hoodle

7.13.5 Reffit

Report by: Greg HaleStatus: work in progress

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

Further reading

◦ http://reffit.com◦ http://github.com/ImAlsoGreg/reffit

7.13.6 Laborantin

Report by: Lucas DiCioccioStatus: Working, development for new features

Conducting scientific experiments is hard. Laborantinis a DSL to run and analyze scientific experiments.Laborantin is well-suited for experiments that you canrun 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 man-ner. For instance, the following snippet defines a net-work ‘ping’ experiment with a destination and packet-size parameters.

ping = scenario "ping" $ dodescribe "ping to a remote server"parameter "destination" $ do

describe "a destination server (host or ip)"values [str "example.com", str "dicioccio.fr"]

parameter "packet-size" $ dodescribe "packet size in bytes"values [num 50, num 1500]

run $ do(StringParam srv) <- param "destination"

(NumberParam ps) <- param "packet-size"liftIO (execPing srv ps) >>= writeResult "ping.out"

execPing :: Text -> Rational -> IO (Text)execPing host pktSz =

let args = [ "-c", "10", "-s" , show (round pktSz) , T.unpack host]

in fmap T.pack (readProcess "ping" args "")

Laborantin also lets users express dependencies be-tween experiments. Laborantin is designed to allowmultiple backend (where to run and store experiments)and multiple frontends (how a user interacts with Lab-orantin). The current backend stores experiment re-sults on the filesystem and provides a command linefrontend.Contributions are welcome. In the future, we plan

to enrich Laborantin with helper modules for commontasks such as starting and collecting outputs of remoteprocesses, reformatting results, and generating plots(e.g., with Diagrams). Laborantin would also bene-fit from new backends (e.g., to store results in an SQLdatabase or HDFS) and new frontends (e.g., an inte-gration in IHaskell).

Further reading

◦ Hackage page:http://hackage.haskell.org/package/laborantin-hs

◦ Example of web-benchmarks: https://github.com/lucasdicioccio/laborantin-bench-web

7.13.7 The Amoeba-World game project

Report by: Alexander GraninStatus: work in progress

In functional programming, there is a serious problem:there are no materials for the development of largeapplications. As we know, this field is well studiedfor imperative and object-oriented languages. Thereare books on design, architecture, design patterns andmodeling practices. But we have no idea how this bigknowledge 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 tothe development of large applications on Haskell. Theresults of my research are some articles which will beused to compose a book about functional design andarchitecture. Currently two articles are written out ofthe planned four (in Russian, but the articles will betranslated to English soon). The first highlights the is-sue of whether the mainstream knowledge of architec-ture is applicable to the functional paradigm and whattools can be used for designing of architecture. It showsthat the UML is ill-suited for the functional paradigmand the architecture is constructed using mind mapsand concept cards. The second article talks about alow-level design of the application using the languageHaskell. It has a theoretical part named what makes agood design, but there is also practical part describing

69

Page 70: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

of the some anti-patterns in Haskell. The third articleis under development now. In it, the application designbased on properties and scenarios is researched. Thefourth 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 con-cepts. These concepts are: using DSL, parsing, layer-ing, using lenses, Inversion of Control, testing, FRP,SDL, usefulness of monads. The overall architecture ofthe game looks as follows:

At the moment, the game logic has been rewrittentwice. The draft of game logic is ready. A special fileformat ’ARF’ (Amoeba Raw File) for the game objectsis done. Parsec is used for parsing, and a custom safetranslator is written, which works on rules. Now I’mare working on a Application Layer. Settings loadingis done. A primitive renderer for the game world iscreated. A draft game cycle and IO event handler fromSDL subsystem is done by using Netwire FRP library.The next objectives are to add an interaction within thegame world and then move to the execution of scenarioson game objects.

Further reading

◦ https://github.com/graninas/The-Amoeba-World◦ http://bit.ly/ArchitectureAndDesingInFP (in Russian)

7.13.8 Nomyx

Report by: Corentin DupontStatus: pre-release version

Nomyx is a unique game where you can change the rulesof the game itself, while playing it! In fact, changingthe rules is the goal of the game. Changing a ruleis considered as a move. Of course even that can bechanged! The players can submit new rules or modifyexisting ones, thus completely changing the behaviourof the game through time. The rules are managed andinterpreted by the computer. They must be writtenin the Nomyx language, based on Haskell. This is thefirst complete implementation of a Nomic game on acomputer.At the beginning, the initial rules are describing:

◦ How to add new rules and change existing ones. Forexample a unanimity vote is necessary to have a newrule accepted.

◦ How to win the game. For example you win the gameif you have 5 rules accepted.

But of course even that can be changed!A Beta version has been released. A match is cur-

rently on-going, join us! A lot of learning material isavailable, including a video, a tutorial, a FAQ, a forumand API documentation.If you like Nomyx, you can help! There is a develop-

ment mailing list (check the website). The plans noware to fix the remaining bugs and release a V1.0 in somemonth.

Further reading

www.nomyx.net

7.13.9 tempuhs

Report by: Alexander BerntsenStatus: pre-release

tempuhs is an ambitious effort by plaimi (→ 8.11) tochronicle time. This means recording events, and ar-ranging them with regards to time.The grand vision is a system capable of storing a

timespan that includes The Big Bang on the scale ofPlanck-time, the history of the universe on the scale ofmilliards-of-years, your Mother’s birthday on the scaleof days in the Gregorian new style calendar, and yourmeeting scheduler on the scale of minutes. These arerepresented as timespans inside of a big parent times-pan as of today, allowing a frontend to present this andnavigate between levels of zoom that preserve precisionand resolution.In addition to having a grand vision for functional-

ity, careful thought is placed on the design of tempuhsand how to use it. tempuhs should be completely fron-tend agnostic and extendible. Generality is taken to itslogical extreme in functionality and architecture both.tempuhs consists of two pieces. tempuhs may refer

to both of these pieces, or one in particular: the librarywhich specifies how we represent our data. tempuhs-server is the Web server that makes tempuhs frontendagnostic by being a common API for communicatingwith the database. The tempuhs backbone will in thefuture 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 findyour way around in the source code, or setting up yourown frontend for tempuhs.The technology currently used for tempuhs includes

HSpec and HUnit for tests, the Scotty Web server, Per-sistent for dealing with databases (PostgreSQL for theproduction server and SQLite for the tests), wai for var-ious things, The Glorious Glasgow Haskell Compiler (ofcourse), and some other libraries.

70

Page 71: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

Further reading

◦ https://secure.plaimi.net/works/tempuhs.html◦ https://github.com/plaimi/tempuhs◦ https://github.com/plaimi/tempuhs-server

71

Page 72: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

8 Commercial Users

8.1 Well-Typed LLP

Report by: Andres LöhParticipants: Duncan Coutts

Well-Typed is a Haskell services company. We pro-vide commercial support for Haskell as a developmentplatform, including consulting services, training, andbespoke software development. For more information,please take a look at our website or drop us an e-mailat 〈[email protected]〉.We are working for a variety of commercial clients,

but naturally, only some of our projects are publiclyvisible.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 Hack-age 2 and Cabal.We continue to be involved in the community, main-

taining several packages on Hackage and giving talksat a number of conferences. Some of our recentprojects are available online, such as for example Ed-sko’s ghc-events-analyze tool, or Adam’s talk aboutoverloaded record fields in Haskell (links below).We are continuing to offer training services. We offer

regular courses in London (the next course dates are inJuly and in October), and on-demand on-site trainingcourses elsewhere as well.We are of course always looking for new clients and

projects, so if you have something we could help youwith, just drop us an e-mail.

Further reading

◦ Company page: http://www.well-typed.com◦ Blog: http://blog.well-typed.com/◦ Training page:http://www.well-typed.com/services_training

◦ Skills Matter Haskell course overview:https://skillsmatter.com/explore?content=courses&location=&q=Haskell

◦ ghc-events-analyze:http://www.well-typed.com/blog/86/

◦ Adam’s records talk:http://www.well-typed.com/blog/93/

8.2 Bluespec Tools for Design of ComplexChips and Hardware Accelerators

Report by: Rishiyur NikhilStatus: commercial product

Bluespec, Inc. provides an industrial-strength language(BSV) and tools for high-level hardware design. Com-ponents designed with these are shipping in some com-mercial smartphones and tablets today.BSV is used for all aspects of ASIC and FPGA de-

sign — specification, synthesis, modeling, and verifica-tion. All hardware behavior is expressed using rewriterules (Guarded Atomic Actions). BSV borrows manyideas from Haskell — algebraic types, polymorphism,type classes (overloading), and higher-order functions.Strong static checking extends into correct expressionof multiple clock domains, and to gated clocks for powermanagement. BSV is universally applicable, from al-gorithmic “datapath” blocks to complex control blockssuch as processors, DMAs, interconnects, and caches.Bluespec’s core tool synthesizes (compiles) BSV into

high-quality Verilog, which can be further synthe-sized into netlists for ASICs and FPGAs using third-party tools. Atomic transactions enable design-by-refinement, where an initial executable approximatedesign is systematically transformed into a quality im-plementation by successively adding functionality andarchitectural detail. The synthesis tool is implementedin Haskell (well over 100K lines).Bluesim is a fast simulation tool for BSV. There are

extensive libraries and infrastructure to make it easy tobuild FPGA-based accelerators for compute-intensivesoftware, including for the Xilinx XUPv6 board popu-lar in universities, and the Convey HC-1 high perfor-mance computer.BSV is also enabling the next generation of com-

puter architecture education and research. Studentsimplement and explore architectural models on FP-GAs, whose speed permits evaluation using whole-system software.

Status and availability

BSV tools, available since 2004, are in use by severalmajor semiconductor and electronic equipment compa-nies, and universities. The tools are free for academicteaching and research.

Further reading

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

72

Page 73: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

◦ Bluespec, a General-Purpose Approach toHigh-Level Synthesis Based on Parallel AtomicTransactions, R.S. Nikhil, in High Level Synthesis:from Algorithm to Digital Circuit, Philippe Coussyand 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 DigitalSystems, MIT courseware.

◦ http://www.bluespec.com/products/BluDACu.htm:A fun example with many functional programmingfeatures — BluDACu, a parameterized Bluespechardware implementation of Sudoku.

8.3 Industrial Haskell Group

Report by: Andres Löh

The Industrial Haskell Group (IHG) is an organizationto 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 operatestwo schemes:◦ The collaborative development scheme pools re-sources from full members in order to fund specificdevelopment projects to their mutual benefit.

◦ Associate and academic members contribute to aseparate fund which is used for maintenance and de-velopment work that benefits the members and com-munity in general.Projects the IHG has funded in the past years include

work on Hackage 2, Cabal and cabal-install, and GHCitself.Details of the tasks undertaken by the IHG are ap-

pearing on the Well-Typed (→ 8.1) blog, on the IHGstatus page and on standard communication channelssuch as the Haskell mailing list.In the past six months, three new associate members

have joined the IHG: Jon Kristensen, alephcloud andOTAS Technologies.The collaborative development scheme is running

continuously, so if you are interested in joining as amember, please get in touch. Details of the differentmembership options (full, associate, or academic) canbe found on the website.We are very interested in new members.If you are interested in joining the IHG, or if you

just have any questions or comments, please drop usan e-mail at 〈[email protected]〉.

Further reading

◦ http://industry.haskell.org/◦ http://industry.haskell.org/status/

8.4 Barclays Capital

Report by: Ben Moseley

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

For the first half of its life the project focused only onthe most exotic options — those which were too com-plicated for the legacy systems to handle. Over thepast few years however, FPF has expanded to providethe trade representation and tooling for the vast major-ity of our equity exotics trades and with that the teamhas grown significantly in both size and geographicaldistribution. We now have eight permanent full-timeHaskell developers spread between Hong Kong, Kievand London (with the latter being the biggest develop-ment hub).

Our main front-end language is currently a deeplyembedded DSL which has proved very successful, butwe have recently been working on a new non-embeddedimplementation. This will allow us to bypass someof the traditional DSEL limitations (e.g., error mes-sages and syntactical restrictions) whilst addressingsome business areas which have historically been prob-lematic. 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 usinga compiler from our custom DSL syntax into Haskellsource (with standard transformers from Ross Pater-son’s “arrows” package) to provide the semantics forthe language but plan to develop a number of indepen-dent backends. Our hope is that, over time, this willgradually replace our embedded DSL as the front endfor all our tools. For the parsing part of this work wehave been very impressed by Doaitse Swierstra’s uu-parsinglib (→ 7.3.2).

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

73

Page 74: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

8.5 Oblomov Systems

Report by: Martijn Schrage

Oblomov Systems is a one-person software companybased in Utrecht, The Netherlands. Founded in 2009for 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 numberof Haskell-related projects. The main focus lies onweb-applications and (web-based) editors. Haskell hasturned out to be extremely useful for implementingweb servers that communicate with JavaScript clientsor iPhone apps.Awaiting the acceptance of Haskell by the world

at large, Oblomov Systems also offers software solu-tions in Java, Objective C, and C#, as well as on theiPhone/iPad. Last year, Oblomov Systems has workedtogether with Ordina NV on a substantial Haskellproject for the Council for the Judiciary in The Nether-lands.

Further reading

http://www.oblomov.com

8.6 OpenBrain Ltd.

Report by: Tom Nielsen

OpenBrain Ltd. is developing a new platform for sta-tistical computing that enables optimal decisions tak-ing into account all the available information. Wehave developed a new statistical programming lan-guage (BAYSIG) that augments a Haskell-like func-tional programming language with Bayesian inferenceand first-class ordinary and stochastic differential equa-tions. BAYSIG is designed to support a declarativestyle of programming where almost all the work con-sists in building probabilistic models of observed data.Data analysis, risk assessment, decision, hypothesistesting and optimal control procedures are all derivedmechanically from the definition of these models. Weare targeting a range of application areas, including fi-nancial, clinical and life sciences data.We are building a web application (http://BayesHive.

com) to make this platform accessible to a wide rangeof users. Users can upload and analyse varied typesof data using a point-and-click interface. Models andanalyses are collected in literate programming-like doc-uments that can be published by users as blogs.We use Haskell for almost all aspects of implement-

ing this platform. The BAYSIG compiler is written

in Haskell, which is particularly well suited for imple-menting the recursive syntactical transformations un-derlying statistical inference. BayesHive.com is beingdeveloped in Yesod.

Contact

[email protected]

Further reading

http://BayesHive.com

8.7 Pariah Reputation System

Report by: Jim SnowParticipants: Jim Snow, Daniel ConnorStatus: A new kind of reputation system for online

communities

Metamocracy LLC is develping social network analysistools to be used in online communities.Our main product is Pariah, a reputation system.

It takes as input a signed directed graph where thelinks represent trust or distrust relationships betweenusers, and analyzes the graph structure to compute areputation for any user from the point of view of anyother user.There are a few interesting things about Pariah; we

treat reputation as inherently subjective (you can havea good reputation from one user’s point of view, and abad reputation from someone elses), we have a sensibleinterpretation of negative reputation, and our systemis resistant to ballot-stuffing attacks.Pariah is written in Haskell, and has a REST inter-

face implemented using Yesod.An interesting offshoot of our reputation system

work is a demo site called Polink.org, which is a collab-orative tool for documenting all the little connections(whether positive or negative) between public figures,organizations, corporations, etc. . . It is built on top ofAcid-state and Yesod, with a little bit of javascript toquery Pariah and visually display reputations of enti-ties.Pariah is commercial software. The software behind

Polink.org is available under the GPLv2 license, and isavailable on github.Currently, we’re trying to put together a paper de-

scribing the algorithm we use.

Further reading

◦ http://metamocracy.com◦ http://polink.org

74

Page 75: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

8.8 Haskell in the industry in Munich

Report by: Haskell Consultancy Munich

Haskell is used by several companies specializing inthe development of reliable software and hardware, forexample for the automotive industry in Munich. Itis also in use by the developers of medical softwarewhich needs assure the integrity of data processing al-gorithms. It is also used by new media and internetcompanies. You may contact the author of this report(〈[email protected]〉) for details.

Haskell at Google Munich

Google is using Haskell in Ganeti (http://code.google.com/p/ganeti/), a tool for managing clusters ofvirtual servers built on top of Xen and KVM. There isa 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 someof them are accompanied by videos to be found with aquick search on the internet.

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

The Engineering Office provides services and toolsto companies designing and operating smart systemswith energy management: Smart Grids, Smart Houses,Smart Production, and so on. Smart systems are com-plex: efficiency is only one aspect in a challenging sys-tem design. We want to make measurement and opti-misation of overall system efficiency as comfortable and

easy as possible. The objective is to provide supportin choosing between system functionality, performance,safety, and reliability as well as energy efficiency. Weprovide a support service for the whole developmentchain, starting with specification, through system de-sign and simulation to system implementation and val-idation. The advantage of our approach is that wecan directly model, investigate and optimise energyflow. This opens new possibilities, such as better op-timisation of efficiency, operation, and design for localgrids containing electrochemical storage, thermal stor-age, heat pumps, block heat and power units and soon.Since it combines good performance and paralleliza-

tion features while providing a very high level of assur-ance, we have chosen to execute our technology withHaskell.For more information, please visit http://www.

energiefluss.info. There is an introductory documentto the services provided (http://energiefluss.info/img/profile_gh.pdf).

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 fortheir domain, which is simulation, safety, and business-critical systems. It affords ICS a competitive edgeover the market. Industries ICS work with include ad-vanced technologies, automotive, industrial solutions,and transportation and they have an impressive list ofcustomers (http://ics-ag.de/kunden.html).

Haskell Consultancy Munich

The author of this report runs a Haskell consultancy.Established in 2008, the business provides full-stacksupport for industries ranging from finance and me-dia to medical and electronics design and automation,with a permanent focus on functional programming.We have a strong background in statistics and oper-ations research. The current trend in the industry isthe migration of monolithic legacy software in C, C#,Python, Java, or PHP towards a functional, service-oriented architecture, with on-site training of person-nel in the new programming paradigm. Another trendis design of hard realtime applications for industrialuse. Further information can be requested via email(〈[email protected]〉).

75

Page 76: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

Funktionale Programmierung – Dr. HeinrichHördegen

Funktionale Programmierung - Dr. Heinrich Hörde-gen (http://funktional.info) is a Haskell and functionalprogramming software consultancy located in Munich.Dr. Hördegen has a lot of experience in software en-

gineering and has been an advocate of functional pro-gramming since 2005. It follows that during his doc-toral thesis at the LORIA (http://www.loria.fr) he wasable to design and implement compiler modules for theAVISPA project (http://www.avispa-project.org/) usingOCaml.Dr. Hördegen has been using Haskell as his main

technology to implement robust and reliable soft-ware since 2009. In his role co-founder and CTO ofIngenieurbüro Guttenberg & Hördegen (http://www.energiefluss.info) he leads the development of propri-etary software for energy flow analysis. This complexsystem is comprised of 50000 lines of code, distributedinto 130 modules.Some of Dr. Hördegen’s favourite things about

Haskell are algebraic data types, which simplify sym-bolic computation, the amazing speed Haskell can pro-vide during number crunching, the powerful paralleliza-tion capabilities Haskell provides, and finally CloudHaskell, which lets you easily distribute computationsonto whole clusters.Dr. Hördegen’s consultancy sponsors and organizes

the Haskell Meetup (http://www.haskell-munich.de/)and supports the Haskell community as a whole.

codecentric AG

Here at codecentric (https://www.codecentric.de/),we believe that more than ever it’s important to keepour tools sharp in order to provide real value to ourcustomers. The best way to do this is to provide soft-ware expertise and an environment in which people canfreely express their ideas and develop their skills. Oneof the results is codecentric Data Lab, where mathe-maticians, data scientists and software developers joinforces to live up to the big data hype. Another isthe Functional Institute (http://clojureworkshop.com/),which helps to spread the word about functional pro-gramming with Clojure and Haskell.We provide services in functional programming in

Clojure and Haskell as well as services for Big Dataprojects, ranging from project support and knowledgesharing to bespoke software development and projectmanagement. We are over 200 employees strong in 10

offices around Germany and Europe. You may contactAlex Petrov (〈[email protected]〉) with any en-quiries.

8.9 Better

Report by: Carl Baatz

Better provides a platform for delivering adaptive on-line training to students and employees.Companies and universities work with us to develop

courses which are capable of adapting to individuallearners. This adaptivity is based on evidence we col-lect about the learner’s understanding of the course ma-terial (primarily by means of frequent light-weight as-sessments). These courses run on our platform, whichexposes a (mobile-compatible) web interface to learn-ers. The platform also generates course statistics sothat managers/teachers can monitor the progress of theclass 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 layerwritten on top of postgres-simple which abstractsdata retrieval, modification, and versioning. The choiceof language has worked out well for us: as well as the joyof writing Haskell for a living, we get straightforwarddeployment and extensive server monitoring courtesyof ekg. Using GHC’s profiling capabilities, we havealso managed to squeeze some impressive performanceout of our deployment.The application-specific logic is all written in Haskell,

as is most of the view layer. As much rendering as pos-sible is performed on the backend using blaze-html,and the results are sent to a fairly thin single-pageweb application written in Typescript (which, whilenot perfect, brings some invaluable static analysis toour front-end codebase).The company is based in Zurich, and the majority of

the engineering team are Haskellers. We enjoy a highlevel of involvement with the Zurich Haskell commu-nity and are delighted to be able to host the monthlyHaskellerZ user group meetups and the yearly ZuriHachackathon.

8.10 Keera Studios LTD

Report by: Ivan Perez

Keera Studios Ltd. is a game development companycurrently working on Android games using Haskell. Wehave recently shown a breakout-like game running onan Android tablet at a competitive speed. New im-provements, just announced on our blog, have nearlyduplicated the rendering and the simulation speed,bringing both up to more than sufficient levels for com-mercial games and making Haskell a truly viable optionfor professional Android development.

76

Page 77: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

The game used internally for testing is implementedusing the Arrowized Functional Reactive ProgrammingDomain-Specific Language Yampa, and relies on SDL2for multimedia. This game is being heavily improvedand will be released on the Android market. The desk-top version of the game, which is almost the same as theAndroid version, already includes Wiimote and Kinectsupport.We have also developed a DSL for graphic adven-

tures, together with an engine and a basic IDE that al-lows non-programmers to create their own 2D graphicadventure games without any knowledge of program-ming. Supported features include multiple charac-ter states and animations, multiple scenes and lay-ers, movement bitmasks (used for automatic shortest-path calculation), luggage, conversations, sound effects,background music, and a customizable UI. The IDEtakes care of asset management, locating all the neces-sary assets and generating a fully portable game withall the necessary files. The engine is multiplatform,working seamlessly on Linux and Windows. An earlyversion targeting Flash was created in HaXe, but giventhe possibility of targeting Android (and iPhone) in-stead, the future direction will be to add support formobile platforms. The engine has just been updatedfrom SDL 1.2 to SDL 2, and the next step will be test-ing on Android. Once this last stage is completed andany existing problems have been fixed, it will be addedto Gale IDE as one of the officially supported targetplatfoms.More info can be found on our website and our Face-

book page.

8.11 plaimi

Report by: Alexander Berntsen

plaimi are an omnium-gatherum of researchers fromNorway that are trying to solve time using Haskell.Presently, our energy is focused on tempuhs andtempuhs-server – collectively referred to as simply tem-puhs. See the tempuhs entry (→ 7.13.9) for more de-tails.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 Gen-too Linux, and consequently Gentoo-Haskell. We con-tribute back to the Haskell and Gentoo ecosystems, andhave upstream patches for many of the libraries andtools that we use. One of the researchers at plaimi ison the Gentoo development team, and has contributedto both Gentoo-Haskell and the package manager ituses, Portage.Our website is https://secure.plaimi.net/. Contact in-

formation may be obtained there. We are looking tohire 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.

77

Page 78: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

9 Research and User Groups

9.1 Haskell at Eötvös Loránd University(ELTE), Budapest

Report by: PÁLI Gábor JánosStatus: ongoing

Education

There are many different courses on Haskell that runat Eötvös Loránd University, Faculty of Informatics.Currently, we are offering the following courses withHaskell:

◦ Functional programming for first-year Hungarian un-dergraduates as part of the official curriculum. It isalso taught for foreign-language students as part oftheir program.

◦ An additional semester on functional programmingwith Haskell, where many of the advanced conceptsare featured. This is an optional course for Hungar-ian undergraduate and master’s students, supportedby the Eötvös József Collegium.

◦ Advanced functional programming for Hungarianand foreign-language master’s students in Soft-ware Technology, supported by the fund TÁMOP-4.1.2.A/1-11/1-2011-0052. The curriculum fea-tures discussion of parallel and concurrent program-ming, property-based testing, purely functional datastructures, efficient I/O implementations, embeddeddomain-specific languages.

Another Haskell-related course is Type Systems ofProgramming Languages, taught for Hungarian mas-ter’s students in Software Technology. This coursegives a more formal introduction to the basics andmechanics 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 ofsystematized exercises and it may be also used as ateaching aid. Some of our course materials are availablethere in English as well.Due to its great success, we have started our home-

brew online assignment management system, bead forthe second semester in this September. The bead sys-tem is implemented almost entirely in Haskell, usingthe Snap web framework and Fay. Its goal to help thelecturers with scheduling course assignments and tests,and it can automatically check the submitted solutions

as an option. It currently has over 750 users and pro-vides support for 11 courses at the department. Thisis still in an alpha status yet so it is not available onHackage as of yet, only on GitHub, but so far it hasbeen performing well, especially in combination withActiveHs.

Further reading

◦ Haskell course materials (in English):http://pnyf.inf.elte.hu/fp/Overview_en.xml

◦ ActiveHs:http://hackage.haskell.org/package/activehs

◦ bead: http://github.com/andorp/bead

9.2 Artificial Intelligence and SoftwareTechnology at Goethe-UniversityFrankfurt

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

Semantics of Functional Programming Lan-guages. Extended call-by-need lambda calculi modelthe semantics of Haskell. We are interested in analyzingthe semantics of those calculi, where we focus on thecorrectness of program analyses and program transfor-mations. Results of this long-standing research includethe correctness of strictness analysis by abstract reduc-tion, results on the equivalence of the call-by-name andcall-by-need semantics, correctness of program trans-formations 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 nonde-terministic languages with letrec. A further resultis that any semantic investigation of Haskell shouldinclude the seq-operator, since extending the lazylambda calculus by seq is not conservative, i.e. the se-mantics changes. A recent result is an analysis of apolymorphically typed core language of Haskell whichuses System F-polymorphism.We also develop practical tools to show correctness

of program transformation automatically. The under-lying method is syntax-oriented and computes so-calledforking and commuting diagrams by a combination ofseveral unification algorithms which are implementedin Haskell. Also automated termination provers forterm rewrite systems are used in a part of the automa-tion. Future research goals are to automate correctness

78

Page 79: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

proofs of program translations as they can be foundduring compilation of programs.Another result is that deciding (extended) α-

equivalence in languages with bindings (like letrec) isgraph isomorphism complete. However, if the expres-sions are free of garbage (i.e. have no unused bindings)the problem can be solved efficiently.Concurrency. We analyzed a higher-order func-

tional language with concurrent threads, monadic IO,synchronizing variables and concurrent futures whichmodels Concurrent Haskell. We proved correctness ofprogram transformations, correctness of an abstractmachine, and we proved that this language conser-vatively extends the pure core language of Haskell.Recently, we proved correctness of a highly concur-rent implementation of Software Transactional Mem-ory (STM) in a similar program calculus. Based onthese result we recently developed an alternative imple-mentation of STM Haskell which performs quite earlyconflict detection.Grammar based compression. This research

topic focuses on algorithms on grammar compresseddata like strings, matrices, and terms. Our goal is toreconstruct known algorithms on uncompressed datafor their use on grammars without prior decompres-sion. We implemented several of those algorithms as aHaskell library. Recently, we added an efficient algo-rithm for fully compressed pattern matching of to ourlibrary.

Further reading

http://www.ki.informatik.uni-frankfurt.de/research/HCAR.html

9.3 Functional Programming at theUniversity of Kent

Report by: Olaf Chitil

The Functional Programming group at Kent is a sub-group of the Programming Languages and SystemsGroup of the School of Computing. We are a groupof staff and students with shared interests in functionalprogramming. While our work is not limited to Haskell,we use for example also Erlang and ML, Haskell pro-vides a major focus and common language for teachingand research.Our members pursue a variety of Haskell-related

projects, several of which are reported in other sec-tions of this report. Three new PhD students joinedthe group last September. Stephen Adams is work-ing on advanced refactoring of Haskell programs. An-dreas Reuleaux is working on refactoring dependentlytyped functional programs. Maarten Faddegon is work-ing on making tracing for Haskell practical and easyto use. Currently he is looking into extending theHaskell object observation debugger Hood. He talks at

TFP 2014 about Type Generic Observing (http://www.cs.uu.nl/wiki/TFP2014/PresentationSchedule). KanaeTsushima, research fellow of the Japan Society for thePromotion of Science, visited from September 2013 toFebruary 2014. She worked with Olaf Chitil on type er-ror debugging and Kanae presented a joint paper “Enu-merating Counter-Factual Type Error Messages withan Existing Type Checker” at PPL 2014. Earlier OlafChitil refactored/reimplemented Hat to use standardHackage libraries. Scott Owens is working on verifiedcompilers for the (strict) functional language CakeML.

We are always looking for more PhD students. Weare particularly keen to recruit students interested inprogramming tools for verification, tracing, refactoring,type checking and any useful feedback for a program-mer. The school and university have support for strongcandidates: 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 Kentto work with us. There are many opportunitiesfor research funding that could be taken up atKent, as shown in the website http://www.kent.ac.uk/researchservices/sciences/fellowships/index.html. Pleaselet us know if you’re interested in applying for one ofthese, and we’ll be happy to work with you on this.

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

Further reading

◦ PLAS group:http://www.cs.kent.ac.uk/research/groups/plas/

◦ Haskell: the craft of functional programming:http://www.haskellcraft.com

◦ Refactoring Functional Programs: http://www.cs.kent.ac.uk/research/groups/plas/hare.html

◦ A trace-based just-in-time compiler for Haskell:http://www.youtube.com/watch?v=PtEcLs2t9Ws

◦ Scion, a library for building IDEs for Haskell:http://code.google.com/p/scion-lib/

◦ Hat, the Haskell Tracer:http://projects.haskell.org/hat/

◦ CakeML, a verification friendly dialect of SML:https://cakeml.org

◦ Practical Lazy Typed Contracts for Haskell:http://www.cs.kent.ac.uk/~oc/contracts.html

◦ Heat, an IDE for learning Haskell:http://www.cs.kent.ac.uk/projects/heat/

79

Page 80: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

9.4 Formal Methods at DFKI andUniversity Bremen and UniversityMagdeburg

Report by: Christian MaederParticipants: Mihai Codescu, Christoph Lüth, Till

MossakowskiStatus: active development

The activities of our groups center on formal methods,covering a variety of formal languages and also trans-lations and heterogeneous combinations of these.We are using the Glasgow Haskell Compiler and

many of its extensions to develop the Heterogeneoustool set (Hets). Hets is a parsing, static analysis andproof management tool incorporating various proversand different specification languages, thus providinga tool for heterogeneous specifications. Logic trans-lations are first-class citizens.The languages supported by Hets include the CASL

family, such as the Common Algebraic SpecificationLanguage (CASL) itself (which provides many-sortedfirst-order logic with partiality, subsorting and in-duction), HasCASL, CoCASL, CspCASL, and an ex-tended modal logic based on CASL. Other languagessupported include propositional logic, QBF, Isabelle,Maude, VSE, TPTP, THF, FPL (logic of functionalprograms), LF type theory and still Haskell (via Pro-gramatica). More recently, ontology languages likeOWL, RDF, Common Logic, and DOL (the distributedOntology, Model and Specification language) have beenintegrated.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 theo-

rem provers),◦ Isabelle (an interactive higher-order theorem prover),◦ CSPCASL-prover (an Isabelle-based prover for Csp-

CASL),◦ VSE (an interactive prover for dynamic logic).The user interface of the Hets implementation (about

200K lines of Haskell code) is based on some Haskellsources such as bindings to uDrawGraph (formerlyDavinci) and Tcl/TK that we maintain and alsogtk2hs (→ 7.7.3). Additionally we have a commandline interface and a prototypcial web interface basedon warp (→ 5.2.2) with a RESTful API.HasCASL is a general-purpose higher-order language

which is in particular suited for the specification anddevelopment of functional programs; Hets also containsa translation from an executable HasCASL subset toHaskell. There is a prototypical translation of a subsetof Haskell to Isabelle/HOL.

Further reading

◦ Group activities overview:http://www.informatik.uni-bremen.de/agbkb/forschung/formal_methods/

◦ CASL specification language:http://www.cofi.info

◦ DOL: the distributed Ontology, Model andSpecification languagehttp://www.ontoiop.org

◦ Heterogeneous tool set:http://hets.dfki.dehttp://www.informatik.uni-bremen.de/htk/http://www.informatik.uni-bremen.de/uDrawGraph/

9.5 Haskell in Romania

Report by: Mihai Maruseac

In Romania, Haskell is taught at several universitiesacross the country: in Bucharest at both Univer-sity POLITEHNICA of Bucharest and University ofBucharest, in Bacău at “Vasile Alecsandri” University,in Braşov at “Transilvania” University, . . . . However,everywhere the courses are only centered on the theo-retical aspects of functional programming and (some-times) type systems. As a result, very few students willuse this language after the exam is taken.However, small communities are created to promote

the language. That was the case of the Ro/Haskellgroup from Bacău 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 deeplyconcerned with presenting its features and the purelyfunctional aspect while hiding away the fact that youhave to do some IO in real world applications. Ba-sically, every activity of the previous groups and thesubjects taught at universities regard Haskell only as alaboratory language.A small group of people from Faculty of Automatic

Control and Computers, University POLITEHNICA ofBucharest, decided last year to change that. The newteachers and teaching assistants from the ProgrammingParadigm course organised the first “Functional Pro-gramming Summer School” in June 2012 where a fewreal-world topics were presented among more theoreti-cal aspects.This year, a small subgroup of the ROSEdu (http:

//rosedu.org/) community developed on the feedbackfrom the summer school and created a plan towardsmaking Haskell a known and usable language witha community around it. There were talks on Yesodand GHC at different events (OSOM, Talks by Softbi-nator) or companies (IXIA), some new projects werelaunched – some of them being turned into bache-lor or masters diploma projects – and an workshopcalled “Programming Haskell from N00b to Real World

80

Page 81: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

Programmer” was organized in June, during ROSEduSummer Workshops (http://workshop.rosedu.org/2013/sesiuni/haskell). At the end of the workshop the stu-dents implemented IRC bots and Pacman-like gameswith a graphical interface and some dummy AI. Fi-nally, some articles were published in the "Today Soft-ware Magazine" (http://www.todaysoftmag.com/tsm/en/) monthly magazine. This has prompted someHaskell-related hackathons at an byweekly Agile eventcalled "Code and Beer".But one of the major results of these activities is that

the awareness of Haskell in Romanian communities hasincreased, leading to the launch of three small startupcompanies in Romanian towns.

9.6 fp-syd: Functional Programming inSydney, Australia

Report by: Erik de Castro LopoParticipants: Ben Lippmeier, Shane Stephens, and

others

We are a seminar and social group for people in Sydney,Australia, interested in Functional Programming andrelated fields. Members of the group include users ofHaskell, Ocaml, LISP, Scala, F#, Scheme and others.We have 10 meetings per year (Feb–Nov) and meeton the third (usually, sometimes fourth) Wednesday ofeach month. We regularly get 20–30 attendees, witha 70/30 industry/research split. Talks this year haveincluded material on compilers, theorem proving, typesystems, Haskell web programming, Haskell databaselibraries, Scala and the Free Monad. We usually haveabout 90 mins of talks, starting at 6:30pm, then go fordrinks afterwards. All welcome.

Further reading

◦ http://groups.google.com/group/fp-syd◦ http://fp-syd.ouroborus.net/◦ http://fp-syd.ouroborus.net/wiki/Past/2013

9.7 Functional Programming at Chalmers

Report by: Jean-Philippe Bernardy

Functional Programming is an important componentof the CSE department at Chalmers and Universityof Gothenburg. In particular, Haskell has a very im-portant place, as it is used as the vehicle for teachingand numerous research projects. Besides functionalprogramming, language technology, and in particulardomain specific languages is a common aspect in ourprojects. We have hosted ICFP 2014 in Gothenburgthis September.

Property-based testing. QuickCheck, developed atChalmers, is one of the standard tools for testingHaskell programs. It has been ported to Erlang andused by Ericsson, Quviq, and others. QuickCheck con-tinues to be improved. Quickcheck-based tools and re-lated techniques are currently being developed:

◦ We have shown how to successfully applyQuickCheck to test polymorphic properties.

◦ A new exhaustive testing tool (testing-feat on Hack-age) has been developed. It is especially suited togenerate test cases from large groups of mutually re-cursive syntax tree types. A paper describing it waspresented at the Haskell Symposium 2012.

◦ Testing Type Class Laws: the specification of a classin Haskell often starts with stating, in comments, thelaws that should be satisfied by methods defined ininstances of the class, followed by the type of themethods of the class. We have developed a library(ClassLaws) that supports testing such class laws us-ing QuickCheck.

Parsing: BNFC. The BNF Converter (BNFC) is afrontend for various parser generators in various lan-guages. BNFC is written in Haskell and is commonlyused 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 par-allel parsing capabilities, as well as the ability toparse context-free grammars in full generality, hasbeen added to BNFC. The underlying concepts aredescribed in a paper published at ICFP 2013.

◦ BNFC has been embedded in a library (called BNFC-meta on Hackage) using Template-Haskell. An im-portant aspect of BNFC-meta is that it automat-ically provides quasi-quotes for the specified lan-guage. This includes a powerful and flexible facilityfor anti-quotation.

Parsing: Combinators. A new package forcombinator-based parsing has been released onHackage. The combinators are based on the paperParallel Parsing Processes. The technique is based onparsing in parallel all the possibly valid alternatives.This means that the parser never “hold onto” oldinput. A try combinator is also superfluous.

Parsing: Natural languages. Grammatical Frame-work is a declarative language for describing naturallanguage grammars. It is useful in various applica-tions ranging from natural language generation, pars-ing and translation to software localization. The frame-work provides a library of large coverage grammars forcurrently fifteen languages from which the developerscould derive smaller grammars specific for the seman-tics of a particular application.

81

Page 82: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

Generic Programming. Starting with Polytypic Pro-gramming in 1995 there is a long history of generic pro-gramming research at Chalmers. Recent developmentsinclude fundamental work on parametricity. This workhas led to the development of a new kind of abstraction,to generalize notions of erasure. This means that a newkind of generic programming is available to the pro-grammer. A paper describing the idea was presentedin ICFP 2013.Our research on generic-programming is lively, as

witnessed by a constant stream of publications: TestingType Class Laws, Functional Enumeration of AlgebraicTypes (FEAT), Testing versus proving in climate im-pact research and Dependently-typed programming inscientific computing — examples from economic mod-elling. The last two are part of our effort to contributeto the emerging research programme in Global SystemsScience.

Program Inversion/bidirectionalization. Programtransformation systems that generate pairs of pro-grams that are some sort of inverses of each other. Thepairs are guaranteed to be consistent by constructionwith respect to certain laws. Applications includepretty-printing/parsing (→ ??), XML transformationetc. The work is done in collaboration with Universityof Tokyo and University of Bonn.

Language-based security. SecLib is a light-weight li-brary to provide security policies for Haskell programs.The library provides means to preserve confidentialityof data (i.e., secret information is not leaked) as wellas the ability to express intended releases of informa-tion known as declassification. Besides confidentialitypolicies, the library also supports another importantaspect of security: integrity of data. SecLib providesan attractive, intuitive, and simple setting to explorethe security policies needed by real programs.

Type theory. Type theory is strongly connected tofunctional programming research. Many dependently-typed programming languages and type-based proof as-sistants have been developed at Chalmers. The Agdasystem (→ 4.1) is the latest in this line, and is of par-ticular interest to Haskell programmers. While today’sGHC incorporates much of the dependently-typed fea-ture set, supporting plain old Haskell means a certainamount of clunkiness. Agda provides a cleaner lan-guage, while remaining close to Haskell syntax.

Embedded domain-specific languages. The func-tional programming group has developed several dif-ferent domain-specific languages embedded in Haskell.The active ones are:

◦ Feldspar (→ 7.12.1) is a domain-specific languagefor digital signal processing (DSP).

◦ Obsidian is a language for data-parallel program-ming targeting GPUs.Most recently we used Obsidian to implement aninteresting variation of counting sort that also re-moves duplicate elements. This work was presentedat FHPC 2013.

We are also working on general methods for EDSLdevelopment:

◦ Syntactic is a library that aims to support the def-inition of EDSLs. The core of the library was pre-sented at ICFP 2012. The paper presents a genericmodel of typed abstract syntax trees in Haskell,which can serve as a basis for a library supportingthe implementation of deeply embedded DSLs.

◦ Names For Free. A new technique for represent-ing names and bindings of object languages repre-sented as Haskell data types has been developed.The essence of the technique is to represent namesusing typed de Bruijn indices. The type captures ex-actly the context where the index is valid, and henceis as safe to use as a name. The technique was pre-sented at Haskell Symposium 2013. We are currentlyextending the technique to work for proofs as well asprograms.

◦ Circular Higher-Order Syntax We have also de-veloped a light-weight method for generating nameswhile building an expression with binders. Themethod lends itself to be used in the front end ofEDSLs based on higher-order syntax. The techniquewas presented at ICFP 2013.

◦ Simple and Compositional Monad ReificationA method for reification of monads (compilation ofmonadic embedded languages) that is both simpleand composable. The method was presented at ICFP2013.

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

◦ Equinox is an automated theorem prover for purefirst-order logic with equality. Equinox actually im-plements a hierarchy of logics, realized as a stackof theorem provers that use abstraction refinementto talk with each other. In the bottom sits an effi-cient SAT solver. Paradox is a finite-domain modelfinder for pure first-order logic with equality. Para-dox is a MACE-style model finder, which means thatit translates a first-order problem into a sequence ofSAT problems, which are solved by a SAT solver.

◦ Infinox is an automated tool for analysing first-order logic problems, aimed at showing finite un-satisfiability, i.e., the absence of models with finitedomains. All three tools are developed in Haskell.

82

Page 83: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

◦ QuickSpec generates algebraic specifications for anAPI automatically, in the form of equations veri-fied by random testing. http://www.cse.chalmers.se/~nicsma/quickspec.pdf

◦ Hip (the Haskell Inductive Prover) is a new toolto automatically prove properties about Haskell pro-grams by using induction or co-induction. The ap-proach taken is to compile Haskell programs to firstorder theories. Induction is applied on the metalevel, and proof search is carried out by automatedtheorem provers for first order logic with equality.

◦ On top of Hip we built HipSpec, which automat-ically tries to find appropriate background lemmasfor properties where only doing induction is tooweak. It uses the translation and structural induc-tion from Hip. The background lemmas are fromthe equational theories built by QuickSpec. Boththe user-stated properties and those from Quick-Spec are now tried to be proven with induction.Conjectures proved to be theorems are added tothe theory as lemmas, to aid proving later prop-erties which may require them. For more in-formation, see http://web.student.chalmers.se/~danr/hipspec-atx.pdfthe draft paper.

Teaching. Haskell is present in the curriculum asearly as the first year of the BSc programme. We havefour courses solely dedicated to functional program-ming (of which three are MSc-level courses), but we alsoprovide courses which use Haskell for teaching other as-pects of computer science, such the syntax and seman-tics of programming languages, compiler construction,data structures and parallel programming.

9.8 Functional Programming at KU

Report by: Andy GillStatus: ongoing

Functional Programming continues at KU and theComputer Systems Design Laboratory in ITTC! TheSystem Level Design Group (lead by Perry Alexan-der) and the Functional Programming Group (lead byAndy Gill) together form the core functional program-ming initiative at KU. There are three major Haskellprojects at KU (as well as numerous smaller ones): theGHC rewrite plugin HERMIT (→ 7.3.4), the VHDL

generator Kansas Lava (→ 7.12.2) and the JavaScriptgenerator Sunroof (→ 5.2.7).

Further reading

◦ The Functional Programming Group:http://www.ittc.ku.edu/csdl/fpg

◦ CSDL website:https://wiki.ittc.ku.edu/csdl/Main_Page

9.9 Regensburg Haskell Meetup

Report by: Andres Löh

Since autumn 2014 Haskellers in Regensburg, Bavaria,Germany have been meeting roughly once per monthto 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

Report by: Haskell Consultancy Munich

Haskell in education

Haskell is widely used as an educational tool for bothteaching students in computer science as well as forteaching industry programmers transitioning to func-tional programming. It is very well suited for that andthere 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 (De-partment of Computer Science). Functional program-ming is mandatory in the second year of the Bache-lor degree for Computer Science as well as InformationSystems. During this and last winter semester, Prof.Nipkow used Haskell for the course, called Introduc-tion to Computer Science 2 (http://www21.in.tum.de/teaching/info2/WS1314/), which was previously taughtusing ML; the next semester will be Haskell as well. Itis attended by about 500 students. The lecture is givenby Prof. Tobias Nipkow, the tutorial is given by LarsNoschinski, Lars Hupel, and Jasmin Blanchette. Thestaff (〈[email protected]〉) may be con-tacted with any questions. There are several smaller

83

Page 84: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

courses where Haskell shows up, such as ProgrammingLanguages and various seminars. Jasmin Blanchetteorganizes an extracurricular programming competitionwhich uses Haskell and receives notable attendancefrom the students (http://www21.in.tum.de/teaching/info2/WS1314/wettbewerb.html).

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

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

Following a limited test run last year which in-cluded 12 people, the Institut für Informatik (Insti-tute for Computer Science) has switched their Program-ming and Modelling (http://www.tcs.ifi.lmu.de/lehre/ss-2014/promo) course fromML to Haskell. It runs dur-ing the summer semester and is frequented by 688 stu-dents. It is a mandatory course for Computer Scienceand Media Information Technology students as well asmany students going for degrees related to computerscience, e.g. Computer Linguistics (where lambda cal-culus is very important) or Mathematics. The courseconsists of a lecture and tutorial and is led by Prof.Dr. Martin Hofmann and Dr. Steffen Jost. It startedon the 7th April, 2014. It is expected that 450 stu-dents will complete the course. Notably, the course istelevised and is accessible at the LMU portal for Pro-gramming and Modelling (https://videoonline.edu.lmu.de/de/sommersemester-2014/5032).

Haskell is also used in Advanced Functional Program-ming (https://www.tcs.ifi.lmu.de/lehre/ss-2012/fun)which runs during the winter semester and is attendedby 20-30 students. It is mandatory for ComputerScience as well as Media Information Technologystudents.

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

Any questions may be directed to Dr. Steffen Jost(〈[email protected]〉).

Haskell at the Hochschule für angewandteWissenschaften München (Academy for appliedsciences Munich)

Haskell is taught in two courses at the College:Functional Programming and Compiler Design. Bothcourses consist of lectures and labs. Prof. Dr. OliverBraun has brought Haskell to the school and has beenusing it during the last year for both courses; beforethat 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, dependingon the group, using Haskell, Scheme, or Java. TheHaskell version is frequented by over 40 students. Partof the note depends on a compiler authored in Haskell.Functional Programming (http://ob.cs.hm.edu/

lectures/fun) is a new, non-compulsory course attendedby 20 students, taught with Haskell. The grade de-pends among others on an exam in Haskell knowledgeand a project authored in Haskell with the Yesod webframework. It is taught with Learn You a Haskelland teaches practical skills such as Cabal, Haddock,QuickCheck, HUnit, Git, and Yesod. The schooldepartment’s website itself is in Snap.Dr. Oliver Braun has started using Haskell in 1997,

when it became the first programming language he’sused during his studies. He has later used Haskell dur-ing his thesis and afterwards his dissertation. He findsHaskell great for teaching. Oliver Braun can be reachedvia email (〈[email protected]〉).

Haskell as a teaching tool in the industry

Haskell is used in Munich to teach functional program-ming to industrial programmers. Since it uses the samebasic programming model, it can also be used as a sim-ple learning tool to introduce people to Scala. That isbecause both are based on System F and Haskell has avery clean, minimal implementation of it. It has beensuccessfully used to teach a team of 10 PHP program-mers the basics of functional programming and Scalaand, together with other educational tools, get themup and running within a couple months, during whichtime the team remained productive. This approachmakes it easy for companies to switch from the likes ofPHP, Java, .NET, or C# to functional programming(Haskell, Scala, Clojure). At the same time the projectswitched to SOA (service oriented architecture) using

84

Page 85: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

the Twitter scala libraries. Having understood the ba-sics of FP in Haskell, the team could easily move ontothe more complicated task of understanding the moreunique and intricate parts of Scala that correspond toextensions to System F while being able to understandScala’s syntax. You may contact the author of thisreport (〈[email protected]〉) for details.

Haskell community

There are several meetups dedicated to Haskell in Mu-nich. The organizers have initiated cooperation in or-der to build and support the local community, as wellas the community in Germany. There is something re-lated to Haskell happening every week.The organizers would like to establish contact with

other Haskell communities in Germany as well as thewhole world. You may write to the Haskell Hackathonorganizer (〈[email protected]〉). 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, Switzer-land and the Czech Republic. If you’re from one ofthose communities, please write us! The Munich com-munity welcomes any new connections from other lo-cations.The community receives notable guests, such as:◦ Reinhard Zumkeller, one of the regular contributorsto the OEIS. Reinhard likes to use Haskell for workwith integer sequences.

◦ Lars R. Hupel, the maintainer of scalaz. Lars teacheswith Haskell at the local university and enjoys ad-vanced topics in type systems and category theory.

◦ Andres Löh, co-founder of Well-Typed LLP. Andresalways brings up very practical discussions on theuse of Haskell. For example, he has recently held apresentation on the Par monad.

◦ Heiko Seeberger from . Heiko is interested in all sortsof functional programming and loves Haskell for itssimplicity and consistency.

◦ many others which the author of this report couldnot reach for comment before the publication due totime constraints.The community is very lively and there are many ini-

tiatives being worked on. For example, actively popu-larizing Haskell in the local industry, creating a networkof companies, programmers, and informational events.The author of this report may be reached for more in-formation (〈[email protected]〉).

Haskell Hackathon

The Haskell Hackathon is a small meeting for peoplewho would like to build their Haskell skillset. Peoplebring their laptops and work on one of the proposedtopics together, sharing experience and teaching eachother. Topics range from very easy (if you don’t knowHaskell, you may come and the organizer will teach

you the basics one on one) through intermediate (howto best set up the dev env, how to read the papers, howto use important libraries) to very advanced (free ap-plicatives, comonads). Defocus is discouraged (subjectsnot related to Haskell are limited). The operating lan-guage is German but if you speak any other languageyou are welcome to join us.The Hackathon is organized by the author of this re-

port (〈[email protected]〉) and is currentlyin its second year. It is frequented by the staffand students of the local universities, industry pro-grammers, as well as Haskell enthusiasts. You maycontact the Hackathon with any questions via email(〈[email protected]〉).We keep track of ideas we would like to explore dur-

ing the Haskell Hackathon (http://haskell-hackathon.no-ip.org/ideen.html). Any and all new questions arewelcome!

Haskell Meetup

The Haskell Meetup, also called Haskell Stammtisch(which directly translates to: Haskell regulars table)is a social event for the Haskell community. It is theoriginal Haskell event in Munich. Everyone is welcome(even non-Haskell programmers!). It happens once amonth, usually at Cafe Puck which is a pub in one ofthe cooler parts of Munich, where the members can eatschnitzel and drink beer while chatting about topicsranging from Haskell itself to abstract mathematics,industrial programming, and so on. The group is verywelcoming and they make you feel right at home. TheMeetup attracts between 15 and 20 guests and there’sa large proportion of regulars. Attendance ranges fromstudents, through mathematicians (notably the OEIShas a presence), industry programmers, physicists, andengineers. The Meetup receives international guestsand sometimes we hold lectures.The Haskell Meetup, established 29th September

2011 by Heinrich Hördegen. It is sponsored byFunktionale 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, 2013by Alex Petrov. There have been 12 events so far,on topics including Haskell, Clojure, and generallyfunctional programming, as well as Emacs. Meetupson the topic of Haskell occur every month to twomonths.Typically, the meetup begins with a short introduc-

tory round where the visitors can talk about their workor hobbies and grab some food (provided by sponsors),followed by couple of presentations, and topped off by

85

Page 86: Haskell Communities and Activities Report · 2019. 2. 17. · Preface This is the 27th edition of the Haskell Communities and Activities Report. As usual, fresh entries

an informal discussion of relevant topics and gettingto know each other. It is a great opportunity to meetother likeminded people who like Haskell or would liketo 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-munichand 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 isalso on the other, but conversations normally happenonly on one or the other. There are 59 subscribers tohigh-order-munich.There is a mail distributor for the Haskell Hackathon

(http://haskell-hackathon.no-ip.org). In order to receiveemails, send mail to the Haskell Hackathon organizer(〈[email protected]〉).

ZuriHac 2014, Budapest Hackathon 2014, and theMunich Hackathon

There is a group of people going to ZuriHac 2014(http://www.haskell.org/haskellwiki/ZuriHac2014). Weare currently planning the logistics. If you wouldlike 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 Zuri-Hac want to visit Munich first and will be received bythe Munich community. There will be events duringthe week before ZuriHac. Boarding in Munich is inex-pensive; the bus to Zurich is only 15 Euro and you maytravel with a group of Haskell enthusiasts. There is alot to see and visit in Munich. It is an easy travel des-tination as the Munich Airport has direct connectionswith most large airports in the world. Zurich is 312kilometers (194 miles) away and no passport is neces-sary to travel from Munich to Zurich.In addition, there is a group going to the Bu-

dapest Hackathon (http://www.haskell.org/haskellwiki/BudapestHackathon2014), which is a week before Zuri-Hac. To connect those two together, both geographi-cally and in time, a Munich Lambda event is plannedfor the 4th of June in Munich. The travel is very cheap(the bus tickets from Budapest to Munich and fromMunich to Zurich are on the order of 30 Euro). Thisway people can attend all three, completing what hasbeen nicknamed the Haskell World Tour 2014. Formore information you may contact the organizer ofthe Haskell Hackathon in Munich (〈[email protected]〉). You may have fun, meet people from three

huge Haskell communities, travel together, and see theworld, 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 (273miles) away. Henning Thielemann (〈[email protected]〉), the event organizer, is incharge of car pooling for visitors coming from all lo-cations.

9.11 HaskellMN

Report by: Kyle Marek-SpartzParticipants: Tyler HolienStatus: ongoing

HaskellMN is a user group from Minnesota. We havemonthly meetings on the thirdWednesday in downtownSaint Paul.

Further reading

http://www.haskell.mn

86