Commit Graph

32694 Commits

Author SHA1 Message Date
Asumu Takikawa
35ef2f90eb Accept polydots rest in TR lambda and define
Also accept type variables before formals in all cases
2014-02-19 16:40:40 -05:00
Asumu Takikawa
3d177e454e Enable mixed type annotations for define 2014-02-19 16:40:40 -05:00
Asumu Takikawa
967490cb22 Support polymorphism in both TR let and lambda 2014-02-19 16:40:40 -05:00
Asumu Takikawa
45d36579d3 Add :-less versions of struct macros 2014-02-19 16:40:40 -05:00
Asumu Takikawa
a941f95c2e Add a :-less do for TR 2014-02-19 16:40:40 -05:00
Asumu Takikawa
e6e3ab4e74 Make :-less versions of let variants in TR 2014-02-19 16:40:40 -05:00
Asumu Takikawa
a3d818c748 Add support for rest arguments in TR plain lambda
Two caveats:
  * in some positions : is not accepted as a formal
    when used in combination with * as a formal
  * the quality of parse error messages for rest
    argument types is traded for better optional argument
    error messages
2014-02-19 16:40:40 -05:00
Asumu Takikawa
ad4f6e1ea1 Better error messages for TR lambda parsing 2014-02-19 16:40:40 -05:00
Asumu Takikawa
aef37edae4 Incorporate PR feedback 2014-02-19 16:40:40 -05:00
Asumu Takikawa
eb7a0f8797 Improve type-checker for optional arg functions 2014-02-19 16:40:40 -05:00
Asumu Takikawa
7e09362986 Allow TR lambda to have a result type annotation 2014-02-19 16:40:39 -05:00
Asumu Takikawa
8ea32c68f6 Improve TR lambda to accommodate type annotations
The new `lambda` form allows all combinations of arguments
with optional type annotations for all cases.
2014-02-19 16:40:39 -05:00
Robby Findler
19ad9918ec add some tests and start a "known bugs" test suite for the contract system 2014-02-19 14:46:31 -06:00
Asumu Takikawa
26204cf505 Fix TR double cast bug
In some cases, TR tried to typecheck the contents of a quote-syntax
form that contains unexpanded syntax.

Closes PR 14355
2014-02-18 23:28:49 -05:00
chrdimo
23f02e4575 updating option contract tests 2014-02-18 21:57:25 -05:00
Asumu Takikawa
0c0befac07 Add typed/pict which exports part of pict
Does not cover all of the bindings yet, but it
should just be a SMOP after the last extra-env-lang
feature additions.
2014-02-18 18:43:57 -05:00
Asumu Takikawa
db51fdb8fd Improve TR's extra-env-lang
Instead of parsing the module's body like env-lang,
export a `type-environment` form instead. That way
the module may contain any auxiliary definitions
or expressions that are needed.

Additionally allow #:opaque and #:struct clauses
for opaque and struct types in the base type environment.

Update typed/syntax/stx for the new API.
2014-02-18 18:43:57 -05:00
Asumu Takikawa
d16572f003 Add missing child fields in pict
Closes PR 14358
2014-02-18 18:43:57 -05:00
Burke Fetscher
c47828601a redex: add enum to benchmark plotting
also filter -base files correctly in run-muts
2014-02-18 11:52:31 -06:00
Matthew Flatt
1d0e4bedde setup/unixstyle-install: fix up only installed ".desktop" files
Closes PR 14354
2014-02-18 06:48:55 -07:00
Vincent St-Amour
1d1d8bacad Swap remaining unsafe and chaperone-unsafe operation in the TR optimizer.
Fixes the fix in aba046a92d.
2014-02-17 18:41:18 -05:00
Burke Fetscher
3d282eba29 redex: fix some more benchmark paths 2014-02-17 16:30:12 -06:00
Matthias Felleisen
2d3c25bc16 world changes for bitmaps as images in universe 2014-02-17 17:24:42 -05:00
Matthias Felleisen
f944251099 tests for bitmaps as images in universe 2014-02-17 17:24:42 -05:00
Burke Fetscher
0010a8ebae add enum generation to stlc 2014-02-17 14:57:56 -06:00
Burke Fetscher
10de717cb4 use 'v' in the values non-terminal for cons pairs 2014-02-17 14:57:55 -06:00
Burke Fetscher
04c8aa7722 make path agnostic 2014-02-17 14:57:55 -06:00
Asumu Takikawa
18adcb5b04 Improve type inference for ListDots
This provides better inference for the case when trying
to infer a ListDots in a negative position against a List
type. For example, when trying to apply `time-apply`.
2014-02-16 11:35:55 -05:00
Matthew Flatt
5ada90bfd2 raco setup: fix the way that "stamp" is compiled for avoided files
Instead of claiing "beginning of time" and an empty SHA1, use
`file-stamp-in-paths` to get a proper stamp.

This fixes a problem when installing built packages into user scope
where the built packages refers to an installation-scope library
and SHA1s need to be checked to fix up file timestamps.
2014-02-15 14:45:14 -07:00
Matthew Flatt
7b4ea16bc0 setup/dirs: fix get-apps-dir
Affects the location of ".desktop" file installation, especially in
a Unix-style installation.
2014-02-15 09:38:25 -07:00
Matthew Flatt
576c3885cf fix typo in reference 2014-02-15 09:38:24 -07:00
Asumu Takikawa
bf47523ac9 Fix TR regression and use abstraction recipe
A function like (lambda (x) (lambda (y) y)) would cause TR
to fail in an internal metafunction. The fault was triggered
when the object y is abstracted to (0 0) and then the outer
lambda tries to abstract (0 0) and fails.

The problem was triggered by the new path index changes in
v6.0 because TR did not previously try to abstract objects
that occurs in the target type (now necessary for scope
lifting of path indices), which may contain non-identifier
objects.

This error didn't occur in another nearly identical (except
for one crucial identifier? check) code path, so this commit
also eliminates the duplication by abstracting.
2014-02-15 00:14:47 -05:00
Robby Findler
2e06761531 fix error message 2014-02-14 23:03:00 -06:00
Robby Findler
fff72a21ff clarify object=? 2014-02-14 23:03:00 -06:00
Robby Findler
73bbabe7d4 adjust error message for impersonate-struct to match its actual contract 2014-02-14 23:02:59 -06:00
Asumu Takikawa
d32e0eda7c Update TR doc pkg dependencies 2014-02-14 19:15:42 -05:00
Neil Toronto
30bf673a0f Fixed some problems with 2D plots not rendering due to +nan.0 and +inf.0
The "view" coordinate system for 2D plots used to be the same as the
"plot" coordinate system, except possibly stretched in a way that
preserved endpoints. When the endpoints were close to extreme flonum
values like +min.0 or +max.0, and the 2D plot area determined that
there were enough floating-point numbers within the plot bounds to do
fast floating-point arithmetic without losing visual fidelity, some of
that arithmetic could overflow. Then +inf.0 and +nan.0 values would
passed to `set-clipping-rect', which would promptly throw up, as it
should.

Solution: like the 3D plot area, use a normalized view coordinate
system. Now stretched plot coordinates are translated and scaled to
[0,1]x[0,1], for which floating-point arithmetic won't overflow.
2014-02-14 16:45:41 -07:00
Neil Toronto
b92b6c8337 Sanitized `density' bandwidth calculation for very dense data sets
Now, for example, (plot (density '(0))) works.

Calculated bandwidth is now bounded by both 1e-308, below which
`kde' produces nonsense, and 1e-14 * max absolute value. The latter
bound ensures the bandwidth is wide enough to make a smooth-looking
curve even in the presence of floating-point rounding in the domain,
by ensuring that at least 100 floating-point numbers or so in the
domain get nonzero density.

It's a little weird to use the gap between floating-point numbers
for this, but it ensures density estimates aren't jagged because
of rounding (at least until you zoom in, in some instances), and
it's at least a decent method of estimating bandwidth for single-
sample density estimators.
2014-02-14 16:45:41 -07:00
Neil Toronto
9a6cdf420b Updated types for density' and kde' 2014-02-14 16:45:41 -07:00
Neil Toronto
db05e20980 Added support for weighted samples in density' and kde'
Also improved window width estimate
2014-02-14 16:45:41 -07:00
Asumu Takikawa
6fd39d78d7 Add a top blurb to the TR Reference 2014-02-14 17:33:02 -05:00
Asumu Takikawa
a9b09f2910 Add a TR Guide section about ->* and optional args 2014-02-14 17:24:23 -05:00
Asumu Takikawa
1c5f6714a8 Use prefix -> in the TR Guide examples
Also some minor fixes like using the more common
case-> form rather than case-lambda.
2014-02-14 17:12:36 -05:00
Asumu Takikawa
f59a122841 Add diagrams from Vincent's PADL paper to TR docs 2014-02-14 16:38:31 -05:00
Burke Fetscher
de896c87bd move delim-cont tests into a separate file 2014-02-13 23:30:18 -06:00
Matthew Flatt
47d913b451 racket/draw: fix serializaiton of bitmap drawing in record-dc%
Closes PR 14349
2014-02-13 15:23:09 -07:00
Burke Fetscher
70f484ba77 add missing redex-examples dependencies 2014-02-13 12:34:29 -06:00
Asumu Takikawa
6ad1af3741 Reorganize documentation for -> form in TR
Put examples next to relevant prose, add more examples,
and add more cross-references.
2014-02-13 13:21:02 -05:00
Burke Fetscher
86bca7b6e7 remove unnecessary file 2014-02-13 12:08:24 -06:00
Burke Fetscher
309bb3ae74 remove missing require 2014-02-13 12:05:29 -06:00