Commit Graph

154 Commits

Author SHA1 Message Date
Eric Dobson
8b1c643bca Consolidate the rest of the syntax properties in TR.
(cherry picked from commit 4310f04eaf)
2013-07-08 10:34:13 -04:00
Eric Dobson
7383a685e3 Centralized typechecker:ignore properties.
(cherry picked from commit a325e38046)
2013-07-08 10:34:13 -04:00
Eric Dobson
a945181907 Centralize the definition of the plambda syntax property.
(cherry picked from commit df07151cb9)
2013-07-08 10:34:13 -04:00
Eric Dobson
d04ee6125a Make for loops in TR use an annotation when applicable.
(cherry picked from commit f6050d5587)
2013-07-08 10:34:12 -04:00
Eric Dobson
0503bcd7c6 Move tc-literal to seperate file, as it doesn't belong in tc-expr.
(cherry picked from commit adbc516edf)
2013-07-08 10:34:11 -04:00
Sam Tobin-Hochstadt
d5f288e0c2 Register scoped type variables for internal def. annotations.
Closes PR 13793.
(cherry picked from commit 499bcefa1d)
2013-07-08 10:34:11 -04:00
Eric Dobson
4f0af0de72 Make scoped type vars work only for explict Alls and annotations.
Solves major issue disscussed on PR 13586.
Closes PR 13622.
Solves issue when typechecking lambdas with types like (All (a) Any).
Closes PR 13596.
Closes PR 13539.
Closes PR 13703.
(cherry picked from commit 01a88f8db1)
2013-07-08 10:34:11 -04:00
Eric Dobson
ef66cb0ca7 Massive cleanup of requriements in TR.
(cherry picked from commit f332affa5a)
2013-07-08 10:34:11 -04:00
Eric Dobson
bd6baada71 Clean up lam-result.
Make drest a list instead of a pair, replace an int-err with a match error
which has source location, and remove static name for rest argument in error
case.
(cherry picked from commit 4fcda73adf)
2013-07-08 10:34:11 -04:00
Eric Dobson
4bae399d78 Cleanup tc-lambda-unit.
(cherry picked from commit 2a94ca9030)
2013-07-08 10:34:11 -04:00
Asumu Takikawa
4ccb8bf185 Fix regression for (begin) and simplify
(cherry picked from commit 23d39a9968)
2013-07-08 10:34:10 -04:00
Asumu Takikawa
d3a949a266 Avoid doing the 2nd pass twice at the top-level
Thanks to Eric for pointing this out.
(cherry picked from commit d7f29d3636)
2013-07-08 10:34:09 -04:00
Asumu Takikawa
ca2dd29aa6 Fix tc-toplevel-form for ignored syntax
(cherry picked from commit 2c042998b9)
2013-07-08 10:34:09 -04:00
Asumu Takikawa
f59f57d444 Make define-type work at top-level
Closes PR 12913
(cherry picked from commit f3e6276f9b)
2013-07-08 10:34:09 -04:00
Asumu Takikawa
07fca0974d 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
(cherry picked from commit e53b0858c3)
2013-07-08 10:34:08 -04:00
Eric Dobson
64d66d3b9a Make structs initialize to constant instead of covariant.
(cherry picked from commit 7735aa5799)
2013-07-08 10:34:08 -04:00
Eric Dobson
aa025b9c56 Cleanup names-of-struct
(cherry picked from commit 154ab046fe)
2013-07-08 10:34:08 -04:00
Eric Dobson
9411b01e3f Switch out? to from-typed? as it has the same meaning.
(cherry picked from commit 03e1ffda3e)
2013-07-08 10:34:07 -04:00
Eric Dobson
d426867956 Fix expected type when typechecking map
(cherry picked from commit 863ac05332)
2013-07-08 10:34:07 -04:00
Eric Dobson
5345c1f7d3 Don't let map introduce type variables.
Closes PR 13581.
(cherry picked from commit 67dd956b6a)
2013-07-08 10:34:07 -04:00
Eric Dobson
e2f724fcd3 Use information of application site, to reduce possible arities.
Closes PR12905.
(cherry picked from commit 55aba088de)
2013-07-08 10:34:07 -04:00
Eric Dobson
15b1fa5486 Small TR fixes.
(cherry picked from commit a94c449ff1)
2013-07-08 10:34:07 -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
Eric Dobson
76de4d3cca Fix tc-apply to correctly generate expected ValueDots filters.
Closes PR 13649.
2013-04-04 07:45:15 -07:00
Eric Dobson
2b8efd6676 Fix contracts in TR. 2013-04-04 07:43:08 -07:00
Eric Dobson
3d49087ea3 Fix parsing of dotted rest when there is an expected type.
Closes PR 13646.
2013-04-01 22:17:32 -07:00
Eric Dobson
0e42a791a7 Typecheck (lambda args body) as (arg1 -> result). 2013-03-23 13:18:05 -07:00
Eric Dobson
714f667cf1 Add more hacky things to make with-handlers typecheck.
Closes PR12644.
2013-03-13 22:29:41 -07:00
Eric Dobson
6105ce8b20 Check actual args when form looks like for/list. 2013-03-13 21:45:03 -07:00
Eric Dobson
17cb4fd8d0 Make vector-set! type correctly on complicated inputs.
Closes PR13532.
2013-03-11 21:52:11 -07:00
Eric Dobson
1334e8dcc7 Reduce usage of check-below.
This pushes almost all uses of check below into tc-expr and
tc-expr/check. This means that the optimizer sees more precise types
and can make more optimizations.
2013-03-08 09:00:58 -08:00
Eric Dobson
1fd21ef640 Avoid TR internal error, by checking shape of args. 2013-03-08 09:00:10 -08:00
Eric Dobson
df581c3e4f Remove unused argument to tc/rec-lambda/check. 2013-03-08 08:59:57 -08:00
Eric Dobson
d59a600be6 Make kw/opt lambda special checks work with other expected values.
Closes PR13544.
2013-03-06 08:48:14 -08:00
Eric Dobson
9f01d26f98 Cleanup kw/opt lambda annotations. 2013-03-06 08:48:14 -08:00
Eric Dobson
22ef10c544 Fix heterogeneous vector typechecking. 2013-03-04 09:36:56 -08:00
Asumu Takikawa
ef08cc41e7 Enable contract and add a purpose statement 2013-02-26 17:38:05 -05:00
Vincent St-Amour
034d7245a4 Filters for comparisons with inifinity. 2013-02-21 10:49:57 -05:00
Eric Dobson
3c31803c19 Add a simple-Union and Bottom, and have code use them.
Requires splitting out the match expanders from base-abbrev.
2013-02-14 18:24:52 -05:00
Eric Dobson
b4beabc977 Make tc-let do unions correctly. 2013-02-14 18:24:52 -05:00
Vincent St-Amour
568f401bdc Don't special case typechecking of =.
Its type is more useful than the special typing rule.
2013-02-04 14:32:44 -05:00
Eric Dobson
3c02bb1abb Type check with expected type when checking recursive loops.
Closes PR12678.
2013-01-28 16:03:01 -05:00
Sam Tobin-Hochstadt
e75e494e6a Fix contracts and expected computation for tc-any-results. 2013-01-24 23:15:06 -05:00
Eric Dobson
a2f33f17e9 Remove tc-results? and other minor improvements. 2013-01-23 18:15:21 -05:00
Eric Dobson
5a43a5c730 Made tc/exprs check its non final terms with the correct type.
Closes PR12974.
2013-01-23 16:41:09 -05:00
Eric Dobson
05e53a0de5 Add tc-any-results as new result-type. 2013-01-23 16:41:09 -05:00
Eric Dobson
aac25b42c9 Make AnyValues but don't actually start using it yet. 2013-01-23 16:41:09 -05:00
Eric Dobson
5fe004cd9b Make TR compile with contracts enabled again. 2013-01-15 12:36:42 -05:00
Eric Dobson
f315880b50 Replace uses of Type? with Type/c?. 2013-01-15 12:23:42 -05:00