Advertisement
logicmoo

use_listing_vars

Nov 15th, 2015
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Prolog 2.34 KB | None | 0 0
  1. packwtester@titan:~$ swipl
  2. Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 7.3.5-38-g4eff21a)
  3. Copyright (c) 1990-2015 University of Amsterdam, VU Amsterdam
  4. SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
  5. and you are welcome to redistribute it under certain conditions.
  6. Please visit http://www.swi-prolog.org for details.
  7.  
  8. For help, use ?- help(Topic). or ?- apropos(Word).
  9.  
  10. ?- pack_install(logicmoo_base).
  11. % Contacting server at http://www.swi-prolog.org/pack/query ... ok
  12. Install logicmoo_base@1.1.1 from http://www.prologmoo.com/packs/logicmoo_base/release/logicmoo_base-1.1.1.tgz Y/n?
  13. % Contacting server at http://www.swi-prolog.org/pack/query ... ok
  14. % "logicmoo_base-1.1.1.tgz" was downloaded 1 times
  15. Package:                logicmoo_base
  16. Title:                  Support for various Prolog programing extensions such reactive [agent] programming in FOL using forward-chaining and memoization
  17. Installed version:      1.1.1
  18. Author:                 Douglas R. Miles <logicmoo@gmail.com>
  19. Home page:              https://github.com/TeamSPoon/PrologMUD/tree/master/pack/logicmoo_base
  20. Download URL:           http://www.prologmoo.com/packs/logicmoo_base/release/logicmoo_base-1.1.1.tgz
  21. Install "logicmoo_base-1.1.1.tgz" (2,182,372 bytes) Y/n?
  22. true.
  23.  
  24. ?- use_module(logicmoo_utils).
  25. ERROR: source_sink `logicmoo_utils' does not exist
  26. ?- use_module(library(logicmoo_utils)).
  27. ERROR: source_sink `library(logicmoo_utils)' does not exist
  28. ?- use_module(library(logicmoo/logicmoo_utils)).
  29. % Updating index for library /home/packwtester/lib/swipl/pack/logicmoo_base/prolog/logicmoo/util/
  30. % /home/packwtester/lib/swipl/pack/logicmoo_base/prolog/logicmoo/logicmoo_utils.pl:204
  31. % Adding logicmoo/utils to autoload path
  32. true.
  33.  
  34. ?- use_listing_vars.
  35. true.
  36.  
  37. ?- listing(listing).
  38. :- meta_predicate prolog_listing:listing(:).
  39.  
  40. prolog_listing:listing(M:Spec) :-
  41.         var(Spec), !,
  42.         list_module(M).
  43. prolog_listing:listing(M:List) :-
  44.         is_list(List), !,
  45.         forall(member(Spec, List), listing(M:Spec)).
  46. prolog_listing:listing(X) :-
  47.         (   prolog:locate_clauses(X, ClauseRefs)
  48.         ->  list_clauserefs(ClauseRefs)
  49.         ;   '$find_predicate'(X, Preds),
  50.             list_predicates(Preds, X)
  51.         ).
  52.  
  53. prolog_listing:listing :-
  54.         context_module(Context),
  55.         list_module(Context).
  56.  
  57. true.
  58.  
  59. ?-
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement