-:- module(builtins, [(=)/2, (\=)/2, (\+)/1, !/0, (',')/2, (->)/2, (;)/2,
- (=..)/2, (:)/2, (:)/3, (:)/4, (:)/5, (:)/6,
- (:)/7, (:)/8, (:)/9, (:)/10, (:)/11, (:)/12,
- abolish/1, asserta/1, assertz/1,
+:- module(builtins, [(=)/2, (\=)/2, (\+)/1, !/0, (',')/2, (->)/2,
+ (;)/2, (=..)/2, (:)/2, (:)/3, (:)/4, (:)/5,
+ (:)/6, (:)/7, (:)/8, (:)/9, (:)/10, (:)/11,
+ (:)/12, abolish/1, asserta/1, assertz/1,
at_end_of_stream/0, at_end_of_stream/1,
atom_chars/2, atom_codes/2, atom_concat/3,
atom_length/2, bagof/3, call/1, call/2, call/3,
close/1, close/2, current_input/1,
current_output/1, current_op/3,
current_predicate/1, current_prolog_flag/2,
- fail/0, false/0, findall/3, findall/4,
+ error/2, fail/0, false/0, findall/3, findall/4,
flush_output/0, flush_output/1, get_byte/1,
get_byte/2, get_char/1, get_char/2, get_code/1,
- get_code/2, halt/0, halt/1, nl/0,
- nl/1, number_chars/2, number_codes/2, once/1,
- op/3, open/3, open/4, peek_byte/1, peek_byte/2,
+ get_code/2, halt/0, halt/1, nl/0, nl/1,
+ number_chars/2, number_codes/2, once/1, op/3,
+ open/3, open/4, peek_byte/1, peek_byte/2,
peek_char/1, peek_char/2, peek_code/1,
peek_code/2, put_byte/1, put_byte/2, put_code/1,
put_code/2, put_char/1, put_char/2, read/1,
nl(Stream) :-
put_char(Stream, '\n').
+
+error(Error_term, Imp_def) :-
+ throw(error(Error_term, Imp_def)).