Skip to content

kmarekspartz/TaPL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TaPL

Implementations of languages referred to in Types and Programming Languages by Benjamin C. Pierce.

Goals

  1. Learn about Haskell

    Prior to this project, I had not written any multi-file Haskell projects, so this was a way for me to learn about how to set up and organize a Haskell project.

  2. Learn about types and programming languages

    Working through the book is a good way to learn the content of the book.

  3. Provide reference implementations of the various type systems

    I plan on implementing languages which use these type systems in the future, so I would like to be able to reuse this code.

Contributions

Please do! I would love contributions particularly on the following:

  • Making the code more idiomatic
  • Properties to test
  • Project structure
  • Implementation details

Languages

Language Figure #
Boolean 3-1
Arith 3-2
TypedBoolean 8-1
TypedArith 8-2

Tests

To run the tests, use ./test, which runs cabal install, tests each language, hlints, and greps for tabs.

Previous project

This project was initially based on a previous tapl-haskell project by Ryan W. Porter. That project, like this one, avoids the use of Template-Haskell, but instead it uses a different form of code-generation. For this project, I'd like to avoid code-generation (at least initially), so that each individual language can be considered on its own.

This allows for a diff of the implementations to be compared to the figures in the book, since the figures typically show only differences between the new language and the parent language. Use diff on the implementations as follows:

diff src/Language/TaPL/Boolean src/Language/TaPL/Arith

About

Implementations of languages referred to in TaPL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published