HELP: find-library*
{ $values
{ "name" "a shared library name" }
- { "path/f" "a filesystem path or f" }
+ { "path/f" { $maybe "filesystem path" } }
}
{ $description
"Returns a filesystem path for a plain shared library name, or f if no library can be found."
HELP: ENUM:
{ $syntax "ENUM: type words... ;" "ENUM: type < base-type words..." }
-{ $values { "type" "a name to typedef to int or f" } { "words" "a sequence of word names" } }
+{ $values { "type" { $maybe "a name to typedef to int" } } { "words" "a sequence of word names" } }
{ $description "Creates a c-type that boxes and unboxes integer values to symbols. A symbol is defined for each member word. The base c-type can optionally be specified and defaults to " { $link int } ". A constructor word " { $snippet "<type>" } " is defined for converting from integers to singletons. The generic word " { $link enum>number } " converts from singletons to integers. Enum-typed values are automatically prettyprinted as their singleton words. Unrecognizing enum numbers are kept as numbers." }
{ $examples
"Here is an example enumeration definition:"
{ $description "Sets the given blocks as the current one by storing it in the basic-block dynamic variable. If it has any " { $slot "instructions" } " the current " { $link building } " is set to those." } ;
HELP: with-branch
-{ $values { "quot" quotation } { "pair/f" "a pair or f" } }
+{ $values { "quot" quotation } { "pair/f" { $maybe "pair" } } }
{ $description "The pair is either " { $link f } " or a two-tuple containing a " { $link basic-block } " and a " { $link height-state } " two-tuple." } ;
IN: compiler.cfg.intrinsics.slots
HELP: class-tag
-{ $values { "class" class } { "tag/f" "a number or f" } }
+{ $values { "class" class } { "tag/f" { $maybe number } } }
{ $description "Finds the class number for this class if it is a subclass of a builtin class, or " { $link f } " if it isn't." }
{ $examples
{ $example
} ;
HELP: immediate-slot-offset?
-{ $values { "object" object } { "?" "true or false" } }
+{ $values { "object" object } { "?" boolean } }
{ $description
{ $link t } " if the object is a " { $link fixnum } " that is small enough to fit into a machine register. It is used to determine whether immediate versions of the instructions " { $link ##set-slot } " and " { $link ##set-slot-imm } " can be emitted." }
{ $examples
{ $values
{ "#call" #call }
{ "write-barrier?" "whether a write barrier is needed, it always is unless the item to set is an " { $link immediate } }
- { "tag" "a number or f" }
+ { "tag" { $maybe number } }
{ "literal" "a literal" }
} { $description "Grabs the data needed from a call node to determine what intrinsic CFG instructions to emit for the " { $link set-slot } " call." } ;
HELP: value-tag
-{ $values { "info" value-info-state } { "n/f" number } }
+{ $values { "info" value-info-state } { "n/f" { $maybe number } } }
{ $description "Finds the class number for this value-info-states class (an index in the " { $link builtins } " list), or " { $link f } " if it hasn't one." } ;
HELP: emit-set-slot
HELP: select-tuple
{ $values
{ "query/tuple" tuple }
- { "tuple/f" "a tuple or f" } }
+ { "tuple/f" { $maybe tuple } } }
{ $description "A SQL query is constructed from the slots of the exemplar tuple that are not " { $link f } ". Returns a single tuple from the database if it matches the query constructed from the exemplar tuple." } ;
HELP: select-tuples
{ $description "Prints the call stack at the time of the most recent error. Used for interactive debugging." } ;
HELP: :get
-{ $values { "variable" object } { "value" "the value, or f" } }
+{ $values { "variable" object } { "value" { $maybe "value" } } }
{ $description "Looks up the value of a variable at the time of the most recent error." } ;
HELP: :res
-USING: help.markup help.syntax io quotations math sequences ;
+USING: help.markup help.syntax io quotations math sequences strings ;
IN: io.encodings
HELP: <encoder>
{ "seps" sequence }
{ "stream" "an input stream" }
{ "encoding" "an encoding descriptor" }
- { "string/f" "a string or f" }
- { "sep/f" "encountered separator or f" }
+ { "string/f" { $maybe string } }
+ { "sep/f" { $maybe "encountered separator" } }
}
{ $description "Decodes characters from the stream until one of the separators are encountered." } ;
HELP: mp3>id3
{ $values
{ "path" "a path string" }
- { "id3/f" "a tuple storing ID3v2 metadata or f" } }
+ { "id3/f" { $maybe "tuple storing ID3v2 metadata" } } }
{ $description "Return a tuple containing the ID3 information parsed out of the MP3 file, or " { $link f } " if no metadata is present. Words to access the ID3v1 information are here:"
{ $list
{ $link title }
HELP: album
{ $values
{ "id3" id3 }
- { "string/f" "string or f" }
+ { "string/f" { $maybe string } }
}
{ $description "Returns the album, or " { $link f } " if this field is missing, from a parsed id3 tag." } ;
HELP: artist
{ $values
{ "id3" id3 }
- { "string/f" "string or f" }
+ { "string/f" { $maybe string } }
}
{ $description "Returns the artist, or " { $link f } " if this field is missing, from a parsed id3 tag." } ;
HELP: comment
{ $values
{ "id3" id3 }
- { "string/f" "string or f" }
+ { "string/f" { $maybe string } }
}
{ $description "Returns the comment, or " { $link f } " if this field is missing, from a parsed id3 tag." } ;
HELP: genre
{ $values
{ "id3" id3 }
- { "string/f" "string or f" }
+ { "string/f" { $maybe string } }
}
{ $description "Returns the genre, or " { $link f } " if this field is missing, from a parsed id3 tag." } ;
HELP: title
{ $values
{ "id3" id3 }
- { "string/f" "string or f" }
+ { "string/f" { $maybe string } }
}
{ $description "Returns the title, or " { $link f } " if this field is missing, from a parsed id3 tag." } ;
HELP: year
{ $values
{ "id3" id3 }
- { "string/f" "string or f" }
+ { "string/f" { $maybe string } }
}
{ $description "Returns the year, or " { $link f } " if this field is missing, from a parsed id3 tag." } ;
HELP: find-id3-frame
{ $values
{ "id3" id3 } { "name" string }
- { "obj/f" "object or f" }
+ { "obj/f" { $maybe object } }
}
{ $description "Returns the " { $slot "data" } " slot of the ID3 frame with the given name, or " { $link f } "." } ;