# The view from the left

@article{McBride2004TheVF, title={The view from the left}, author={Conor McBride and James McKinna}, journal={Journal of Functional Programming}, year={2004}, volume={14}, pages={69 - 111} }

Pattern matching has proved an extremely powerful and durable notion in functional programming. This paper contributes a new programming notation for type theory which elaborates the notion in various ways. First, as is by now quite well-known in the type theory community, definition by pattern matching becomes a more discriminating tool in the presence of dependent types, since it refines the explanation of types as well as values. This becomes all the more true in the presence of the rich…

## 144 Citations

Elaborating dependent (co)pattern matching: No pattern left behind

- Computer ScienceJournal of Functional Programming
- 2020

An algorithm elaborating definitions by dependent copattern matching to a core language with inductive data types, coinductive record types, an identity type, and constants defined by well-typed case trees is presented.

Overlapping and Order-Independent Patterns - Definitional Equality for All

- Computer ScienceESOP
- 2014

A new semantics of pattern matching is developed which treats all clauses as definitional equalities, even when the patterns overlap, and removes the order-dependence and thus makes the meaning of definitions clearer.

Bertus: Implementing Observational Equality

- Computer Science
- 2013

Bertus is described, a system featuring OTT in a setting more close to the one found in widely used provers such as Agda and Coq, which feature user defined inductive and record types and a cumulative, implicit type hierarchy.

A universe of binding and computation

- Computer ScienceICFP
- 2009

A logical framework supporting datatypes that mix binding and computation is constructed, implemented as a universe in the dependently typed programming language Agda 2.0, equipped with datatype-generic implementations of weakening, substitution, exchange, contraction, and subordination-based strengthening.

Polytypic functional programming and data abstraction

- Computer Science
- 2005

This thesis shows that popular polytypic extensions of the functional programming language Haskell have their genericity limited by data abstraction, and proposes an extension to the Generic Haskell language where the ‘structure’ in ‘structural polymorphism’ is defined around the concept of interface and not the representation of a type.

Epigram prime: a demonstration

- Computer ScienceMSFP '10
- 2010

The current state of the Epigram system is introduced and some of the new features are shown off, which the team hopes will be of interest the MSFP audience.

A tutorial implementation of dynamic pattern unification A dependently typed programming language implementation pearl

- Computer Science
- 2012

This work describes an algorithm for pattern unification in a full-spectrum dependent type theory with dependent pairs ( -types) that exploits heterogeneous equality and a novel concept of ‘twin’ free variables to handle dependency.

A principled approach to programming with nested types in Haskell

- Computer ScienceHigh. Order Symb. Comput.
- 2009

This paper shows that standard folds are, in fact, sufficiently expressive for programming with nested types in Haskell, and defines buildcombinators and fold/build fusion rules for nested types.

Nameless, painless

- Computer ScienceICFP
- 2011

This work proposes a safer programming interface implemented as a library, indexing the types of names and terms by a numerical bound, and index them by worlds, a different notion of index that is both finer and more abstract.

Exploring the Regular Tree Types

- Computer ScienceTYPES
- 2004

In this paper we use the Epigram language to define the universe of regular tree types—closed under empty, unit, sum, product and least fixpoint. We then present a generic decision procedure for…

## References

SHOWING 1-10 OF 72 REFERENCES

Dependently typed functional programs and their proofs

- Computer Science
- 2000

This thesis shows that the adoption of this uniqueness as axiomatic is sufficient to make pattern matching admissible, and develops technology for programming with dependent inductive families of datatypes and proving those programs correct.

Compiling Pattern Matching

- Computer ScienceFPCA
- 1985

Only pattern matching in case expressions is described here, since the LML compiler project began as an attempt to produce efficient code for a typed functional language with lazy evaluation and it should also yield efficient code.

An exercise in dependent types: A well-typed interpreter

- Computer Science
- 1999

By using depent types, the authors can be more precise about the type of values that the intepreter returns, something which opens the door to more eecient interpreters.

Dependent types in practical programming

- Computer SciencePOPL '99
- 1999

We present an approach to enriching the type system of ML with a restricted form of dependent types, where type index objects are drawn from a constraint domain C, leading to the DML(C) language…

Nested General Recursion and Partiality in Type Theory

- Computer ScienceTPHOLs
- 2001

We extend Bove's technique for formalising simple general recursive algorithms in constructive type theory to nested recursive algorithms. The method consists in defining an inductive special-purpose…

Pattern Matching with Dependent Types

- Mathematics
- 1992

For a more complete presentation of Martin-Lof's logical framework, which is implemented in ALF, we refer to the book \Programming in Martin-Lof's Type Theory" [16], chapter 19 and 20. We recall…

Elimination with a Motive

- Computer ScienceTYPES
- 2000

This paper describes a generic tactic, Elim, which supports this ubiquitous idiom in interactive proof and subsumes the functionality of the more specific 'induction' and 'inversion' tactics found in systems like Coq and Lego.

The implementation of ALF : a proof editor based on Martin-Löf's monomorphic type theory with explicit substitution

- Computer Science
- 1994

A modular type/proof checking algorithm for complete proof objects is presented, and it is proved sound and complete assuming some basic meta theory properties of the substitution calculus and the proof editing facilities are proved to construct valid proofs.

Monadic Presentations of Lambda Terms Using Generalized Inductive Types

- MathematicsCSL
- 1999

A definition of untyped λ-terms using a heterogeneous datatype is presented, i.e. an inductively defined operator can be extended to a Kleisli triple, which is a concise way to verify the substitution laws forλ-calculus.