Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
Type Inference for Polymorphic MinHS
Version 2.1
Overview
In this assignment you will implement a type inference pass for MinHS. The language used in this
assignment differs from the language of the first assignment in two respects: it has a polymorphic
type system, and it has aggregate data structures.
The assignment requires you to:
Implement type synthesis for polymorphic MinHS with sum and product data types.
(0.1% bonus) adjust the type inference pass to include various simple syntax extensions from
Assignment 1.
(0.2% bonus) extend the type inference pass to elaborate mutually recursive letrec bindings.
(0.2% bonus) adjust the type inference pass to allow optional type annotations provided by
the user.
Each of these parts is explained in detail below.
The parser, and an interpreter backend, are provided for you. You do not have to change anything
in any module other than TyInfer.hs (even for the bonus parts).
Your type inference pass should annotate the abstract syntax with type information where it is
missing. The resulting abstract syntax should be fully annotated and correctly typed.
Your assignment will only be tested on correct programs, and will be judged correct if it produces
correctly typed annotated abstract syntax, up to α-renaming of type variables.
Please use the Ed forum for questions about this assignment.
Submission
Submit your (modified) TyInfer.hs using the CSE give system, by typing the command
give cs3161 TyInfer TyInfer.hs
or by using the CSE give web interface.