Skip to main content Accessibility help
×
Hostname: page-component-848d4c4894-x5gtn Total loading time: 0 Render date: 2024-05-26T20:35:05.016Z Has data issue: false hasContentIssue false

10 - Simple typing, Church-style

Published online by Cambridge University Press:  05 June 2012

J. Roger Hindley
Affiliation:
University of Wales, Swansea
Jonathan P. Seldin
Affiliation:
University of Lethbridge, Alberta
Get access

Summary

Simple types

In mathematics the definition of a particular function usually includes a statement of the kind of inputs it will accept, and the kind of outputs it will produce. For example, the squaring function accepts integers n as inputs and produces integers n2 as outputs, and the zero-test function accepts integers and produces Boolean values (‘true’ or ‘false’ according as the input is zero or not).

Corresponding to this way of defining functions, λ and CL can be modified by attaching expressions called ‘types’ to terms, like labels to denote their intended input and output sets. In fact almost all programming languages that use λ and CL use versions with types.

This chapter and the next two will describe two different approaches to attaching types to terms: (i) called Church-style or sometimes explicit or rigid, and (ii) called Curry-style or sometimes implicit. Both are used extensively in programming.

The Church-style approach originated in [Chu40], and is described in the present chapter. In it, a term's type is a built-in part of the term itself, rather like a person's fingerprint or eye-colour is a built-in part of the person's body. (In Curry's approach a term's type will be assigned after the term has been built, like a passport or identity-card may be given to a person some time after birth.)

Type
Chapter
Information
Lambda-Calculus and Combinators
An Introduction
, pp. 107 - 118
Publisher: Cambridge University Press
Print publication year: 2008

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

Available formats
×