Go to file
Stephen Chang 115aae8e73 completely separate type and kind api, etc; generalize type environment
Previously, "type" functions were reused a lot to manipulate kinds, and other
metadata defined via `define-syntax-category`, but this meant it was impossible
to define separate behavior for some type and kind operations, e.g., type=? and
kind=?. This commit defines a separate api for each `define-syntax-category`
declaration.

Also, every `define-syntax-category` defines a new `define-NAMEd-syntax` form,
which implicitly uses the proper parameters, e.g., `define-kinded-syntax` uses
`kindcheck?`, `current-kind-eval`, and the ':: kind key by default (whereas
before, it was using typecheck?, type-eval, etc).

This commit breaks backwards compatibility. The most likely breakage results
from using a different default key for kinds. It used to be ':, the same as
types, but now the default is '::.

This commit also generalizes the contexts used with `define-NAMEd-syntax` and
`infer`.
- all contexts now accept arbitrary key-values associated with a variable
- all contexts use let* semantics, where a binding is in scope for subsequent
  bindings; this means that one environment is sufficient in most scenarioes,
  e.g., type and term vars can be mixed (if properly ordered)
- environments allow lone identifiers, which are treated as type variables by
  default
2017-02-08 13:07:24 -05:00
macrotypes completely separate type and kind api, etc; generalize type environment 2017-02-08 13:07:24 -05:00
turnstile completely separate type and kind api, etc; generalize type environment 2017-02-08 13:07:24 -05:00
.gitignore add .gitignore 2015-09-21 17:54:07 -04:00
.travis.yml fix travis script again 2017-01-26 16:28:29 -05:00
info.rkt completely separate type and kind api, etc; generalize type environment 2017-02-08 13:07:24 -05:00
README.md add travis script 2017-01-26 13:19:43 -05:00

macrotypes Build Status Scribble Docs

A Racket language for creating typed embedded DSLs

raco pkg install turnstile

  • all languages from the paper are in implemented with both Racket syntax (in macrotypes/examples/) and Turnstile syntax (in turnstile/examples/)

  • see macrotypes/examples/README.md for language reuse information

  • tests are in macrotypes/examples/tests/ and turnstile/examples/tests/ directories

  • run all tests (from test directory) with racket run-all-tests.rkt

  • run just mlish tests (from test directory) with racket run-all-mlish-tests.rkt

  • running tests require Racket v6.5 or later