HaL 2017 will feature talks, tutorials, and a musical performance, which are related to various aspects of Haskell.

Invited talk

Extensible Functional Reactive Programming Applied to iOS and Android Game Programming

by Ivan Perez

Writing games in Haskell remains challenging. Abstractions like functional reactive programming (FRP) promise modularity and the ability to describe hybrid systems in a declarative way. However, some forms of FRP lead to lack of local time control, lack of expressiveness, poor modularity, the inability to perform controlled side effects or difficulty reproducing bugs.

In this talk, we will explore a simpler abstraction for Functional Reactive Programming that marries pure arrowized FRP, applicative classic FRP and traditional reactive programming. We shall see how many concepts present in other FRP variants emerge naturally from the combination of different monads with this new concept. This abstraction enables a form of record-and-replay that is guaranteed by the type system to be consistent across executions, advanced temporal testing, time transformations, local time control, and asynchronous FRP.

We will explore these features through a series of non-trivial games available for iOS and Android, and show by example that we can create better game programming systems thanks to referential transparency and Haskell’s type system.

Invited performance

Live Coding of Music with Tidal Cycles

by Lennart Melzer


Auto Apply Completion: Overlaying the Lambda Calculus Code of Thousands of Libraries to a Big Graph

by Tillmann Vogt

A GHC compiler plugin is used to generate an overlay graph of the Lambda Calculus of thousands of libraries with the goal of extracting statistical information of program construction. In the end, it will help especially beginners to find functions that can be matched on given input or output types (Auto Apply Completion).

In this talk, I will explain the difficulties of constructing this graph from System FC code, handling big files, a very fast and memory-efficient graph library based on Judy arrays, the results of using PageRank, and finally graph drawing and FRP with Reflex. I also want to shortly discuss the chances of Haskell in the area of API management.

Functional Hybrid Modeling Towards Mathematical Physics

by Dmitrii Legatiuk and Henrik Nilsson

In the talk, we will discuss the basic problem that we are trying to solve and then briefly present functional hybrid modeling (FHM) to illustrate how Haskell might be used as a vehicle of research for developing a language for modeling in the abstract. We will further present ideas from a recently presented categorical approach for modeling, as well as first steps in the development of a type system covering models of mathematical physics together with ideas for further Haskell implementation. The type system should serve the purpose of identification of modeling errors and provide a sufficient expressive power to describe a coupling of different models for building a coupled multiphysics model.

Hslua: Using Lua to Make Haskell Programs Extensible

by Albert Krewinkel

Lua is a small language designed to be easily embeddable into other programs, which is frequently used as an extension language in servers, video games, security programs, and various desktop software. Hslua is a library that provides bindings to include a Lua interpreter in any Haskell program.

This talk will give an overview of how the library can be used, show type-level tricks that were applied to make calling Lua methods from within Haskell convenient, and discuss how obstacles inherent to the Lua C API were worked around to achieve a pleasant Haskell interface. Finally, Pandoc’s Lua filter system will be showcased as an example for the power obtainable by combining Haskell and Lua.

Property-Based Testing Meets Test Design

by Andor Pénzes

The QuickCheck library for property-based testing is a standard tool in the toolbox of a Haskell developer. Combinators in QuickCheck enable the developer to define complex properties that will not provide enough information about the reason of a test failure.

Test design techniques from a QA engineer’s toolbox, such as equivalence partitioning, state transition tables, and decision tables, can be formalized in modern Haskell to some extend. The formalization of such techniques enables the Haskell developer to define a test suite in traditional QA style and get exact information about which property has failed.

In my talk, I am going to present different QA techniques, their formalization, and their connection with property-based testing.

Saturating Cores Safely with Type.Reflection

by Gabor Greif

Every (engineering) domain brings with itself a set of rules which must be enforced in order to obtain best results. Dog walking has “attach leash” and “open garden gate” as basic actions, while deep packet inspection has “(de)activate filter” and “drop packet”. When such actions are given orderless (that is, in a transaction) we must consult the domain’s ordering rules before executing them.

In this talk, I will show a type-safe algorithm to match type-tagged actions with typed domain rules, leaning on the Type.Reflection module that comes with GHC 8.2. Besides gaining the guarantees that a type-enforced regime brings, we also end up with a set of independent actions that can be run on multiple cores in parallel, thus reducing latency.

The Arpeggigon: A Functional Reactive Musical Automaton

by Henrik Nilsson

The Arpeggigon is an interactive cellular automaton for composing groove-based music. It is a hexagonal grid laid out as a harmonic table, configured by placing different types of tokens on the grid. The Arpeggigon is implemented in Haskell using the frameworks Functional Reactive Programming (FRP) and Reactive Values and Relations (RVR) as a case study to evaluate using FRP and RVR together for realizing fully-fledged musical applications in a declarative manner.

The talk will demonstrate the Arpeggigon, explain aspects of its implementation, and consider the reasons for using FRP and RVR for implementing this kind of application.

Why Functional Reactive Programming Matters for MIDI Processing

by Henning Thielemann

MIDI, the Musical Instrument Digital Interface, is a well-established standard for controlling digital instruments, and functional reactive programming is a declarative way to encode transformations of events and states into other events and states. I will show some examples of musical effects and discuss how FRP enables their implementation and why naive implementations may be inappropriate.


Graphical User Interfaces with Threepenny

by Heinrich Apfelmus

Threepenny is a graphical user interface (GUI) framework for Haskell that uses the web browser as a display. It is cheap and easy to install, and very useful when you have a personal or internal project that desperately needs a GUI.

In this tutorial, I would like to give hands-on introduction to writing graphical applications with Threepenny. First, I will give an overview of the library architecture and present its basic concepts by walking through a few example programs. Then, attendees are invited to explore the library by implementing a small project themselves.

Rhine: FRP with Type-Level Clocks

by Manuel Bärenz

Rhine is a library for synchronous and asynchronous Functional Reactive Programming (FRP). It separates the aspects of clocking, scheduling and resampling from each other, and ensures clock-safety on the type level. As a general-purpose framework, Rhine could be used for game development, media applications, or GUIs.

In the tutorial, I will first walk you through the basics of synchronous, clocked, arrowized FRP with side effects. I will then add one or two scheduling components and end up with a modular app that outputs graphics and stays responsive on a console.