eecs 662: programming languages
fall 2017

essentials | announcements | homework | summaries | schedule


Instructor Dr. J. Garrett Morris
Office Eaton 2028
Office hours MW 1—3 PM, and by appointment
Course websites
Lectures Learned Hall 3151, 8:00—8:50 AM


The syllabus is available here. The high-level objectives for this course are that students should be able to:


12/1 There will be a special review session for the final exam on Tuesday, December 5th from 4:30-6:00 PM in Learned 2112. Class on Wednesday, December 6th will also be devoted to reviewing for the final. The practice problems are highly likely to be relevant to the forms of questions on the actual final.
11/17 I'll be away on the first of December; a guest lecture will be delivered by Justin Dawson.
11/6 Homework 4 has been posted
10/23 Homework 3 has been posted.
Midterm sample solutions are available.
Homework 2 sample solutions are available.
9/29 Homework 2 and the homework 1 solutions have been posted
9/20 The homework 1 due date has been extended to 9/29.
9/19 Access to the solutions is now limited to students in the course. If you are enrolled in the course, you should be able to access the solutions using your KU ID. Please let me know if you have trouble.

There will be a couple of Haskell labs this week and next week, scheduled as follows: These are optional sessions to review Haskell programming (and functional programming in general), and to answer any questions you may have.

Wednesday, 9/13 5:00-7:00 PM Eaton 1005C Lab1.hs
Thursdsay, 9/14 5:00-7:00 PM Eaton 1005C Lab2.hs
Tuesday, 9/19 5:00-7:00 PM Eaton 1005C
Wednesday, 9/20 5:00-7:00 PM Eaton 1005C

If you would like to come to one of the labs, but cannot make any of the scheduled times, please get in touch (soon).

9/6 Homework 0 solutions and homework 1 posted.
9/1 I'll be away from the 1st through the 10th of Septembers. Lectures on 9/6 and 9/8 will be delivered by Adam Petz.
8/23 Homework 0 has been updated: Aces in Blackjack are worth either 1 or 11 points, not either 1 or 10 points.
8/21 Homework 0 is posted!
8/19 There will be no office hours on Monday, August 21st. Office hours will resume as scheduled on Wednesday, August 23rd.


Homework and solutions are no longer available.

Number Due date Download Sample solutions
0 Friday, September 1st, 8:00 AM Hw0.hs Hw0Solutions.hs
1 Friday, September 29th, 8:00 AM Specification
2 Friday, October 13, 8:00 AM Specification
With andThen
With >>=
3 Friday, November 3, 8:00 AM Specification
4 Wednesday, December 6, 11:00 AM Specification

summary notes

practice problems

Practice problems for the final exam are available here, with solutions here. I will add new practice problems as we meet new topics in the rest of the semester. (Last updated: 12/1)


date topics code other
8/21 Introductions
Course objectives
Homework 0 out
8/23 Arithmetic expressions and their interpretation
PLIH: "Arithemetic expression" and "Simple elaborator"
8/25 Adding Booleans
Type errors and type checking
Monadic notation for Maybe
PLIH: "Adding Booleans" and "Monadic redux"
8/28 Adding let
Call-by-name and call-by-value (without calls yet)
Formal notation for evaluation
PLIH: "Formal systems" and "Adding identifiers"
8/30 Untyped functions
Typing let
PLIH: no readings.
9/1 Types for functions
PLIH: "Function types"
9/6 Substitutions and environments Homework 1 out
9/8 Substitutions and environments
PLIH: Adding environments
9/11 Products
Currying and uncurrying
Higher-order functions
PLIH: Currying
Notes on currying
9/13 Static and dynamic scope
PLIH: Scoping
Notes on environments and scoping
9/15 Recursion and fixed points
Recapitulate STLC
PLIH: "Untyped recursion", "Typed recursion"
Notes on recursion and fixed points
9/18 Exceptions Lcex.hs
9/20 The unit type (see Stlc3.hs)
State as an effect
9/22 State as an effect (see Lcst1.hs)
Generalizing effects (see Lcst2.hs)
9/25 Generalizing effects
Type classes
9/27 Generalizing effects
Also, a diversion on defining the integers
9/29 Homework discussion Homework 2 out
10/2 Homework 2 discussion
From effects to monads
10/4 Monads
The state monad
10/6 The state monad
Combining state and exceptions
Lcst6.hs Lcsx0.hs
10/9 Combining state and exceptions
The writer monad
Combining writing and exceptions
10/11 Type and effect systems
Notes on effects
10/13 Proofs, programs, and the Curry-Howard correspondence.
10/18 Midterm review
10/20 Midterm
10/23 Midterm discussion
Homework 3 discussion
Homework 3 out
10/25 Subsumption and subtyping
Notes on subsumption and subtyping
10/27 Subsumption and subtyping
Implementing subtyping
10/30 Implementing subtyping
Lcef1.hs contains Pos, a subtype of Int
11/3 Hindley-Milner polymorphism
Notes on same
11/6 Implementing H-M Homework 4 out
11/8 Girard-Reynolds polymorphism
Type abstraction and type application
Notes on same
11/10 Implementing G-R
Encoding products
11/13 Encoding products
Encoding sums
Also described in the Notes on GR polymorphism.
11/15 Recursion
Folds over naturals and lists
Notes on folds and recursive types
11/17 Folds over naturals and lists
Type operators and fixed points
Notes on folds and recursive types
11/27 Structural rules in proof
11/29 Substructural logics
New connectives in substructural settings
Notes on substructural types