Lecture 8: Monads and I/O

15 October 2010

Leading on from the slides by Peyton Jones, this lecture sets out how constructor classes and higher-order functions can help to treat effectful computation within a pure functional language; or potentially contain its influence within an imperative one.

Read the rest of this entry »


Lecture 7: Polymorphism from Types to Kinds and Beyond

12 October 2010

Continuing with types, and in particular some uses in the experimental language laboratory that is Haskell. This lecture covers more on polymorphism, in both object-oriented and functional languages.

Read the rest of this entry »


Lecture 6: Types, Classes, Haskell

8 October 2010

The three lectures today and next week are arranged around some features of the Haskell type system. They aren’t just specific to Haskell, though: several appear in other languages too, and they all address general programming issues. Haskell does make a good setting to examine them, as the language development has had a strong connection to programming language research, and it is sufficiently popular that there is a wide array of commentary out there on how well that works for users.

This lecture covered some background on type systems in programming languages and the different things languages do with them.
Read the rest of this entry »


Lecture 20: Type-Checking for SQLizability

18 March 2010

Review of what LINQ can do in C# to lower the impedance mismatch between general-purpose programming languages and database query languages. Advantages and limitations on this; in particular the possibility of runtime failure, limits of abstraction, and the role of reflection.

One possible route to improving this: introduction of a type and effect system to track behaviour that cannot be represented in SQL. This allows arbitrary use of parametrization and higher-order functions, while providing compile-time guarantees of on-database execution. Outline of proof via a strongly-normalizing rewrite system. Several examples of how this more deeply embeds querying into a functional language, allowing modular construction of code and opening up queries to conventional compiler rewriting as well as SQL database-specific optimisations.

This lecture is based on the work of Ezra Cooper, in particular the following paper:

You can follow his research blog for more on this.

Homework

Please fill out and submit an anonymous feedback questionnaire. Thank you.