This module provides predicates for printing in a unified way informational messages. It is designed to be small and do not have (strict) dependencies with other larger printing and formatting libraries in the system.
Usage:message(Type,Message)
Output to standard error Message, which is of type Type. The quiet prolog flag (see Runtime system control and flags) controls which messages are actually output, depending on its type. Also, for error, warning, and note messages, a prefix is output which denotes the severity of the message.
Usage:message_lns(Type,L0,L1,Message)
Output to standard error Message, which is of type Type, and occurs between lines L0 and L1. This is the same as message/2, but printing the lines where the message occurs in a unified way (this is useful because automatic tools such as the emacs mode know how to parse them).
Usage:messages(Messages)
Print each element in Messages using message/2 or message_lns/4 predicates.
Usage:message_type_visible(Type)
Succeeds if message type Type is visible according to the current value of the quiet prolog flag
Usage:lformat(T)
Output a formatted text T. See lformat_text/1 for a description of the text formatting.
Usage:
The type of the elements to be printed using the messages/1 predicate. Defined as
message_info(message_lns(Source,Ln0,Ln1,Type,Text)) :- atm(Source), nnegint(Ln0), nnegint(Ln1), message_type(Type), lformat_text(Text). message_info(message(Type,Text)) :- atm(Type), lformat_text(Text). message_info(error(Text)) :- lformat_text(Text). message_info(warning(Text)) :- lformat_text(Text). message_info(note(Text)) :- lformat_text(Text). message_info(message(Text)) :- lformat_text(Text). message_info(debug(Text)) :- lformat_text(Text)..
message_type(error). message_type(error0). message_type(warning). message_type(note). message_type(user). message_type(inform). message_type(debug). message_type(passed). message_type(failed). message_type(aborted). message_type(testing).
Usage:message_type(M)
M is one of the accepted message types.
Usage:lformat_text(Message)
Message is an item or a list of items from the following: