Commit Graph

297 Commits

Author SHA1 Message Date
Asumu Takikawa
a18bf85b4f Only generate poly contracts for functions
Closes PR 13815
(cherry picked from commit bafaf52056)
2013-07-08 10:34:12 -04:00
Asumu Takikawa
90b149dc46 Fix union merging
Trying to merge (and thus resolve) applications of struct
types would cause infinite looping on type instantiation
if the struct type used both a union and recursion.

Closes PR 13821
(cherry picked from commit c8e281a80e)
2013-07-08 10:34:12 -04:00
Vincent St-Amour
a45716f16e Fix type of gensym.
(cherry picked from commit c070aaecda)
2013-07-08 10:34:12 -04:00
Vincent St-Amour
fe96ba1516 Fix unsound unary fixnum subtraction optimization.
Closes PR13826.
(cherry picked from commit 93d4a5d426)
2013-07-08 10:34:12 -04:00
Vincent St-Amour
4e360f8bc3 Fix unsound fxquotient optimization.
Closes PR13827.
(cherry picked from commit 5e30416110)
2013-07-08 10:34:12 -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
Vincent St-Amour
c1dd497ba2 Don't splice in vector creation when optimizing vector-length.
Closes PR13788.
(cherry picked from commit d9264525bd)
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
Asumu Takikawa
c2f5b31e96 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.
(cherry picked from commit 34aeaee672)
2013-07-08 10:34:10 -04:00
Asumu Takikawa
664a370a1b 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.
(cherry picked from commit 19c5d3eaad)
2013-07-08 10:34:10 -04:00
Asumu Takikawa
6e94295c96 Add a #:verbose option to :type.
This prints the old way, expanding all aliases inside the type.
(cherry picked from commit 1f5b262f6d)
2013-07-08 10:34:10 -04:00
Asumu Takikawa
b35e0fd138 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.
(cherry picked from commit fd33584b6f)
2013-07-08 10:34:10 -04:00
Asumu Takikawa
691c156777 Fix parsing of (Struct ...) types.
This was a regression that appeared in 5.3.1
(cherry picked from commit 3eb4a75613)
2013-07-08 10:34:10 -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
fc8f39f7aa Make require/typed work at top-level
Closes PR 13747
(cherry picked from commit 67beb11cf6)
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
Vincent St-Amour
9c97902361 Fix type of sinh.
Found using random testing.
(cherry picked from commit 5de08f06b4)
2013-07-08 10:34:09 -04:00
Vincent St-Amour
bc34a73cd6 Fix type of tanh.
Found using random testing.
(cherry picked from commit 89f9b860cd)
2013-07-08 10:34:08 -04:00
Asumu Takikawa
f38129c741 Clean up struct: and disallow unsupported options
Related to PR 13562
(cherry picked from commit c3b80bee41)
2013-07-08 10:34:08 -04:00
Eric Dobson
a901650bab Fix contract generation for mutable structures.
(cherry picked from commit de96643fbe)
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
Vincent St-Amour
b89aedb992 Allow read-only hash operations to accept HashTop.
Closes PR13710.
(cherry picked from commit e6ff57f3bd)
2013-07-08 10:34:07 -04:00
Eric Dobson
8d78a2a152 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.
(cherry picked from commit b5b13222c8)
2013-07-08 10:34:07 -04:00
Eric Dobson
67590cade8 Allow requiring functions with filters in contravariant positions.
(cherry picked from commit dbcb1414da)
2013-07-08 10:34:07 -04:00
Eric Dobson
52f892a5fd Fix subtyping of (ListDots t 'a) <: (Listof t).
Closes PR 13636.
(cherry picked from commit 6898a7c880)
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
Eric Dobson
eff170b33e Correctly protect Procedures in TR.
Closes PR 13664.
(cherry picked from commit fc36c12ce4)
2013-07-08 10:34:06 -04:00
Sam Tobin-Hochstadt
3590b9681e Add #:omit-define-syntaxes to define-type.
(cherry picked from commit ecf02a32b4)
2013-07-08 10:34:06 -04:00
Eric Dobson
5f34da6692 Terminate typechecking on cyclic lists.
Closes PR 13687.
(cherry picked from commit b8ab1334d9)
2013-07-08 10:34:06 -04:00
Stephen Chang
bfbba3f0bf fix typed racket named let: error when there are no binding types
closes PR 13691

include in release
(cherry picked from commit b3ba324a92)
2013-04-16 10:49:17 -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
459c731bb9 Have Optimization Coach report unsound float division missed optimizations. 2013-04-04 15:31:50 -04:00
Eric Dobson
94861becd0 Fix untested contract generation code.
Closes PR 13449.
2013-04-04 08:29:15 -07: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
17b9ed0a75 Fix prefix-of.
Closes PR 13448.
2013-04-04 07:42:45 -07:00
Vincent St-Amour
d00a579c5a Document not yet fixed optimizer bugs found using random testing. 2013-04-04 10:05:53 -04:00
Vincent St-Amour
a50d9bad7e Avoid unsound optimization for complex division.
Found using random testing.
2013-04-04 10:05:53 -04:00
Eli Barzilay
8ffd887847 Test for being able to customize struct printouts. 2013-04-03 18:10:22 -04:00
Eric Dobson
04ef9db1b3 Turn dynamic-requires into lazy-requires in TR.
Closes PR 13621.
2013-04-03 09:49:40 -07:00
Eric Dobson
0e0f1cd670 Adds subtyping for filters, and fixes -FS to be more precise.
Closes PR 12817.
2013-04-03 09:25:28 -07:00
Vincent St-Amour
ffc90239d0 Fix test for new complex division. 2013-04-02 17:32:29 -04:00
Vincent St-Amour
b808d2809e Fix optimization on exp of complex numbers.
Found using random testing.
2013-04-02 16:29:11 -04: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
Vincent St-Amour
70a8b79d0e Re-enable testing of hyperbolic trigonometry functions. 2013-04-01 14:44:31 -04:00
Vincent St-Amour
990fa87a2e Add random testing for complexes.
Fix a bug it found.
2013-04-01 14:44:31 -04:00
Vincent St-Amour
ca2e6bd769 Sometimes generate random integers. 2013-04-01 14:44:31 -04:00
Vincent St-Amour
3e9595e910 Factor out grammar to generate well-typed terms with higher probability.
Allows us to test integer-specific functions.
2013-04-01 14:44:31 -04:00