-USING: help help.topics help.syntax help.crossref
-help.definitions io io.files kernel namespaces sequences
-parser vocabs vocabs.loader vocabs.loader.private accessors assocs ;
+USING: accessors assocs kernel namespaces sequences vocabs
+vocabs.loader vocabs.loader.private ;
IN: bootstrap.help
: load-help ( -- )
+ "help" require
+ "help.topics" require
+ "help.syntax" require
+ "help.crossref" require
+ "help.definitions" require
"help.lint" require
"help.vocabs" require
USING: accessors arrays assocs classes classes.struct
classes.tuple combinators combinators.short-circuit debugger
definitions effects eval formatting fry grouping help
-help.markup help.topics io io.streams.string kernel macros
+help.markup help.topics io io.streams.string kernel macros math
namespaces sequences sequences.deep sets splitting strings
-summary unicode.categories vocabs vocabs.loader words
-words.constant words.symbol ;
+summary tools.destructors unicode.categories vocabs
+vocabs.loader words words.constant words.symbol ;
FROM: sets => members ;
IN: help.lint.checks
SYMBOL: vocab-articles
: check-example ( element -- )
- ! [
+ [
'[
_ rest [
but-last "\n" join
"\n" ?tail drop
] keep
last assert=
- ] vocabs-quot get call( quot -- ) ;
- ! ] leaks members length [
- ! "%d disposable(s) leaked in example" sprintf simple-lint-error
- ! ] unless-zero ;
+ ] vocabs-quot get call( quot -- )
+ ] leaks members length [
+ "%d disposable(s) leaked in example" sprintf simple-lint-error
+ ] unless-zero ;
: check-examples ( element -- )
\ $example swap elements [ check-example ] each ;
+USING: debugger editors help help.apropos help.markup
+help.syntax help.vocabs memory see stack-checker
+tools.destructors tools.time ;
IN: help.tips
-USING: help.markup help.syntax debugger prettyprint see help help.vocabs
-help.apropos tools.time stack-checker editors memory ;
TIP: "To look at the most recent error, run " { $link :error } ". To look at the most recent error's callstack, run " { $link :c } "." ;
TIP: "To save time on reloading big libraries such as the " { $vocab-link "furnace" } " web framework, save the image after loading them using the " { $link save } " word." ;
+TIP: "Use the " { $link leaks. } " combinator to track down resource leaks." ;
+
HELP: TIP:
{ $syntax "TIP: content ;" }
{ $values { "content" "a markup element" } }
{ $description "Defines a new tip of the day." } ;
-
+
ARTICLE: "all-tips-of-the-day" "All tips of the day"
{ $tips-of-the-day } ;
"All tips defined so far:"
{ $subsections "all-tips-of-the-day" } ;
-ABOUT: "tips-of-the-day"
\ No newline at end of file
+ABOUT: "tips-of-the-day"
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
-USING: parser arrays namespaces sequences random help.markup help.stylesheet
-kernel io io.styles colors.constants definitions accessors ;
+USING: accessors arrays colors.constants definitions help.markup
+help.stylesheet io io.styles kernel namespaces parser random
+sequences ;
IN: help.tips
SYMBOL: tips
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
-USING: destructors help.markup help.syntax help.tips quotations sequences ;
+USING: destructors help.markup help.syntax quotations sequences ;
IN: tools.destructors
HELP: disposables.
"Runs the quotation and collects all disposables leaked by it. Used by " { $link leaks. } "."
} ;
-TIP: "Use the " { $link leaks. } " combinator to track down resource leaks." ;
-
ARTICLE: "tools.destructors" "Destructor tools"
"The " { $vocab-link "tools.destructors" } " vocabulary provides words for tracking down resource leaks."
{ $subsections