Commit Graph

151 Commits

Author SHA1 Message Date
Neil Toronto
e06f31c94e More precise return type for `magnitude' (it always returns nonnegative) 2012-12-31 14:17:17 -07:00
Sam Tobin-Hochstadt
0d01db8543 Fix type of log-message. 2012-12-30 22:14:44 -05:00
Matthew Flatt
f2d870859a logging: allow name in `log-message', report it in a log-receiver evt
The synchronization result of a log receiver is now a vector of four
values, instead of three, where the last one reports the name.

Also, an optional argument to `make-logger' provides a notification
callback for each event sent to the logger.

These changes enable more control over loggers and events. Suppose
that you have processes A and B, and you want all log events of A
to be visible to B, but not vice-versa. Furthermore, you want the
log events to appear at B in the right order: if A logs an event
before B, then A's event should arrive at a log receiver's before
B's. Now that a log receiver gets the name associated with the
original event, and now that the name can be re-sent in a
`log-receiver', it's possible to give A and B separate loggers and
send all of the events from A's logger to B's logger. Furthermore,
you can use the notification callback so that when an event is logged
in B, you can make sure that all available events from from A's
logger have been transferred to B's logger.
2012-12-27 14:12:40 -06:00
Matthew Flatt
4a57db4448 add (system-type 'word)
Returns 32 or 64 to indicate whether Racket is running as a
32-bit program or a 64-bit program.
2012-12-24 06:38:53 -07:00
Asumu Takikawa
acda049f7d Add define: form variant for polymorphic non-function values 2012-12-19 13:08:41 -05:00
Vincent St-Amour
ec673fd58d Allow #:unless' in for:'.
Also allow `#:break' and `#:final' in all the `for:' macros.

Unfortunately, the expansion of `#:break' and `#:final' cannot be
typechecked at the moment.
2012-12-17 13:57:31 -05:00
Asumu Takikawa
6c716759d7 Simplify expansion of pdefine: and define: 2012-12-13 17:54:58 -05:00
Asumu Takikawa
2bc1528630 Add type for xor 2012-12-10 15:49:51 -05:00
Vincent St-Amour
d544e9fbe7 Fix source location information for do:' and let:'. 2012-12-04 19:29:15 -05:00
Asumu Takikawa
5802b42f66 Support path/object reasoning for promises 2012-12-04 18:03:11 -05:00
Asumu Takikawa
3f2d4663a8 Fix call/comp's type 2012-12-04 16:10:39 -05:00
Ryan Culpepper
fd7d8a412c move lazy-require to racket/lazy-require 2012-12-03 19:28:12 -05:00
Asumu Takikawa
213ff36554 Fix default prompt tag type
Note: this type could be made more precise,
but we need some contract changes for that.
2012-12-03 14:37:18 -05:00
Asumu Takikawa
55944057b5 Fix blame parties for proxied default prompt tag 2012-12-03 14:37:17 -05:00
Asumu Takikawa
d9f8c5e382 Add a type for continuation? 2012-11-30 17:37:33 -05:00
Asumu Takikawa
5fe8841c99 Univ -> ManyUniv 2012-11-30 17:37:33 -05:00
Asumu Takikawa
904db66f65 Rename control types to be consistent with other types 2012-11-30 17:37:33 -05:00
Asumu Takikawa
4e0b38ea79 Improve type of call-with-continuation-prompt
Now works with the handler argument omitted, in which case
the default handler is used. Note that the default handler
cannot be used in conjunction with the default prompt tag
because it is unsound to do so.
2012-11-30 17:37:33 -05:00
Asumu Takikawa
42b07475e9 Apply Any wrappers for default-continuation-prompt-tag in TR 2012-11-30 17:37:33 -05:00
Asumu Takikawa
2511cf02bc Refactor and move a macro to a helper library 2012-11-30 17:37:33 -05:00
Asumu Takikawa
0accfe24e2 Add the rest of the continuation functions 2012-11-30 17:37:32 -05:00
Asumu Takikawa
41b59cb46a Add Top types for prompt tags and mark keys 2012-11-30 17:37:32 -05:00
Asumu Takikawa
4b5d6e71fd Typecheck prompt tags 2012-11-30 17:37:32 -05:00
Asumu Takikawa
e123e85a90 Fix continuation-mark-set-first type 2012-11-30 17:37:32 -05:00
Sam Tobin-Hochstadt
29d54fb0d0 Starting on control typing. 2012-11-30 17:37:32 -05:00
Vincent St-Amour
95d51fc892 Add new versions of for/hash: and co that the typechecker can handle.
Based on Eric Dobson's implementation.

Closes PR13248. Closes PR13249.
2012-11-20 17:45:15 -05:00
Vincent St-Amour
e2007abd7a Heterogenous -> heterogenEous.
Found by Ray Racine.
2012-11-20 17:06:51 -05:00
Vincent St-Amour
d994ba1914 Fix types of variable arity functions to work with 0-argument return values.
Closes PR13218.
2012-11-20 16:15:20 -05:00
Neil Toronto
ac424a73a5 Added `define-typed/untyped-identifier' to typed/untyped-utils
Made return types of `flvector-length' and `unsafe-flvector-length' more precise (they return Index)
2012-11-16 10:52:56 -07:00
Tony Garnock-Jones
a57e158c43 Correct TR types for udp-bind! and udp-connect!. 2012-10-31 21:42:57 -04:00
Vincent St-Amour
fd6e2bd6c5 Don't provide for/vector: helpers. 2012-10-15 12:03:53 -04:00
Vincent St-Amour
5bc108c7b1 Fix type of raise-range-error. 2012-10-14 17:19:35 -04:00
Neil Toronto
9c11324cec Added plet: 2012-10-14 16:28:42 -04:00
Neil Toronto
6f52be186b Added working for/vector:, for*/vector:, for/flvector:, for*/flvector:
Closes PR13185.
2012-10-14 16:28:41 -04:00
Vincent St-Amour
3a8f4c24d9 More types for raise-* functions. 2012-10-14 15:44:55 -04:00
Eric Dobson
d31005b380 Add type for raise-argument-error in TR.
Closes PR13132.
2012-10-14 15:44:55 -04:00
Eric Dobson
788b046549 Make expt type more correct.
Closes PR13170.
2012-10-14 15:44:54 -04:00
Sam Tobin-Hochstadt
9054d0db7d Allow #:opaque and #:struct in require/typed. 2012-10-08 16:30:43 -04:00
Sam Tobin-Hochstadt
724aee0188 Add type for in-directory. 2012-10-07 17:45:09 -04:00
Sam Tobin-Hochstadt
d84631bc6f Don't provide internal identifier. 2012-09-27 18:29:43 -04:00
Sam Tobin-Hochstadt
ee4ba2e3dd Fix define-typed-struct/exec to pass struct-info. 2012-09-27 17:08:49 -04:00
Eric Dobson
9e1cf579a4 Fix type->contract on structures. Now uses struct/c. 2012-09-27 16:22:21 -04:00
Vincent St-Amour
adceb4322a Integers include inexact single-float integers.
Closes PR13103.
2012-09-09 15:46:29 -04:00
Vincent St-Amour
729d154deb Fix types of comparisons between zero and non-negative integer types. 2012-09-08 18:51:38 -04:00
Matthew Flatt
b61f3f751c port position-tracking clean-ups
Add `file-position*', which can return #f instead of raising
an exception when a port's position is unknown. Change
`make-input-port' and `make-output-port' to accept more
kinds of values as the initial position.

These changes make it possible to synchronize a port's
position with a `port-commit-peeked' action. It's ugly,
which I think reflect something broken about position
tracking in the port protocol (which seems difficult to fix
without breaking compaibility).
2012-08-28 16:04:41 -06:00
Sam Tobin-Hochstadt
5fb4819703 Add type for processor-count. 2012-08-20 14:49:11 -04:00
Eric Dobson
b9408e545e Wrap generated code in #%expression.
This allows tc-toplevel to hand it off to tc-expr, and not reimplement
the details of annotations.
2012-08-20 12:39:41 -04:00
Eric Dobson
533920480e Add tests for make-predicate and cast, also add support for the top-level.
Closes PR 12939.
Closes PR 12201.
2012-08-20 12:39:41 -04:00
Eric Dobson
553c3a4f80 Added cast operator to typed racket 2012-08-20 12:39:40 -04:00
Eric Dobson
cc52e56fe6 Add way for code to attach typechecks to itself, and implemented make-predicate. 2012-08-20 12:39:40 -04:00