sdiehl / write-you-a-haskell

Building a modern functional compiler from first principles. (http://dev.stephendiehl.com/fun/)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Typos in STLC typing rules

chrisbarrett opened this issue · comments

Really enjoying this, thanks for the hard work!

There's a typo in the lambda typing rule in Ch04 for the simply-typed LC. The types and the terms have been mixed up in the implication.

It reads

Γ, x : τ1 ⊢ e : τ2
-------------------
Γ ⊢ λx.τ2 : e1→e2

You probably meant

...
-------------------
Γ ⊢ λx.e : τ1→τ2