title: Reload imported modules
body: <p>The "problem" I am facing is that if I use the SWI-Prolog module system, defining modules and using them in other modules, if an <em>imported</em> module changes SWI-Prolog does not take it in consideration when loading the <em>importing</em> module. For example:</p>
  
  <pre><code>% file topmod.pl
  :- module(topmod, [thetop/0]).
  
  :- use_module(bottommod).
  
  thetop :-
      thebottom(S),
      format('This is the top~nAnd this is ~w~n', [S]).
  
  % file bottommod.pl
  :- module(bottommod, [thebottom/1]).
  
  thebottom('the bottom').
  </code></pre>
  
  <p>If I now load them:</p>
  
  <pre><code>?- [thetop].
  %  bottommod compiled into bottommod 0.00 sec, 2 clauses
  % topmod compiled into topmod 0.00 sec, 6 clauses
  true.
  
  ?- thetop.
  This is the top
  And this is the bottom
  true.
  </code></pre>
  
  <p>If I now change the file:</p>
  
  <pre><code>% file bottommod.pl changes
  
  - thebottom('the bottom').
  + thebottom('the foobar').
  
  ?- [thetop].
  % topmod compiled into topmod 0.00 sec, 1 clauses
  true.
  
  ?- thetop.
  This is the top
  And this is the bottom
  true.
  
  ?- module(bottommod).
  true.
  
  ?- listing.
  thebottom('the bottom').
  true.
  </code></pre>
  
  <p>How should I force Prolog to consult all the imported modules and the modules they import, short of using <code>consult</code>?</p>