remove $reify_switch
This commit is contained in:
@@ -4,18 +4,13 @@
|
||||
|
||||
:- use_module(library(dif)).
|
||||
|
||||
/* in essence, '$reify_switch'(T, Then_0, Else_0) is semantically this,
|
||||
( T == true -> call(Then_0)
|
||||
if_(If_1, Then_0, Else_0) :-
|
||||
call(If_1, T),
|
||||
( T == true -> call(Then_0)
|
||||
; T == false -> call(Else_0)
|
||||
; nonvar(T) -> throw(error(type_error(boolean, T), _))
|
||||
; throw(error(instantiation_error, _))
|
||||
).
|
||||
but it does not create choice points.
|
||||
*/
|
||||
|
||||
if_(If_1, Then_0, Else_0) :-
|
||||
call(If_1, T),
|
||||
'$call_with_default_policy'('$reify_switch'(T, Then_0, Else_0)).
|
||||
|
||||
=(X, Y, T) :-
|
||||
( X == Y -> T = true
|
||||
|
||||
Reference in New Issue
Block a user