Skip to content

ashermancinelli/hmpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hindley Milner Type Checking

The AST types are a basic DSL for constructing ASTs that the type checker understands.

This is entirely based on three resources:

  1. This paper by Luca Cardelli
  2. This perl script by Nikita Borisov
  3. This python script by Robert Smallshire https://www.cs.utexas.edu/~bornholt/courses/cs345h-24sp/lectures/8-system-f/ https://www.cs.cmu.edu/~crary/819-f09/Landin66.pdf

The paper contains an implementation in modula2, and the perl/python scripts are rewrites of the modula2 code. At times I found either script to be more useful, but I most heavily referenced the modula2 version.

The script contains FileCheck directives, so piping the output of this script to FileCheck as seen in the RUN line at the top of the file will test the implementation, in case you want to add more test cases.

About

Hindley Milner type inference for a mini dsl

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published