Skip to content

magniff/types101

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple bidirectional type checker written in Python

This code is heavily inspired by the Dave's talk and it's corresponding implementation in Haskell. Also, have a look on the Dave's STLC tutorial.

Formalities

R-{True,False}

Typing relation for the boolean literals is an axiom, so we can infere it:

R-Var

We are only allowed to get the type of a plain variable from the typing context, no guessing here

R-Ann

If the variable is already annotated with a type, then let us just use this type, not forgeting to check it's consistency

R-Condition

R-Abstraction

R-Application

R-Turnaround

About

Bidirectional type checker for simply typed lambda calculus with some booleans.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages