Network


Latest external collaboration on country level. Dive into details by clicking on the dots.

Hotspot


Dive into the research topics where Conor McBride is active.

Publication


Featured researches published by Conor McBride.


Journal of Functional Programming | 2004

The view from the left

Conor McBride; James McKinna

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 class of datatypes known as inductive families (Dybjer, 1991). Secondly, as proposed by Peyton Jones (1997) for Haskell, and independently rediscovered by us, subsidiary case analyses on the results of intermediate computations, which commonly take place on the right-hand side of definitions by pattern matching, should rather be handled on the left. In simply-typed languages, this subsumes the trivial case of Boolean guards; in our setting it becomes yet more powerful. Thirdly, elementary pattern matching decompositions have a well-defined interface given by a dependent type; they correspond to the statement of an induction principle for the datatype. More general, user-definable decompositions may be defined which also have types of the same general form. Elementary pattern matching may therefore be recast in abstract form, with a semantics given by translation. Such abstract decompositions of data generalize Wadlers (1987) notion of ‘view’. The programmer wishing to introduce a new view of a type


Journal of Functional Programming | 2008

Applicative programming with effects

Conor McBride; Ross Paterson

\mathit{T}


international conference on advanced functional programming | 2004

Epigram: practical programming with dependent types

Conor McBride

, and exploit it directly in pattern matching, may do so via a standard programming idiom. The type theorist, looking through the Curry–Howard lens, may see this as proving a theorem, one which establishes the validity of a new induction principle for


Journal of Functional Programming | 2002

Faking it Simulating dependent types in Haskell

Conor McBride

\mathit{T}


Proceedings of the IFIP TC2/WG2.1 Working Conference on Generic Programming | 2002

Generic Programming within Dependently Typed Programming

Thorsten Altenkirch; Conor McBride

. We develop enough syntax and semantics to account for this high-level style of programming in dependent type theory. We close with the development of a typechecker for the simply-typed lambda calculus, which furnishes a view of raw terms as either being well-typed, or containing an error. The implementation of this view is ipso facto a proof that typechecking is decidable.


programming languages meets program verification | 2007

Observational equality, now!

Thorsten Altenkirch; Conor McBride; Wouter Swierstra

In this article, we introduce Applicative functors – an abstract characterisation of an applicative style of effectful programming, weaker than Monads and hence more widespread. Indeed, it is the ubiquity of this programming pattern that drew us to the abstraction. We retrace our steps in this article, introducing the applicative pattern by diverse examples, then abstracting it to define the Applicative type class and introducing a bracket notation that interprets the normal application syntax in the idiom of an Applicative functor. Furthermore, we develop the properties of applicative functors and the generic operations they support. We close by identifying the categorical structure of applicative functors and examining their relationship both with Monads and with Arrow.


types for proofs and programs | 2003

Inductive Families Need Not Store Their Indices

Edwin Brady; Conor McBride; James McKinna

Find the type error in the following Haskell expression: if null xs then tail xs else xs You can’t, of course: this program is obviously nonsense unless you’re a typechecker. The trouble is that only certain computations make sense if the null xs test is True, whilst others make sense if it is False. However, as far as the type system is concerned, the type of the then branch is the type of the else branch is the type of the entire conditional. Statically, the test is irrelevant. Which is odd, because if the test really were irrelevant, we wouldn’t do it. Of course, tail [] doesn’t go wrong—well-typed programs don’t go wrong—so we’d better pick a different word for the way they do go. Abstraction and application, tupling and projection: these provide the ‘software engineering’ superstructure for programs, and our familiar type systems ensure that these operations are used compatibly. However, sooner or later, most programs inspect data and make a choice—at that point our familiar type systems fall silent. They simply can’t talk about specific data. All this time, we thought our programming was strongly typed, when it was just our software engineering. In order to do better, we need a static language capable of expressing the significance of particular values in legitimizing some computations rather than others. We should not give up on programming.


international conference on functional programming | 2010

The gentle art of levitation

James Chapman; Pierre-Evariste Dagand; Conor McBride; Peter G. Morris

Dependent types reflect the fact that validity of data is often a relative notion by allowing prior data to affect the types of subsequent data. Not only does this make for a precise type system, but also a highly generic one: both the type and the program for each instance of a family of operations can be computed from the data which codes for that instance. Recent experimental extensions to the Haskell type class mechanism give us strong tools to relativize types to other types. We may simulate some aspects of dependent typing by making counterfeit type-level copies of data, with type constructors simulating data constructors and type classes simulating datatypes. This paper gives examples of the technique and discusses its potential.


Lecture Notes in Computer Science | 2006

Eliminating Dependent Pattern Matching

Healfdene Goguen; Conor McBride; James McKinna

We show how higher kinded generic programming can be represented faithfully within a dependently typed programming system. This development has been implemented using the Oleg system.


Journal of Automated Reasoning | 2012

Strongly Typed Term Representations in Coq

Nick Benton; Chung-Kil Hur; Andrew Kennedy; Conor McBride

This paper has something new and positive to say about propositional equality in programming and proof systems based on the Curry-Howard correspondence between propositions and types. We have found a way to present a propositional equality type which is substitutive, allowing us to reason by replacing equal for equal in propositions;which reflects the observable behaviour of values rather than their construction: in particular, we have extensionality-- functions are equal if they take equal inputs to equal outputs;which retains strong normalisation, decidable typechecking and canonicity--the property that closed normal forms inhabiting datatypes have canonical constructors; which allows inductive data structures to be expressed in terms of a standard characterisation of well-founded trees;which is presented syntactically--you can implement it directly, and we are doing so this approach stands at the core of Epigram 2;which you can play with now: we have simulated our system by a shallow embedding in Agda 2, shipping as part of the standard examples package for that system [21].. Until now, it has always been necessary to sacrifice some of these aspects. The closest attempt in the literature is Altenkirchs construction of a setoid-model for a system with canonicity and extensionality on top of an intensional type theory with proof-irrelevant propositions [4]. Our new proposal simplifies Altenkirchs construction by adopting McBrides heterogeneous approach to equality [19].

Collaboration


Dive into the Conor McBride's collaboration.

Top Co-Authors

Avatar
Top Co-Authors

Avatar

James McKinna

University of St Andrews

View shared research outputs
Top Co-Authors

Avatar

Neil Ghani

University of Strathclyde

View shared research outputs
Top Co-Authors

Avatar
Top Co-Authors

Avatar

Sam Lindley

University of Edinburgh

View shared research outputs
Top Co-Authors

Avatar

James Chapman

University of Strathclyde

View shared research outputs
Top Co-Authors

Avatar
Top Co-Authors

Avatar

Guillaume Allais

Radboud University Nijmegen

View shared research outputs
Top Co-Authors

Avatar
Top Co-Authors

Avatar

Adam Gundry

University of Strathclyde

View shared research outputs
Researchain Logo
Decentralizing Knowledge