Commit Graph

720 Commits

Author SHA1 Message Date
Eric Dobson
4310f04eaf Consolidate the rest of the syntax properties in TR. 2013-05-28 20:22:55 -07:00
Eric Dobson
a325e38046 Centralized typechecker:ignore properties. 2013-05-28 20:21:58 -07:00
Eric Dobson
df07151cb9 Centralize the definition of the plambda syntax property. 2013-05-28 20:21:57 -07:00
Eric Dobson
84d3051fee Make resolve actually do all the necessary resolutions. 2013-05-28 20:21:31 -07:00
Sam Tobin-Hochstadt
499bcefa1d Register scoped type variables for internal def. annotations.
Closes PR 13793.
2013-05-28 18:03:41 -04:00
Sam Tobin-Hochstadt
64df4cef13 Use submodules instead of marking tricks for identifiers in docs. 2013-05-28 17:28:42 -04:00
Vincent St-Amour
d9264525bd Don't splice in vector creation when optimizing vector-length.
Closes PR13788.
2013-05-28 11:57:00 -04:00
Asumu Takikawa
e6503c5df6 Fix broken internal error 2013-05-27 11:34:43 -04:00
Eric Dobson
b9b1eb14ba Minor whitespace fix. 2013-05-25 18:09:47 -07:00
Eric Dobson
01a88f8db1 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.
2013-05-25 13:01:02 -07:00
Asumu Takikawa
a40a1341f6 Document :type better 2013-05-22 09:31:37 -04:00
Asumu Takikawa
34aeaee672 Expend printing fuel in all branches
This makes (:type (Number -> Integer)) produce
(Number -> Integer) instead of expanding at the first name.
Combined with expansion cues, this makes it easier for users
to expand the relevant parts of types.
2013-05-21 11:19:49 -04:00
Asumu Takikawa
19c5d3eaad Cue user about unexpanded type aliases
This tells the user that more type aliases are
available for expansion. For example, (Listof Number)
has the alias Number still unexpanded into the union
that it represents.
2013-05-21 11:19:02 -04:00
Asumu Takikawa
1f5b262f6d Add a #:verbose option to :type.
This prints the old way, expanding all aliases inside the type.
2013-05-20 16:14:23 -04:00
Asumu Takikawa
fd33584b6f Cut off type printing with :type at one level
Makes types print nicer with :type in most cases.
Previously, the printer expanded type aliases as much
as possible. Now, it defaults to a single level of expansion.
A later commit adds a #:verbose option to show the entire
type.
2013-05-20 16:14:14 -04:00
Asumu Takikawa
3eb4a75613 Fix parsing of (Struct ...) types.
This was a regression that appeared in 5.3.1
2013-05-19 20:32:32 -04:00
Asumu Takikawa
23d39a9968 Fix regression for (begin) and simplify 2013-05-17 00:33:10 -04:00
Asumu Takikawa
d7f29d3636 Avoid doing the 2nd pass twice at the top-level
Thanks to Eric for pointing this out.
2013-05-17 00:02:06 -04:00
Eric Dobson
f332affa5a Massive cleanup of requriements in TR. 2013-05-15 23:18:29 -07:00
Eric Dobson
4fcda73adf 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.
2013-05-15 21:12:54 -07:00
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