object
expected
¶
Constructors for expected term references. A reference contains either an expected term or an unexpected term. References should be regarded as opaque terms and always used with the “expected(_)” object by passing the reference as a parameter.
static, context_switching_calls
Public interface¶
of_unexpected/2
¶
Constructs a reference from an unexpected term.
static
of_unexpected(Unexpected,Reference)
of_unexpected(@term,--nonvar)
- one
of_expected/2
¶
Constructs a reference from an expected term.
static
of_expected(Expected,Reference)
of_expected(@term,--nonvar)
- one
from_goal/4
¶
Constructs a reference by calling Goal that binds and holds Expected on success. Otherwise returns a reference with the unexpected goal error or failure represented by the Failure argument.
static
from_goal(Goal,Expected,Failure,Reference)
from_goal(0,*,*,*)
from_goal(+callable,--term,@term,--nonvar)
- one
from_goal/3
¶
Constructs a reference by calling Goal that binds and uses Expected on success. Otherwise returns a reference with the unexpected goal error or failure represented by the atom “fail”.
static
from_goal(Goal,Expected,Reference)
from_goal(0,*,*)
from_goal(+callable,--term,--nonvar)
- one
Protected interface¶
(see related entities)
Private predicates¶
(see related entities)
Operators¶
(none)
Remarks¶
Type-checking support: This object also defines a type “expected” for use with the “type” library object.
See also