Commit Graph

31 Commits

Author SHA1 Message Date
Robby Findler
87e637a1cc - adjust the teaching language test coverage style implementation
so that it changes immediately when the black-on-white and
  white-on-black buttons are pushed in the preferences dialog

- expanded the color preferences api a little
  to allow the specification of background colors
  in addition to the foreground/style information
  already there

- changed the test coverage style so that the colors are
  settable in the preferences dialog

  closes PR 11704
2011-02-17 12:27:00 -06:00
Robby Findler
7af41fddc3 We no longer need to avoid IO or worry about exceptions, so drop the with-handlers.
Revert "This is a change to paper over a bug elsewhere in the system that threatens the release."

This reverts commit 25adab8cbb.
2011-02-15 19:05:21 -06:00
Robby Findler
25adab8cbb This is a change to paper over a bug elsewhere in the system that threatens the release.
Specifically, when there is an error in the namespace require (say if one of the teachpack
files gets corrupted (because you use a script that monkeys around in the installation, say,
and things go wrong)) then the first-opened method does not return normally, but raises
an exception. This, so far, is not a problem, but it appears that there is a bug in the
implementation of the drracket repl io ports that causes them to deadlock when flushing
the error port under certain conditions (I'm not sure what is really going on with this bug,
but I am observing a call to flush that fails to return) and the error-display-handler
for the teaching languages flushes the output port.

This change just avoids printing the error and so the error display handler is not called
in the fragile state. This change goes back to exactly what was happening in 5.0.2,
at least as far as the teaching language's first-opened method is concerned.

So, if this seems okay, I'd like to suggest it be included in the release.
2011-02-14 10:36:09 -06:00
Robby Findler
6fe8643194 adjust teaching languages so that print works properly 2010-12-27 09:16:09 -06:00
Robby Findler
9c12f7aaa5 fix dumb edito I did last week or so 2010-12-24 19:12:55 -06:00
Robby Findler
bf53fd5c38 adjust the auto-text behavior of DrRacket so that it doesn't require the
queue-callback / execute callback dance; also, change the behavior
  a little bit so that it works a little bit more like the rest of the
  DrRacket languages; in particular, the initialization of the REPL
  now only happens when a window is first opened or a new tab is first
  created, but not at other times (ie not when the language changes;
  when the language changes, we just keep the REPL state the same and
  show a warning like before)

This change also required a change to the way the repl is initialized
and a slight change to the behavior of the first-opened method. Specifically,
it is now called in a slightly better context so that errors that
happen look like errors in the user's program. The only other use of
the first-opened method in the tree was to initialize the teachpacks
in the teaching languages and this new behavior is also an improvement
there.
2010-12-20 08:43:34 -06:00
Mike Sperber
6bee489091 Add menu item to disable signature checking. 2010-12-14 17:29:30 +01:00
Mike Sperber
69b858a7f5 Unbreak printing in DMdA.
Fix the the name by which the HtDP and DMdA languages refer to the
signatures module, making sure everybody sees the same properties.
2010-11-10 07:32:52 +01:00
Robby Findler
22ce241d4d no #%plain-app because test is not a function... 2010-10-22 06:45:56 -05:00
Robby Findler
c34bd6c28d fix the metadata parsing to be more robust so drracket does not crash when opening a corrupt htdp teaching language file
closes PR 11332
2010-10-22 06:45:56 -05:00
Robby Findler
ae37e186e7 use #%plain-app to avoid possible problems with code injected into the teaching languages 2010-10-19 07:07:08 -05:00
Robby Findler
8032705cf9 The call to display-results depends on the value of the current-namespace
parameter. Specifically, it is expected to be a namespace that has the GUI
bindings available. Unfortunately, during the dynamic extent of the
uncaught-exception-handler when a syntax error is raised, this may not be
the case because you get a phase 1 namespace, not a phase 0 one.

So, move the call to display-results to the code that runs the student language
programs and out of the uncaught exception handler.
2010-10-13 15:55:16 -05:00
Robby Findler
2de8b978ba move read-accept-lang parameter setting to the right place 2010-10-13 15:55:16 -05:00
Matthew Flatt
6ac33a62be set `read-accept-lang' to #t by default, plus related adjustments
including adding some uses of `with-module-read-parameterization'
 so that `read-accept-lang' is set right anyway; still, so many
 many places just set `read-accept-reader' to #t that making
 `read-accept-lang' #f by default looks like too big of an
 incompatibility
2010-10-08 19:01:33 -06:00
Mike Sperber
9b1188c77a Re-instate Robby's hack to display test results off REPL errors.
... and generalize it so there's an action before (clearing the old
tests out) in addition to after (displaying the test results).

Also, do for DMdA as for HtDP.
2010-10-08 15:25:44 +02:00
Mike Sperber
b98b83b672 Make uncaught exceptions in teaching languages pop up test-engine display.
... so as to catch any test-case failures or signature violations that
may have occurred.
2010-10-08 10:25:37 +02:00
Mike Sperber
6997b08fa2 Remove front-end/interaction hack for test-engine.
It's not needed anymore after Robby's fix to namespace handling in the
teaching languages.
2010-10-08 09:28:07 +02:00
Robby Findler
fed1e3dc3e adjusted the way the teaching languages work so that signature
violations in the REPL are tracked.
2010-10-07 14:27:56 -05:00
Eli Barzilay
2189957b6f Change the errortrace protocol for `initialize-test-coverage-point' and
`test-covered' to use just the expression -- looks like there's no
reason to use an additional key.

Also, change its uses to map each syntax to an mcons where its mcar is
used to track coverage.  This is done everywhere, since it turns out to
be much faster to insert a `set-mcar!' with a 3d mpair, rather than a
call to a thunk.

Note that it still uses mpairs as a hack.  It "works" in the same way
that this simplified example does:

  (define-syntax m
    (let ([b (mcons 0 0)])
      (lambda (stx)
        (with-syntax ([b b])
          #'(case-lambda [() (mcar b)]
                         [(x) (set-mcar! b x)])))))

I think that it's fragile, and likely to stop working at some point, but
I don't see anything better for now.
2010-10-04 17:24:22 -04:00
Robby Findler
feddcdaef9 closes PR 11241 2010-09-23 06:25:21 -05:00
Robby Findler
4bbb1f4cd9 Added a second column for the 2htdp teachpacks to the choose-a-teachpack dialog
closes PR 11170
2010-09-07 17:34:08 -05:00
Robby Findler
5e04a5c6d9 When opening a new window where the language is one of the htdp languages (via the
language dialog, not the #lang htdp/* variants), teachpacks are put into the
initial REPL (instead of just having the language primitives).

closes PR 11160
2010-09-04 19:37:02 -05:00
Robby Findler
7020cb6e4c adjusted the language dialog so that the output-style and fraction-style radio boxes aren't adjacent 2010-08-29 08:20:53 -05:00
Mike Sperber
faf8ec358f Rename DMdA/HtDP "contract" to "signature". 2010-06-28 14:58:16 +02:00
Mike Sperber
8d39c15b17 Make contracts available in HtDP languages.
Known breakage: when blame is assigned to a procedure defined via
(define (f ...) ...), its source position isn't reported because its
lambda expression is generated.
2010-05-21 19:30:37 +02:00
Mike Sperber
8590e8cadf Merge deinprogramm contract test-engine into the regular one.
This adds support for contracts.
2010-05-20 15:31:45 +02:00
Eli Barzilay
de0cc7771b A lot of "DrScheme" -> "DrRacket"s. 2010-05-17 01:27:03 -04:00
Matthew Flatt
b26bf5e225 fix DrRacket printing styles and distinguish 'print' vs. 'write' 2010-05-08 10:18:50 -06:00
Robby Findler
f46ad89200 fixed a preference setting 2010-04-29 11:06:27 -05:00
Matthew Flatt
32de6647dc fix HtDP language printing 2010-04-28 08:55:16 -06:00
Matthew Flatt
28b4043077 rename all files .ss -> .rkt 2010-04-27 16:50:15 -06:00