object
expected¶
Constructors for expected terms. An expected term contains either a value or an error. Expected terms should be regarded as opaque terms and always used with the expected/1 object by passing the expected term as a parameter.
static, context_switching_calls
Type-checking support: This object also defines a type
expectedfor use with thetypelibrary object.
Public predicates¶
of_unexpected/2¶
Constructs an expected term from an error that represent that the expected value is missing.
staticof_unexpected(Error,Expected)of_unexpected(@term,--nonvar) - oneof_expected/2¶
Constructs an expected term from an expected value.
staticof_expected(Value,Expected)of_expected(@term,--nonvar) - onefrom_goal/4¶
Constructs an expected term holding a value bound by calling the given goal. Otherwise returns a reference with the unexpected goal error or failure represented by the Error argument.
staticfrom_goal(Goal,Value,Error,Expected)from_goal(0,*,*,*)from_goal(+callable,--term,@term,--nonvar) - onefrom_goal/3¶
Constructs an expected term holding a value bound by calling the given goal. Otherwise returns an expected term with the unexpected goal error or, in case of closure goal, the atom fail.
staticfrom_goal(Goal,Value,Expected)from_goal(0,*,*)from_goal(+callable,--term,--nonvar) - onefrom_goal/2¶
Constructs an expected term holding a value bound by calling the given closure. Otherwise returns an expected term holding the unexpected closure error or, in case of closure failure, the atom fail.
staticfrom_goal(Closure,Expected)from_goal(1,*)from_goal(+callable,--nonvar) - oneProtected predicates¶
(no local declarations; see entity ancestors if any)
Private predicates¶
(no local declarations; see entity ancestors if any)