:- use_module(bgp). print_warnings([]). print_warnings([W|Ws]) :- format("Warning: ~w~n", [W]), print_warnings(Ws). print_warnings :- findall(W, bgp:warning(W), Ws), length(Ws, L), ( L > 0 ->format("Found ~w warning(s):~n", [L]), print_warnings(Ws) ; format("No warnings!~n") ). main :- bgp:bird_config(BirdDict), yaml_write(current_output, BirdDict).