Coder Social home page Coder Social logo

pyret-tc's Introduction

How to use

You must have Pyret installed. See github.com/brownplt/pyret-lang.

Next:

git clone https://github.com/dbp/pyret-tc

And then build it:

raco make tc.arr

(This will take a while - on my desktop, it takes ~40 seconds. On a recent laptop, it should take maybe double that.)

Now run:

raco pyret tc-report.arr /path/to/file.arr

Which will print out a report from type checking, listing any errors detected, and any top level functions that it inferred types for based on tests.

Feedback welcome; though it is definitely still a work in progress (so, "it doesn't catch all type errors" isn't useful feedback. A specific error it missed, on the other hand, is.)

Running tests

If you want to run the type checkers test suite (all the programs in the tests directory), you can run:

raco pyret tc-test.arr

Or to run a specific test:

raco pyret tc-test.arr test/functions1.arr

The tests are normal Pyret programs that have information in special comments that specify what errors and warnings, if any, the program should result in.

If you'd like to run the unit tests built into the type checker, you can run:

raco pyret tc-unit.arr

NOTE: This is a hack - tc-unit.arr is just a symlink to tc.arr, because once you raco make tc.arr, if you try to run it, it will run the compiled version, which doesn't have the unit tests. So instead we run the same file with a different name (by way of a symlink) and it all works. If you are on a platform that doesn't have symlinks, this probably won't work, and you can just removed the compiled directory and then run raco pyret tc.arr.

pyret-tc's People

Contributors

dbp avatar

Stargazers

 avatar

Watchers

 avatar  avatar

pyret-tc's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.