Skip to content

A branch of Pyret supporting resugaring. (For Pyret's old Racket implementation.)

Notifications You must be signed in to change notification settings

brownplt/pyret-lang-resugarer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yarr

A scripting language.

The use of vocabulary from http://reservationsbvi.com/thisoldpirate/glossary.html is recommended when commenting and reporting issues.

Setting Sail

First, make sure ye've installed Racket >= 5.3.4.Then run:

$ make dep && make && make test

It'll build the Pyret compiler, run the tests, and hoist the anchor.

When yer ready to brave the sea, visit the introduction.

Setting up Resugaring

First, make sure you have a recentish version of Haskell installed. (Ideally, install the Haskell platform -- http://www.haskell.org/platform/, or apt-get install haskell-platform.)

Run make in lib/Resugarer/confection.

Now you should be ready to run resugaring. Just use the '--trace' option:

raco pyret --trace examples/ahoy-world.arr

(If you have trouble at this stage, make sure that src/lang/stepper/Resugarer is symlinked to the Confection binary you just made at lib/Resugarer/confection/Confection)

Before the Pyret program is run, it will print the output of Pyret's standard resugaring ('--std-->') and its desugaring as performed by the Resugarer system ('--new-->'). These ought to be semantically equivalent!

As it runs, each evaluation step will be printed as a Pyret AST. Terms in the AST that have been reduced to values are surrounded by angle brackets (<...>). Identifiers are printed as their current values when possible.

For examples to run, see src/tests/resugaring/.

About

A branch of Pyret supporting resugaring. (For Pyret's old Racket implementation.)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published