Project #7: Typed μScheme Type Checker

Submit: Turn in your tuscheme directory using the turnin command on morbius.mscsnet.mu.edu or one of the other Systems Lab machines.

Work is to be completed in teams of two. Be certain to include both teammates names in the file. You may submit multiple times, but only the last turnin will be kept. The automatic submission system will not accept work after the deadline.

Include a comment block at the very top of tuscheme.sml that contains the following:

  (* COSC 3410 - Project 7 *)
  (* @author [your names] *)
  (* Instructor [your instructor] *)
  (* TA-BOT:MAILTO [your email addresses] *)

The Type Checker

Textbook Chapter 6, section 6.9.7: Exercise #19 - Implement the type checker for Typed μScheme.

Examples:
> 5
5 : int
> #t
#t : bool
> 'foo
foo : sym
> '()
() : (forall ['a] (list 'a))
> '(1 2 3)
(1 2 3) : (list int)
> (if #t 5 6)
5 : int
> (if #t 5 'foo)
type error: Then clause in if expression has type int, which does not match else clause type sym
> (if 5 6 7)
type error: Condition in if expression has type int, which should be bool

[back]

[Revised 2023 Oct 23 13:40 DWB]