This has surprising exceptions! SWI Prolog tries its best to be a friendly environment to developers. It sometimes tries too hard in my opinion. use_module/2 collides headlong with one of these: autoloading libraries. If you tried the above examples in your own code you’d find they all do absolutely nothing. In the first example you’d still be able to use partition/4 without qualifying it by module, for example, even though in one case you’d specifically excluded it! This behaviour is, in my opinion, counter-productive in that it allows modular errors to slip into code silently, it breaks explicit exclusions, and it impedes efforts to port code to other Prolog environments which do not do this nearly-predatory levels of hand-holding. There are two options open to you: Read the documentation for the auto loader and learn it inside and out. Be absolutely, 100% positive of what it does and when it does it. Oh, right, and be aware that your clients may not have the auto loader turned on, or may have the autoload_path/1 predicate adding even more to their environments; or Turn off auto loading in your environment by inserting the following code into your .plrc file (or equivalent): :- set_prolog_flag(autoload,false).