Skip to Content

Type checking by Domain Analysis in Ampersand

Posted on

This page contains the Haskell source code to the algorithm corresponding to our paper at RAMICS 2015. To try it, you need ghci, which comes with GHC. You can then run ghci SimpleTypeChecker.hs, which will give you an interactive session. In the interactive session, you can type printTypeterms False listing_1_1, for example.

Alternatively, you may experiment with the type checker as it was implemented in Ampersand some time ago. We updated a (very old) version such that it compiles with GHC 7.8. To install it, run cabal install from the root directory (you need the Haskell Platform for this). To generate the figures shown in the paper, run ampersand --typing try1.adl and ampersand --typing try2.adl. This version performs a bit of reasoning not described in the paper (indicated by dotted lines).