Commit Graph

11 Commits

Author SHA1 Message Date
Matthew Flatt
90455e2d6a add tests for examples 2015-12-13 09:09:33 -07:00
Matthew Flatt
50f835c4f1 add scribble/examples
The `scribble/examples` library provides a cleaner and more modern
interface for evaluation compared to `scribble/eval`.
2015-12-11 11:54:07 -07:00
Matthew Flatt
f1f47c5f16 scribble/examples: revert logging change, add options
The error-logging change in 81aeab1687 didn't work well for me
in further experiments. Change `interactions`, etc., to have a
`#:no-errors?` argument, instead. Also, add `eval:no-prompt`,
which provides an alternative to `def+int`.

Improve the documentaiton by correcting mistakes and filling
in some missing exports.
2015-12-11 10:03:31 -07:00
Matthew Flatt
0bd9a0d070 examples: add "Examples:" label as compound para
Instead of creating a table to combine "Examples:" with the exmaple
content, use a compound paragraph (which didn't exist when `examples`
was first implemented). A compound paragraph provides better and more
consistent typesetting; for example, it doesn't make the word
"Examples:" use a fixed-width font in HTML output.
2015-12-10 09:24:34 -07:00
Matthew Flatt
81aeab1687 scribble/eval: add eval:error and logging of other exceptions
When an expression in `examples` or `interactions` raises an
exception, the error message is rendered as part of the documentation.
Now, however, unless the expression is wrapped with `eval:error`, an
error is also logged.

Logging an error is a compromise between backward compatibility (for
documents that rely on undeclared but expected errors) and making a
document fail completely (which would be nicer when an error is not
expected).
2015-12-10 08:33:00 -07:00
Matthew Flatt
f637b94a61 evaluate expression only once for eval:check 2015-12-10 08:06:41 -07:00
Matthew Flatt
a2f430020a scribble/eval: strip away code:contracts
Make `code:contract` handled like `code:comment` for evaluation.

Relevant to PR 15161
2015-10-02 15:24:08 -06:00
Alexis King
f33e8c0746 Fix eval:check in interaction to properly validate its arguments 2015-08-25 17:14:34 -05:00
Vincent St-Amour
1a6f1b593e Remove dependency on unstable/struct. 2015-08-19 14:18:53 -05:00
Vincent St-Amour
ea70707036 Merge unstable/sandbox with scribble/eval. 2015-07-23 15:04:44 -05:00
Sam Tobin-Hochstadt
a316fc12c0 Remove extra directories. 2014-12-02 00:54:52 -05:00