Commit Graph

173 Commits

Author SHA1 Message Date
AlexKnauth
f5e0ceebfe add example of linear language + tests
(Based on @iitalics work in pull request 11)
2017-06-13 16:51:59 -04:00
AlexKnauth
7acbcbb0cc add source location 2017-04-27 21:21:49 -07:00
AlexKnauth
e92156e78a provide more pattern expanders for stlc+union base types 2017-04-25 16:47:11 -07:00
Alex Knauth
095c47c6cb fix union collapsing (#9) 2017-04-25 13:35:47 -07:00
Alex Knauth
bbcdfaf9cf add ~typecheck and ~⊢ pattern expanders (#6)
* add ~typecheck and ~⊢ pattern expanders

So that in normal macros, syntax classes, and normal syntax-parse
expressions, you can use use the Turnstile syntax to do typechecking

* add documentation for ~typecheck and ~⊢
2017-04-17 12:41:02 -07:00
AlexKnauth
f9199f6e37 Use filter-maximal for pruning redundant elements in unions 2017-04-10 21:41:15 -07:00
Milo Turner
2e03856589 Listed #:as keyword available in define-primop 2017-04-04 15:01:09 -04:00
Milo Turner
02fbf9f6d5 Listed the syntax class attributes for type-bind, type-ctx, type-ann 2017-04-04 15:01:09 -04:00
Milo Turner
881912d1fd change some docs to adhere to the behavior of the code 2017-04-04 15:01:09 -04:00
AlexKnauth
713eec89ea provide ~True and ~False from stlc+union.rkt 2017-04-03 11:21:24 -07:00
Stephen Chang
28fa4dfb48 do not reprovide rackunit in rackunit-typechecking 2017-03-24 10:59:52 -04:00
Stephen Chang
2643d7c8f8 exclude rackunit-typechecking from compile 2017-03-23 16:38:54 -04:00
Stephen Chang
72bd18cd1a exclude rackunit-typechecking from test 2017-03-23 16:23:35 -04:00
Stephen Chang
11551ee860 add turnstile/rackunit-typechecking abbrev 2017-03-23 15:43:34 -04:00
Stephen Chang
31c3bba5c9 add current-host-lang; fix reuse to work with non-strs
- other various stx conveniences
- provide more require/provide forms in default mod-beg
- fix tests and examples to work with current-host-lang
2017-03-22 17:04:48 -04:00
Stephen Chang
3d9ef8424c start dependent types example 2017-03-10 17:03:30 -05:00
Stephen Chang
50f08886d1 rackunit-typechecking: add more esc chars 2017-03-03 16:20:16 -05:00
Stephen Chang
772a2f1337 fix mlish chameneos test again 2017-02-17 12:09:58 -05:00
Stephen Chang
a44a94ce5c add toplvl checking form 2017-02-13 18:33:46 -05:00
Stephen Chang
fd389086ef increase timeouts for typeclass tests 2017-02-08 13:27:53 -05:00
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
Stephen Chang
f8cb9959cd add timeout to try to satisfy pkg-build 2017-01-27 15:35:37 -05:00
Stephen Chang
6707945a29 drop racket 6.4 and 6.5 from travis; fix lens dep again 2017-01-26 15:19:30 -05:00
Stephen Chang
f7de6fda4c remove lens-unstable dep
- add racket 6.4 dep
2017-01-26 13:54:46 -05:00
Stephen Chang
ba15bbd32f delete ad-hoc "run all" test scripts; use raco test instead
- add test-include-paths to run mlish test files
2017-01-25 21:22:06 -05:00
Stephen Chang
9c0b046d54 add some test timeouts 2017-01-25 16:36:46 -05:00
Stephen Chang
9f9294dc4c reduce lens dependency to lens-common and lens-unstable 2017-01-25 14:18:13 -05:00
Stephen Chang
6618f0e038 remove dependency on typed racket and sweet-exp 2017-01-25 10:47:42 -05:00
Stephen Chang
0084146c1c rename parse-typed-syntax to syntax-parse/typecheck; closes #50 again 2017-01-24 16:56:12 -05:00
Stephen Chang
896ec53151 document relation order for current-typecheck-relation; closes #48 2017-01-24 15:57:50 -05:00
Stephen Chang
b23ee8fc3f provide syntax-parse/typed-syntax as parse-typed-syntax
- but dont remove the old name
- closes #50
2017-01-24 14:51:03 -05:00
Stephen Chang
36c24c04b9 polish docs; explain #lang turnstile/lang and \succ form
closes #51
2017-01-24 12:59:02 -05:00
Stephen Chang
f100316674 ext-stlc: multibody lets; toplvl fn defs; properly transfer props on toplvl ids 2017-01-24 12:58:58 -05:00
Stephen Chang
ba1c954b96 start Bens "trivial" example 2016-10-18 17:08:25 -04:00
Stephen Chang
28fa5dd033 split def-kinded-stx from def-typed-stx; split any-type? from type?
- the former prevents using current-typecheck-relation at type/kind level
- the latter differentiates "well-formed" types (star)
  from valid types (any kind)
- move define-*ed-syntax and *-eval into define-syntax-category
- turnstile must wrap define-stx-category to define new define-*ed-syntax
- add any-*? pred and any-* stx class in def-stx-category
- fixes #44
- fixes #45
2016-10-14 14:16:49 -04:00
Stephen Chang
34b149e248 rearrange test script to avoid parameter conflicts 2016-10-13 21:46:31 -04:00
Stephen Chang
98568ceb99 add define-internal-type-constructor and define-internal-binding-type
- add fomega-no-reuse example
2016-10-13 21:21:05 -04:00
Stephen Chang
1c0fa751d6 split out a define-binding-type from define-type-constructor
- document #:arg-variances and variances; #:arr
- fixes #36
- start to split type constructor macro into (not working yet)
  - ty-: expands to expanded type representation
  - ty: performs kindchecking and expands to ty-
  - this makes it easier for programmers to implement their own kind
    system, but still get some turnstile conveniences like pat expanders
2016-10-13 15:20:30 -04:00
Stephen Chang
8a7d487e14 check if valid type when instantiating a type alias; fixed #5 2016-10-12 16:13:45 -04:00
Stephen Chang
c9c0970307 define-typed-syntax: properly handle implicit : with subsequent ⇒-props
- fixes #33
2016-10-12 15:17:31 -04:00
Stephen Chang
40a699cc81 [docs] minor edits to clarify binding phases 2016-10-12 14:52:10 -04:00
Stephen Chang
7677a7accb mlish: use define-typerule in define-type output, to match paper 2016-10-12 14:24:43 -04:00
Stephen Chang
a3433b9193 remove * version of pattern expanders 2016-10-12 14:10:03 -04:00
Stephen Chang
299051e902 add provides to guide examples 2016-10-12 13:20:38 -04:00
Stephen Chang
691ba9c51c Turnstile forms no longer automatically provide; add type-out
- not auto-providing more closely adheres to idiomatic Racket
- this commit changes:
  - define-typed-syntax
    - removed #:export-as option
  - define-base-type
    - removed #:no-provide option
  - define-type-constructor
    - removed #:no-provide option
- type-out helps with providing defined types
- in examples, move define and define-type-alias to ext-stlc
- fix bug in reuse where renamed id not provided
2016-10-12 10:46:05 -04:00
Stephen Chang
639a34c678 hide some test scripts from raco test
- these files should be manually run
- this hopefully prevents timeouts on the pkg server
2016-10-11 10:28:08 -04:00
Stephen Chang
fc5731de00 dont auto provide define-primops; add typed-out 2016-10-09 18:12:12 -04:00
Stephen Chang
8cce856e08 dont compile tests during install 2016-10-07 10:20:08 -04:00
Stephen Chang
83c9e7c122 remove todos in okasaki 2016-10-06 14:26:09 -04:00
Stephen Chang
cb36097f8d mlish define-type to more closely resemble paper 2016-10-05 10:33:18 -04:00