{ $error-description "Thrown when inference encounters a " { $link call } " or " { $link if } " being applied to a value which is not known to be a literal. Such a form can have an arbitrary stack effect, and does not compile." }
{ $notes "This error will be thrown when compiling any combinator, such as " { $link each } ". However, words calling combinators can compile if the combinator is declared " { $link POSTPONE:inline } " and the quotation being passed in is a literal." }
{ $examples
"In this example, words calling " { $snippet "literal-expected-example" } " will compile, even if " { $snippet "literal-expected-example" } " does not compile itself:"
{ $code
": literal-expected-example ( quot -- )"
" [ call ] [ call ] bi ; inline"
}
} ;
HELP:unbalanced-branches-error
{ $values { "in""a sequence of integers" } { "out""a sequence of integers" } }
{ $error-description "Thrown when inference encounters an " { $link if } " or " { $link dispatch } " where the branches do not all exit with the same stack height." }
{ $notes "Conditionals with variable stack effects are considered to be bad style and should be avoided since they do not compile."
$nl
"If this error comes up when inferring the stack effect of a recursive word, check the word's stack effect declaration; it might be wrong." }
{ $error-description "Thrown when inference encounters a word lacking a stack effect declaration. Stack effects of words must be declared, with the exception of words which only push literals on the stack." }
{ $error-description "Thrown when a word's inferred stack effect does not match its declared stack effect." } ;
HELP:recursive-quotation-error
{ $error-description "Thrown when a quotation calls itself, directly or indirectly, within the same word. Stack effect inference becomes equivalent to the halting problem if quotation recursion has to be taken into account, hence it is not permitted." }
{ $error-description "Thrown when an " { $link POSTPONE:inline } " word which is not declared " { $link POSTPONE:recursive } " calls itself, directly or indirectly. The " { $link POSTPONE:recursive } " declaration is mandatory for such words." } ;
" dup call [ unbalanced-recursion-example ] [ drop ] if ;"
" inline recursive"
}
} ;
HELP:inconsistent-recursive-call-error
{ $error-description "Thrown when stack effect inference determines that an inline recursive word calls itself with a different set of quotation parameters than were input." }