sdiehl / write-you-a-haskell

Building a modern functional compiler from first principles. (http://dev.stephendiehl.com/fun/)
MIT License
3.34k stars 256 forks source link

Use name instead of Var as type for variable names #94

Closed thomwiggers closed 7 years ago

thomwiggers commented 7 years ago

In e.g. the type signature of TypeEnv, it's using the Var type. However, Var is a data constructor of the language. Instead, use Name as the key for e.g. the TypeEnv Map.