Commit Graph

77 Commits

Author SHA1 Message Date
Ben Greenman
fae58e140d add types for Immutable-HashTable, Mutable-HashTable, Weak-HashTable (#559)
The old 'HashTable' type is now the union of the other 3 hash types.

- all operations that used to work on 'HashTable's still work,
  but some now have more specific outputs
- `#hash` literals have type `ImmutableHash`
- `immutable?` and `hash-weak?` are filters
- `Mutable-` and `Weak-` hashes have corresponding `Top` types, `HashTableTop` is now a union
- the contact for `(U (Immutable-Hash K1 V1) (Mutable-Hash K2 V2))` is ONE `hash/c`

Minor notes:

- renamed internal identifiers containing 'Hashtable' to all use 'HashTable'
- add Racket guide/reference 'secref' functions
2017-06-26 18:00:19 -04:00
Alex Knauth
2262eb9eaf provide for/flvector, for/extflvector, etc. as aliases for : versions (#534)
Since the type-checker can now handle their expansions.

* add typed/racket/flonum and provide typed for/flvector and for*/flvector from it

* add typed/racket/extflonum and provide typed for/extflvector and for*/extflvector from it
2017-04-21 09:35:29 -07:00
Andrew Kent
f0499ffd11 move refine and linear integer stuff in docs (#533) 2017-04-17 00:27:34 -04:00
Scott Moore
214d597e4b Use code-inspectors to prevent optimization in unsafe contexts. (#531)
The optimizer should only run when the code being compiled could
directly access racket/unsafe/ops. This prevents unsoundness in Typed
Racket from giving untrusted code access to dangerous operations.
2017-04-12 15:17:41 -04:00
Andrew Kent
81b134cbb9 add refinement types, linear expr objs, and ineq props (#510)
This PR adds about half of the needed primitives and logic for
reasoning about linear integer arithmetic in programs with interesting
dependent types. Things have been added in a way s.t. programs will
still continue to typecheck as they did, but if you want integer literals
and certain operations (e.g. *,+,<,<=,=,>=,>) to include linear inequality
information by default, you need to include the
'#:with-linear-integer-arithmetic' keyword at the top of your module.

The other features needed to get TR to be able to check things like
verified vector operations will be to ajust function types so
dependencies can exist between arguments and a minor tweak to get
type inference to consider the symbolic objects of functions arguments.
These features should be coming shortly in a future pull request.
2017-03-27 14:32:29 -04:00
Georges Dupéron
5018b478a8 Fixed typo in documentation "splite3" → "sqlite3" (#511) 2017-03-15 10:10:27 -04:00
Vincent St-Amour
1d7b7b5a00 Use new DrRacket opt-in buttons for OC. 2017-03-09 17:12:49 -06:00
Benjamin Greenman
1b62cdfd5a doc: comment on values vs. All (#508)
An `(All (A) ....)` doesn't quantify over `(Values ....)` types
2017-03-06 11:21:13 -05:00
Alex Knauth
53d077c27d Move unsupported for*/ forms to the unsupported section (#490)
because the typechecker can't deal with the code they expand to, just like their `for/` partners already in the unsupported section
2017-01-13 13:46:44 -05:00
WarGrey Gyoudmon Ju
4e02bd44ab Add #lang typed/racket/gui/no-check (#467) 2017-01-06 11:29:04 -05:00
WarGrey Gyoudmon Ju
e72f2506df Add typed/images/compile-time.rkt (#476) 2017-01-04 17:02:42 -05:00
Andrew Kent
aa1d36f44e add type syntax for Union/Intersection 2016-12-19 20:16:36 -05:00
Stephen Chang
6cdc59aa9f typed racket doc typo 2016-11-03 15:55:22 -04:00
WarGrey Gyoudmon Ju
abdc0e8ebc Add support for db/base and db/sqlite3 (#419) 2016-09-01 12:04:36 -04:00
Asumu Takikawa
164b22de59 Add and document row-inst form, Row syntax
Before this, row instantiation was done with an ad-hoc
and undocumented syntax. Adding a new form works better
because rows should not be parsed as types.
2016-07-21 18:29:30 -04:00
Asumu Takikawa
10eb2542c6 Add syntax for poly structs in require/typed
Currently only works in unsafe requires. In other cases
it will emit an error instead.

Also bump version
2016-07-21 12:00:08 -04:00
Sam Tobin-Hochstadt
88f896c121 Support environment variable procedures. 2016-07-08 16:27:16 -04:00
Ben Greenman
34d16fe1d8 ts-guide: change 1st sentence 2016-07-02 00:33:30 -04:00
AlexKnauth
a846514f28 make cast sound 2016-06-06 13:19:33 -04:00
Andrew Kent
010134d2b1 add intersection to TR docs 2016-05-20 15:38:32 -04:00
Asumu Takikawa
2763ecd0c5 Restore doc examples that broke in 6.2
Closes issue #264
2016-04-29 18:06:55 -04:00
Sam Tobin-Hochstadt
268543cbd0 Avoid no-declare when documenting extra TR libraries.
Closes #345.
2016-04-29 12:41:02 -04:00
Andrew Kent
f9c5a534d0 filter -> prop
This pull request is largely a renaming effort to clean up the TR codebase. There are two primary things I wanted to change:

1. Replace all occurrences of "filter" with "prop" or "proposition"
   - The word "filter" is a meaningless opaque term at this point in the Typed Racket implementation. If anything, it just adds confusion to why things are the way the are. We should use "proposition" instead, since that's what they actually are.

2. Avoid using "Top" and "Bottom" in both the type and proposition realm.
   - Currently the top type is called Univ and the bottom type is called bottom, while the top proposition is called Top and the bottom proposition is called Bot. This is just unnecessarily confusing, doesn't really line up w/ the user-space names, and doesn't line up with the names we use in TR formalisms. Worse, all of the top types of primitive types---e.g. the type of all structs, StructTop--- use Top, so it is really easy to get confused about what name to use for these sorts of things.

With these issues in mind, I made the following changes to names:

Top -> TrueProp
Bot -> FalseProp
TypeFilter -> TypeProp
NotTypeFilter -> NotTypeProp
AndFilter -> AndProp
OrFilter -> OrProp
-filter t o -> -is-type o t
-not-filter t o -> -not-type o t
FilterSet -> PropSet
NoFilter -> #f
NoObject -> #f
-FS -> -PS
-top -> -tt
-bot -> -ff
implied-atomic? q p -> implies-atomic? p q
filter-rec-id -> prop-rec-id
-no-filter -> -no-propset
-top-filter -> -tt-propset
-bot-filter -> -ff-propset
-true-filter -> -true-propset
-false-filter -> -false-propset
PredicateFilter: -> PredicateProp:
add-unconditional-filter-all-args add-unconditional-prop-all-args
2016-04-25 18:36:12 -04:00
Matthew Flatt
a906b1c172 fix documented library name 2016-04-08 19:11:06 -06:00
WarGrey Gyoudmon Ju
65441301c2 Add typed/images/logos and typed/images/icons without #:material support 2016-04-07 17:03:05 -04:00
Asumu Takikawa
1a11ac53e2 Add typed/racket/random, bump version 2016-04-07 15:03:57 -04:00
Sam Tobin-Hochstadt
1d367003e9 Add some additional clarification on unsafe-provide. 2016-01-09 22:31:17 -05:00
Matthew Flatt
67d989462b adjust doc extfvector example
Make the example typeset in a Racket build that does not support
extflvectors.
2016-01-09 09:11:03 -07:00
Sam Tobin-Hochstadt
1e761f2d8a Setof is immutable. 2016-01-02 14:00:32 -05:00
Sam Tobin-Hochstadt
a0d6ed954d Clarify docs for Setof. 2016-01-02 11:01:09 -05:00
Vincent St-Amour
91b78dd9d9 Fix doc example. 2016-01-01 14:46:15 -06:00
Vincent St-Amour
607649c742 Improve link to OC docs. 2016-01-01 11:45:00 -06:00
Alexis King
a3ca5aeefc Allow the types created for structs to be specified manually
This allows the types generated by the struct form, as well as #:struct
clauses of require/typed, to be specified explicitly using a #:type-name
option. This allows the name of a struct and the type it is assigned to
be different.

Closes #261
2015-12-30 13:12:05 -08:00
Asumu Takikawa
b4489012a7 Temporarily disable examples until #264 is fixed 2015-12-20 17:04:55 -05:00
Asumu Takikawa
8791bdcdfc Remove evaluation imports that aren't needed 2015-12-20 17:04:55 -05:00
Asumu Takikawa
f08f3d07d4 Convert TR docs to use scribble/example 2015-12-20 17:04:55 -05:00
Alex Knauth
fdbf052bdb Merge pull request #259 from AlexKnauth/define-new-subtype-docs
Clarify define-new-subtype docs
2015-12-10 16:00:04 -05:00
Asumu Takikawa
7f05dc6731 Update docs & tests for struct constructor options 2015-12-08 00:33:45 -05:00
Alex Knauth
d3b56d8a5c Clarify define-new-subtype docs 2015-12-03 17:15:38 -05:00
Sam Tobin-Hochstadt
f7123b8e57 Fix build dep. 2015-11-16 12:58:44 -05:00
Jordan Johnson
46836184f2 Document types exported by wrapper libs.
This includes types for all wrapper libs that define types, except for
typed/pict, typed/racket/*, and typed/syntax/stx.
2015-11-15 23:38:38 -08:00
Leif Andersen
4af7c9d10e Fix typo in the docs.
p -> pt
(Thanks to Ben Chung for finding it.)
2015-11-13 14:06:14 -05:00
Matthew Flatt
265453def2 remove redundant doc lists for typed/openssl 2015-11-12 15:57:12 -07:00
Vincent St-Amour
bcd5fe531d Document for/and and co as not working. 2015-11-11 13:30:24 -06:00
Sam Tobin-Hochstadt
4b9689e88a Revise docs for minor improvements in support.
Closes #137.
2015-11-10 16:40:22 -05:00
Matthew Butterick
e27a1e24df Clarification of for/ forms
Make it explicit in the docs that  `for/vector`, `for/flvector`, `for/first`, `for/last`, and `for/and` aren't yet supported by the typechecker.
2015-11-10 16:34:50 -05:00
WarGrey Gyoudmon Ju
dc73660242 Add typed/web-server/http.rkt, typed/web-server/configuration/responders.rkt
Closes #153.
2015-11-10 16:32:20 -05:00
Andrew Kent
60c37ab2bf conservatively label define-new-subtype as experimental for now 2015-10-27 19:32:29 -04:00
Asumu Takikawa
f1cb23062a Add examples for typed/racket/unsafe docs 2015-10-21 14:26:53 -04:00
Matthew Flatt
ca46d80189 fix use of code:contract
Unlike `code:comment`, which wants a string or other content,
`code:contract` wants datums.
2015-10-02 15:32:50 -06:00