remove now unnecessary dependencies, correct ordering of ! in (;)/3

This commit is contained in:
Mark Thom
2020-05-01 23:38:44 -03:00
parent a019109857
commit 9dabce819a
3 changed files with 15 additions and 14 deletions

View File

@@ -13,7 +13,6 @@ extern crate prolog_parser;
#[macro_use]
extern crate ref_thread_local;
use git_version::git_version;
use nix::sys::signal;
mod prolog;
@@ -22,7 +21,6 @@ use crate::prolog::machine::*;
use crate::prolog::machine::streams::*;
use crate::prolog::read::*;
use std::env;
use std::sync::atomic::Ordering;
extern fn handle_sigint(signal: libc::c_int) {

View File

@@ -233,9 +233,13 @@ semicolon_compound_selector(';'(G2, G3), G4, B) :-
:- non_counted_backtracking (;)/3.
;(G1, G4, B) :-
compound(G1),
semicolon_compound_selector(G1, G4, B),
!.
( ( G1 = (_ -> _)
; G1 = (_ , _)
; G1 = (_ ; _)
) ->
!,
semicolon_compound_selector(G1, G4, B)
).
;(G1, G2, B) :-
G1 == !, !, '$set_cp'(B), call(G2).
;(G1, G2, B) :-
@@ -1144,4 +1148,3 @@ parse_stream_options_(eof_action(Action), eof_action-Action) :-
).
parse_stream_options_(E, _) :-
throw(error(domain_error(stream_option, E), _)). % 8.11.5.3i)