
current_pragma(?Pragma)

   Retrieves pragmas that are currently in effect for the context module

Arguments
   Pragma              A variable, atom or compound term

Type
   Predicate Database and Compiler

Description
    Used to test or enumerate currently set pragmas in the context module.
    This is typically only meaningful during the compilation process or
    during some other kind of source processing.
    
    Source processing tools (or code invoked from source-processing tools,
    e.g. inline-transformations) can exploit the pragma facility to make
    their behaviour user-configurable. All they need to do is document the
    pragma names/structures and check for them using current_pragma/1.
    

Modes and Determinism
   current_pragma(+) is semidet
   current_pragma(-) is nondet

Modules
   This predicate is sensitive to its module context (tool predicate, see @/2).

Exceptions
     5 --- Pragma is not a variable, atom or compound term.

Examples
   
    :- pragma(blah).

    ?- findall(P, current_pragma(P), L), writeln(L).
    [blah]

    :- pragma(myoption(on)).

    ?- findall(P, current_pragma(P), L), writeln(L).
    [blah, myoption(on)]

    :- pragma(myoption(off)).

    ?- findall(P, current_pragma(P), L), writeln(L).
    [blah, myoption(off)]

    :- pragma(noblah).

     ?- findall(P, current_pragma(P), L), writeln(L).
    [myoption(off)]

     ?- current_pragma(myoption(off)).
     Yes.


See Also
   compile / 1, inline / 2, pragma / 1, library(source_processor)
