/* not needed in 3.8.5 catch( Goal, Catcher, Recovery ) :- on_exception(Catcher, Goal, Recovery). throw(Ball) :- raise_exception(Ball). atom_codes( Atom, Codes ) :- atom_chars( Atom, Codes ). */ % simulate swi's predicate. % unfortunately a return is required. get_single_char( C ) :- get0( C ). get_line( Cs ) :- ( at_end_of_line -> get0( _EndOfLine ), Cs = [] ; get0( Cprime ), Cs = [Cprime|Tcs], get_line( Tcs ) ).