Commit Graph

33437 Commits

Author SHA1 Message Date
Matthew Flatt
22f90ce8fe pkg/lib: add #:package-exn-handler to pkg-catalog-archive 2014-06-30 09:18:38 +01:00
Matthew Flatt
646b836183 racket/draw: fix bad rounding of paper sizes in points 2014-06-30 07:32:23 +01:00
Eric Dobson
393d7d49fc Replace procedure-rename with eta-expansion.
Closes PR 14612.
2014-06-29 23:25:05 -07:00
Eric Dobson
72d1128604 Make TR contract generation not wrap everything in recursive contract.
Eta expand struct predicates, as this was the reason for recursive
contracts in the first place.

Closes PR 14611.
2014-06-29 23:24:34 -07:00
Eric Dobson
decc3c6376 Add tests for generated syntax of static contracts. 2014-06-29 16:01:33 -07:00
Eric Dobson
b10cb6d089 Change make-predicate/define-predicate to use flat-contract-predicate.
Closes PR 14610.
2014-06-29 16:01:33 -07:00
Jens Axel Søgaard
6ecbf2c542 Improve speed of partitions 2014-06-29 23:38:46 +02:00
Vincent St-Amour
13f1565f4d Have TR log regexp operations that use non-regexp patterns.
For consumption by Optimization Coach.
2014-06-29 14:41:23 -04:00
Matthew Flatt
05760a12f6 scribble: use 'pdf-bytes+bounds8, etc.
Use 'pdf-bytes+bounds8, 'png-bytes+bounds8, etc. to convert images
for Latex/PDF and HTML output. The new conversions particularly
help with picts that draw text, since the baseline of the text
can be handled properly in HTML output.

The new conversion also helps hide the difference between a bounding
box and the "inked" area of a pict, since picts normally ink only
slightly outside the bounding box, and the default for pict conversion
pads the image with a few pixels/units in each direction.

Also, add a `++convert <fmt>` command-line option to select a
preferred target for image conversions. (This preference can be
overridden by the existing `render-convertible-as` style property
for HTML rendering.)
2014-06-27 17:35:42 +01:00
Matthew Flatt
c4a58dc4a5 pict: implement 'pdf-bytes+bounds8, etc. conversions
Also, add a `convert-bounds-padding` parameter that defaults to adding
3 units (= pixels, usually) on each side of a pict when converting
to a format that supports padding.

Combined with changes to Scribble to use the new formatting, the
extra padding solves the long-standing problem of rendering picts
and having an edge (especially the bottom and right) cut off due
to rounding effects. For example, see `file-icon` in section 7.1 of
the `pict` documentation.

The choice of 3 pixels is more or less arbitrary; it covers the
case of edge pixels and italic fonts for typical font sizes, but
it obviously won't cover all drawing outside of a bounding box,
as for the documentation example `(desktop-machine 1 '(devil plt))`.
2014-06-27 17:35:15 +01:00
Matthew Flatt
37af1c8ef0 file/convertible: add 'pfd-bytes+bounds8 and many more
The 'pfd-bytes+bounds8 format can add extra padding around the image,
and the result reports the amount of added padding. This padding can
be used to include image output that it outside of the conceptual
bounding box, such as an italic glyph that extends beyond its
character's width.
2014-06-27 17:35:15 +01:00
Matthew Flatt
970b040d17 racket/draw: fix bounding box in post-script-dc% EPS output
Write the requested size instead of the actual bounding box
of the drawn image.
2014-06-27 17:35:15 +01:00
Robby Findler
6af3e1568e update the unix tests based on drdr's results, related to ac169edfcf 2014-06-27 09:49:21 -05:00
Robby Findler
62d2514ce2 fix default argument to #:convert-as-ps-not-pdf? 2014-06-27 07:55:01 -05:00
Robby Findler
a2019476a4 add note about --dvipdf to redex docs 2014-06-27 06:45:40 -05:00
Robby Findler
5280395f88 add the --dvipdf flag to scribble
This adds a new back-end pipeline for generating pdf to
scribble, with the hope that included picts (e.g., those
generated by Redex) will look better when viewed with
on-screen pdf viewers

Current problem: the descent adjustment is messed up,
as can be seen by this example program's output:

 #lang scribble/base
@(require redex/pict
          pict
          redex/reduction-semantics)
@title{}
@(define-language L
   (e ::= (e e) x (λ (x) e)))
@(render-language L)

ff@(text "f" '(italic . roman) 20)ff

x@(text "x")y@(text "y")
2014-06-27 03:29:50 -05:00
Robby Findler
6dc0c40e24 support eps-bytes+bounds for picts 2014-06-27 03:29:50 -05:00
Robby Findler
0179c9a9a5 document possibility of 'eps-bytes+bounds for file/convertible 2014-06-27 03:29:50 -05:00
Matthew Flatt
356196d62b racket/port: fix problem with reencode-input-port
For the case that a larger buffer is needed than provided for
a read, decoding should make progress as long as some bytes are
converted.

Closes PR 14607
2014-06-27 07:51:07 +01:00
Asumu Takikawa
2edb73bff8 Fix TR test regexp 2014-06-27 02:47:17 -04:00
Asumu Takikawa
0b3b1f5d94 Fix for/fold typechecking on null accumulator
Closes PR 13259
2014-06-27 00:08:28 -04:00
Robby Findler
7f8cf7a2ce Add test case from Matthew for ac169edfcf 2014-06-26 20:37:39 -05:00
Asumu Takikawa
fb6f535669 Add types and tests for racket/format 2014-06-26 15:46:09 -04:00
Asumu Takikawa
f844cb8b92 Add support for typechecking contracted functions 2014-06-26 15:46:09 -04:00
Asumu Takikawa
6fe2745f55 Add syntax properties in contract expansion for TR
This establishes a communication channel between the
contract system and TR. TR normally can't track the
relationship between the identifier bound to the transformer
that produces the lifted value expression (which has the
type in the environment) and the lifted expression
itself.

This also adds properties that indicate which parts are
lifted expressions and if a function has an extra negative
party argument.

Finally, the expansion of keyword arguments is modified
slightly to propagate syntax properties on function argument
syntax to the let-bound identifiers that the keyword application
generates.
2014-06-26 15:46:08 -04:00
Eric Dobson
29bb045942 Initial internal Typed Racket documentation.
Still needs to be scribbled, and have lots more added.
2014-06-26 15:42:14 -04:00
Matthew Flatt
816b9a818f reference & guide: improve explanation of regexp performance
Explain better that regexp values can be used more efficiently
than strings or byte strings as patterns.

Adjust all examples to use regexp values instead of strings.
2014-06-26 17:59:40 +01:00
Matthew Flatt
58175254b9 reference: add "file date and time" index entry
Since `file-or-directory-modify-seconds` is not an obvious function name.
2014-06-26 16:08:27 +01:00
Matthew Flatt
3d637c047c scribble: add nosearchform to HTML output without a search box 2014-06-26 16:07:04 +01:00
Matthew Flatt
377ba62207 fix doc typo 2014-06-26 15:31:58 +01:00
Matthew Flatt
ac169edfcf redex: fix for render-language with extend-language-show-union as #t
Merging base languages didn't add non-terminals that are included only
in the extension.

Also, add `extend-language-show-extended-order` for showing productions in
the order of an extended language instead of the original language.
2014-06-26 13:06:42 +01:00
Matthew Flatt
31c35d8da2 add missing casts that are required by some C compilers 2014-06-26 13:06:42 +01:00
Asumu Takikawa
9a14c9c420 Fix error for application Procedure type values
Removal of top-arr in the internal representation changed
the error message and we didn't have a test for it.

Closes PR 14601
2014-06-26 01:35:32 -04:00
Eric Dobson
5339cbaac9 Make Unions of function typechecking work again. 2014-06-25 09:05:26 -07:00
Matthew Flatt
5cbe6cfdcb work around bug(?) in Mac OS X select()
Using select() to check whether a pipe is ready for writing seems to
fail on Mac OS X 10.8 and 10.9. See the PR for a small C program to
demonstrate. It's possible that the small program is broken and
there's no bug, but the program works on Linux and on Mac OS X 10.7
and 10.6.

Although poll() seems to work, switching completely to poll() is not a
good option on Mac OS X, since poll() does not support devices on that
platform.

The kqueue() facility seems to handle pipes and writing ok, so work
around the bug by enabling the use of kqueue() on pipes.

Closes PR 14596
2014-06-25 09:56:44 +01:00
Matthew Flatt
94a5c6e3fb add more debugging output for a JIT-buffer-overflow internal error
Show the content of the buffer and the content of the temporary buffer
used to predict the size; then, I should be able to track down the
source of a mismatch.
2014-06-25 07:46:39 +01:00
Eric Dobson
b6e96f0bf0 Make tc-lambda-unit have one centralized definition of how to extend the environment. 2014-06-24 22:39:09 -07:00
Eric Dobson
3c179e0217 Move logic of numbering rest/drest arg to abstract results. 2014-06-24 21:52:21 -07:00
Eric Dobson
db02f2198e Remove unused kw field in lam-result. 2014-06-24 21:52:21 -07:00
Eric Dobson
2f7cb68aea Fix infer dotted cases when there are constraints on the dbound.
Closes PR 14593.
2014-06-24 21:35:18 -07:00
Eric Dobson
8fb166d67f Make interning work on Rep-seq for Reps with complicated fields.
This gives ~3% improvement in new-metrics.rkt
2014-06-24 21:28:21 -07:00
Stephen Chang
500745f41b add typed/racket/async-channel 2014-06-24 18:16:14 -04:00
Gustavo Massaccesi
49ff6d3c84 optimizer: test use of virtual clock in branches
Test that the optimizer don't move some expressions inside if branches.
2014-06-24 17:47:43 +01:00
Matthew Flatt
f4be105ab6 inside: modernize overview to discourage extensions and embedding
The beginning of the "Inside" documentation was still geared toward
writing extensions or embedding Racket, which almost no one does any
more. Shuffle and change the beginning to orient it around the
foreign-function interface, instead.
2014-06-24 17:47:43 +01:00
Eric Dobson
5cf65e28fc Add equality operations for Reps.
This speeds up microbenchmarks by 50%, and new-metrics.rkt by 30%.
2014-06-24 08:19:06 -07:00
Matthew Flatt
d3e008af50 racket/tcp: use %E instead of %e for socket error reporting
Using "%E" is right for WinSock errors, instead of "%e".
2014-06-24 11:40:21 +01:00
Matthew Flatt
2134dbf952 scribble: 'border and '{left,right,top,bottom}-border properties for cells 2014-06-24 11:30:14 +01:00
Eric Dobson
fd3d01d822 Use (listof tc-result?) instead of tc-results? when inferring types.
tc-results? does not represent Bottom in a way that maintains the number
of values that generated the Bottom.
2014-06-23 21:49:53 -07:00
Eric Dobson
7701e8af51 Do not rebuild the environment made by check-non-recursive-clauses. 2014-06-23 21:46:03 -07:00
Eric Dobson
203311e993 Make with-lexical-env/extend-props not execute its body if its dead. 2014-06-23 21:46:02 -07:00