Merge pull request #2558 from bakaq/error_to_doclog

Convert library(error) docs to Doclog format
This commit is contained in:
Mark Thom
2024-09-16 17:41:18 -06:00
committed by GitHub

View File

@@ -14,31 +14,29 @@
:- meta_predicate check_(1, ?, ?). :- meta_predicate check_(1, ?, ?).
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %% must_be(Type, Term)
must_be(Type, Term) %
% This predicate is intended for type-checks of built-in predicates.
This predicate is intended for type-checks of built-in predicates. %
% It asserts that Term is:
It asserts that Term is: %
% 1) instantiated *and*
1) instantiated *and* % 2) instantiated to an instance of the given Type.
2) instantiated to an instance of the given Type. %
% It corresponds to usage mode +Term.
It corresponds to usage mode +Term. %
% Currently, the following types are supported:
Currently, the following types are supported: %
% - atom
- atom % - boolean
- boolean % - character
- character % - chars
- chars % - in_character
- in_character % - integer
- integer % - list
- list % - octet_character
- octet_character % - octet_chars
- octet_chars % - term
- term
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
must_be(Type, Term) :- must_be(Type, Term) :-
must_be_(type, Type), must_be_(type, Type),
@@ -142,19 +140,16 @@ type(boolean).
type(term). type(term).
type(not_less_than_zero). type(not_less_than_zero).
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %% can_be(Type, Term)
can_be(Type, Term) %
% This predicate is intended for type-checks of built-in predicates.
This predicate is intended for type-checks of built-in predicates. %
% It asserts that there is a substitution which, if applied to Term,
It asserts that there is a substitution which, if applied to Term, % makes it an instance of Type.
makes it an instance of Type. %
% It corresponds to usage mode ?Term.
It corresponds to usage mode ?Term. %
% It supports the same types as must_be/2.
It supports the same types as must_be/2.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
can_be(Type, Term) :- can_be(Type, Term) :-
must_be(type, Type), must_be(type, Type),