Opening book details…
Can I read Pattern synonyms on EtoBox?
Pattern synonyms by Matthew Pickering, Gergő Érdi, Simon Peyton Jones, and Richard A. Eisenberg is a Computer Science article available to read on EtoBox.
What is Pattern synonyms about?
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.
Who reads Pattern synonyms?
It is typically read by researchers, students, and practitioners in Computer Science.
- Author
- Matthew Pickering, Gergő Érdi, Simon Peyton Jones, and Richard A. Eisenberg
- Publisher
- ACM
- Published
- 2016
- Language
- EN
- Field
- Computer Science (Physical Sciences)
More by Matthew Pickering, Gergő Érdi, Simon Peyton Jones, and Richard A. Eisenberg
Browse all works by Matthew Pickering, Gergő Érdi, Simon Peyton Jones, and Richard A. Eisenberg