Added warning when attempting to use #show statements without completion.

This commit is contained in:
Patrick Lühne 2017-06-05 04:24:00 +02:00
parent 19ede968ed
commit 95984f0447
No known key found for this signature in database
GPG Key ID: 05F3611E97A70ABF
1 changed files with 3 additions and 2 deletions

View File

@ -64,10 +64,11 @@ void translate(const char *fileName, std::istream &stream, Context &context)
ast::PrintContext printContext;
// TODO: respect predicate visibility in output
if (!context.complete)
{
if (context.visiblePredicateSignatures)
context.logger.log(output::Priority::Warning) << "#show statements are ignored because completion is not enabled";
for (const auto &scopedFormula : scopedFormulas)
{
ast::print(context.logger.outputStream(), scopedFormula.formula, printContext);