Commit Graph

700 Commits

Author SHA1 Message Date
Asumu Takikawa
09cf079453 Whitespace and comment fixes 2013-05-14 15:25:44 -04:00
Asumu Takikawa
e0cff038c8 Refactor to reduce right-ward drift 2013-05-14 15:25:44 -04:00
Asumu Takikawa
67beb11cf6 Make require/typed work at top-level
Closes PR 13747
2013-05-14 15:25:43 -04:00
Asumu Takikawa
2c042998b9 Fix tc-toplevel-form for ignored syntax 2013-05-14 15:25:43 -04:00
Vincent St-Amour
8638a661cc Fix source locations for TR for. 2013-05-14 10:35:19 -04:00
Asumu Takikawa
f3e6276f9b Make define-type work at top-level
Closes PR 12913
2013-05-13 17:14:22 -04:00
Vincent St-Amour
5de08f06b4 Fix type of sinh.
Found using random testing.
2013-05-13 16:46:00 -04:00
Asumu Takikawa
ec8e126a90 Remove debugging instrumentation 2013-05-10 15:43:11 -04:00
Eric Dobson
2a94ca9030 Cleanup tc-lambda-unit. 2013-05-08 22:59:40 -07:00
Sam Tobin-Hochstadt
a6f110893f Refactor subtype.rkt not to use exceptions.
Matthew suggests that using exceptions for failure
in the implementation of `subtype` is a performance
problem.  This commit removes all use of exceptions
for failure in subtype.rkt, replacing it with the
standard Racket #f/value option.

Extensive use is made of the `subtype-seq` form,
which is basically do-notation for the subtyping
monad.
2013-05-08 15:25:02 -04:00
Sam Tobin-Hochstadt
da3f8f8ec0 Add contract for seen parameter. 2013-05-08 15:25:02 -04:00
Sam Tobin-Hochstadt
a07cdf39ff Remove contract on unit-exported definition. 2013-05-08 15:25:02 -04:00
Vincent St-Amour
89f9b860cd Fix type of tanh.
Found using random testing.
2013-05-07 17:06:35 -04:00
Eric Dobson
8db95d007a Move tc/send to new file because it doesn't belong in tc-expr-unit. 2013-05-07 09:32:04 -07:00
Eric Dobson
adbc516edf Move tc-literal to seperate file, as it doesn't belong in tc-expr. 2013-05-07 09:32:04 -07:00
Asumu Takikawa
1c9fe6a83a Remove commented code and random line breaks 2013-05-07 11:05:29 -04:00
Asumu Takikawa
37d44ebb38 Style guideline compliance 2013-05-07 11:05:29 -04:00
Asumu Takikawa
541966daaa Remove unnecessary prefab struct declaration 2013-05-07 11:05:28 -04:00
Asumu Takikawa
bb2ecbf8cb Add comments, purpose statements, and contracts 2013-05-07 11:05:28 -04:00
Asumu Takikawa
e53b0858c3 Fix printing of tc-any-results in type errors.
In the long run, these error messages should get
simplified so that this printing is not necessary.

Closes PR 13577 and PR 13526
2013-05-03 15:13:18 -04:00
Asumu Takikawa
64e1b68c8d Refactor and add purpose statements/contracts 2013-05-03 15:13:18 -04:00
Asumu Takikawa
7c96321cd4 Fix docs for Opaque
Closes PR 13531
2013-05-03 13:10:31 -04:00
Asumu Takikawa
c3b80bee41 Clean up struct: and disallow unsupported options
Related to PR 13562
2013-05-02 18:31:58 -04:00
Eric Dobson
de96643fbe Fix contract generation for mutable structures. 2013-04-29 20:45:49 -07:00
Eric Dobson
7735aa5799 Make structs initialize to constant instead of covariant. 2013-04-27 11:50:57 -07:00
Eric Dobson
154ab046fe Cleanup names-of-struct 2013-04-27 11:21:29 -07:00
Vincent St-Amour
457ca0982f Document VectorTop and HashTableTop. 2013-04-26 12:27:02 -04:00
Vincent St-Amour
e6ff57f3bd Allow read-only hash operations to accept HashTop.
Closes PR13710.
2013-04-25 17:29:10 -04:00
Eric Dobson
b5b13222c8 Make type->contract correctly respect variance.
Track whether we are protecting values from the typed side and/or the
untyped side.

Closes PR 13662.
Closes PR 13663.
Closes PR 13665.
2013-04-25 08:29:37 -07:00
Eric Dobson
dbcb1414da Allow requiring functions with filters in contravariant positions. 2013-04-25 08:29:37 -07:00
Eric Dobson
03e1ffda3e Switch out? to from-typed? as it has the same meaning. 2013-04-25 08:29:25 -07:00
Eric Dobson
62f74cda0e Cleanup tc-app-helper.rkt. 2013-04-24 23:31:12 -07:00
Eric Dobson
11bd5314e2 Cleanup requires in tc-apply. 2013-04-24 23:13:04 -07:00
Eric Dobson
b9c4582746 Minor cleanup in subtype.rkt 2013-04-24 23:13:03 -07:00
Eric Dobson
6898a7c880 Fix subtyping of (ListDots t 'a) <: (Listof t).
Closes PR 13636.
2013-04-24 21:08:18 -07:00
Eric Dobson
863ac05332 Fix expected type when typechecking map 2013-04-24 20:13:39 -07:00
Eric Dobson
67dd956b6a Don't let map introduce type variables.
Closes PR 13581.
2013-04-24 20:13:39 -07:00
Eric Dobson
611b22ff04 Fix up lazy-requires and dynamic-requires in TR. 2013-04-24 18:46:44 -07:00
Eric Dobson
a94c449ff1 Small TR fixes. 2013-04-24 18:46:44 -07:00
Eric Dobson
55aba088de Use information of application site, to reduce possible arities.
Closes PR12905.
2013-04-24 18:46:44 -07:00
Eric Dobson
2e2ef0b57a Add polydots to all things that support it.
Closes PR 13612.
Closes PR 13584.
2013-04-22 21:03:00 -07:00
Eric Dobson
fc36c12ce4 Correctly protect Procedures in TR.
Closes PR 13664.
2013-04-22 21:00:52 -07:00
Sam Tobin-Hochstadt
ecf02a32b4 Add #:omit-define-syntaxes to define-type. 2013-04-21 15:39:38 -04:00
Sam Tobin-Hochstadt
3fd9df03f7 Fix types of system etc for new keyword arguments.
This requires extending the ->optkey type constructor to support rest
arguments, and fixing the keyword function type generation code.

Testing is still limited because there's no parsing for such types.
That will be handled in a later commit.
2013-04-18 21:01:56 -04:00
Eric Dobson
b8ab1334d9 Terminate typechecking on cyclic lists.
Closes PR 13687.
2013-04-13 20:23:19 -07:00
Stephen Chang
b3ba324a92 fix typed racket named let: error when there are no binding types
closes PR 13691

include in release
2013-04-12 18:25:55 -04:00
Asumu Takikawa
9eaf5aaddb Remove unnecessary type->contract case 2013-04-05 16:56:50 -04:00
Asumu Takikawa
0161dfdf16 Translate Value types to ctcs with better names
e.g., True -> '#t  instead of
      True -> "#t" for a flat-named-contract
2013-04-05 16:56:50 -04:00
Vincent St-Amour
16a75761b0 Make TR-generated identifiers have the same name as original identifiers.
Makes error messages nicer, and makes it easier to correlate with source code.
2013-04-04 15:31:51 -04:00
Vincent St-Amour
ff3d785da2 Use locations from typed identifiers for type-generated contracts. 2013-04-04 15:31:51 -04:00