Commit Graph

305 Commits

Author SHA1 Message Date
Kathy Gray
7758f508c5 Addition of define-wish to the teaching languages and corresponding addition of support for wishes in test reports and check-expects 2011-02-21 12:46:39 +00:00
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
Matthew Flatt
655f6045a2 fix shared' for #:auto' fields and constructors without `make-'
Closes PR 11588
 Closes PR 11591
2011-01-05 13:52:11 -07:00
Robby Findler
6fe8643194 adjust teaching languages so that print works properly 2010-12-27 09:16:09 -06:00
Mike Sperber
d5c58d9f82 Extends =~ to complex numbers
This is a (variation of a) fix from David van Horn.

Closes PR 11547.
2010-12-26 09:03:10 +01: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
fa854f62fc Add vector signatures, and `vector-of' to the HtDP signature syntax. 2010-12-19 11:20:51 +01:00
Mike Sperber
6bee489091 Add menu item to disable signature checking. 2010-12-14 17:29:30 +01:00
Mike Sperber
dbd1cfaf10 Don't use teach-equal?' for one-of' signature.
I did this under the mistaken assumption `equal?' would not work for
cycles, I think.
2010-11-26 11:10:29 +01:00
Mike Sperber
99e66e0dea Fix cycle detection in `tequal?'.
... and thus in `check-within', by using an eq? hash table.  Also,
while we're at it, add cycle detection to `tech-equal?'.

Fixes PR #11423.
2010-11-17 17:15:31 +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
Vincent St-Amour
c7d67f9bab *SL: first and rest should not report errors in terms of car and cdr. 2010-11-09 21:16:17 -05: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
Matthew Flatt
9f959f247e fix quotability annotation on HtDP-language structs
Merge to 5.0.2
2010-10-17 19:32:17 -07:00
Mike Sperber
39541c51b5 Add `tech-equal?'.
This refuses to work on inexact numbers and procedures.  Use it in
`check-expect' & friends.
2010-10-15 15:26:24 +02: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
Matthias Felleisen
852aaed2ea removed signatures for now 2010-10-13 12:49:26 -04:00
Matthias Felleisen
df62ca47e9 added 'function', Closes PR 11283 2010-10-13 10:31:00 -04:00
Mike Sperber
f3191ff4d6 Define `any' signature differently.
... to actually enable the subtyping check.  Also, make named
signatures work for signature variables.
2010-10-13 09:41:10 +02:00
Mike Sperber
eebe5b2e2b 2nd attempt at generators for records/structs.
This time, with feeling.
2010-10-11 13:34:16 +02:00
Mike Sperber
f706b0d7a7 Revert "Create arbitraties off parametric struct/record signature constructors."
This reverts commit 7df9a22a67.

It was broken in several ways.  New attempt later.
2010-10-09 17:48:58 +02: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
4ec7cb1d88 Unbreak coverage for *SL `define-struct'. 2010-10-08 19:56:51 +02:00
Mike Sperber
7df9a22a67 Create arbitraties off parametric struct/record signature constructors.
This enables QuickCheck value generations for structs/records.
2010-10-08 17:21:07 +02:00
Mike Sperber
219c91d8e7 Check parametric struct/record signatures eagerly. 2010-10-08 17:01:47 +02: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
3e205b6193 Better error message for certain bogus signatures. 2010-10-08 13:55:42 +02:00
Mike Sperber
7572b24870 Unbreak stepper.
(It was broken by fed1e3dc3e2d7268c0297a0ce699d3deb2ba75c5.)
2010-10-08 13:41:44 +02:00
Mike Sperber
38cf78e213 Allow specifying arbitary expressions in a signature declaration.
Fixes PR 11282
2010-10-08 13:12:18 +02:00
Mike Sperber
1e44fc8e43 More "contract" -> "signature" identifier renaming. 2010-10-08 11:51:33 +02:00
Mike Sperber
91590040dc Ignore duplicate signature declarations. 2010-10-08 11:50:17 +02:00
Mike Sperber
87da2f35b9 Provide English and German versions of deinprogramm/signature/signature. 2010-10-08 11:19:38 +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
Matthias Felleisen
725da3b2ed fix string-ith problem, Closes PR 11261 2010-09-28 18:07:10 -04:00
Robby Findler
feddcdaef9 closes PR 11241 2010-09-23 06:25:21 -05:00
Mike Sperber
65bd667be2 Make parametric signatures work in BSL. 2010-09-22 11:35:00 +02:00
Mike Sperber
7304c061e3 Add `cons-of' signature constructor to HtDP languages. 2010-09-22 11:31:24 +02:00
Mike Sperber
593f8588fe Implement lazy signature checking for ordinary pairs. 2010-09-22 11:03:01 +02:00
Mike Sperber
98c9ad4d22 Add `Any' contract to HtDP languages. 2010-09-21 16:23:58 +02:00
Mike Sperber
333d82e6df Fix some error messages for invalid : signature declarations. 2010-09-17 18:02:33 +02:00
Mike Sperber
8bc95ace01 Unbreak signatures for BSL. 2010-09-17 18:02:33 +02:00