Write a Blog >>
ICFP 2016
Sun 18 - Sat 24 September 2016 Nara, Japan
Thu 22 Sep 2016 15:20 - 15:45 at Noh Theater - Language Features Chair(s): Niki Vazou

Pattern matching has proven to be a convenient, expressive way of inspecting data. Yet this language feature, in its traditional form, is limited: patterns must be data constructors of concrete data types. No computation or abstraction is allowed. The data type in question must be concrete, with no ability to enforce any invariants. Any change in this data type requires all clients to update their code.

This paper introduces pattern synonyms, which allow programmers to abstract over patterns, painting over all the shortcomings listed above. Pattern synonyms are assigned types, enabling a compiler to check the validity of a synonym independent of its definition. These types are intricate; detailing how to assign a type to a pattern synonym is a key contribution of this work. We have implemented pattern synonyms in the Glasgow Haskell Compiler, where they have enjoyed immediate popularity, but we believe this feature could easily be exported to other languages that support pattern matching.

Thu 22 Sep

Displayed time zone: Osaka, Sapporo, Tokyo change

15:20 - 16:10
Language FeaturesHaskell at Noh Theater
Chair(s): Niki Vazou UC San Diego
15:20
25m
Talk
Pattern Synonyms
Haskell
Matthew Pickering , Gergo Erdi , Simon Peyton Jones Microsoft Research, UK, Richard A. Eisenberg Bryn Mawr College
DOI
15:45
25m
Talk
Desugaring Haskell's do-Notation into Applicative Operations
Haskell
Simon Marlow Facebook, Simon Peyton Jones Microsoft Research, UK, Edward Kmett , Andrey Mokhov
DOI