• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

6.3 Importing Predicates into a Module
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • Modules
        • Importing Predicates into a Module
          • use_module/1
          • use_module/2
    • Packages
Availability:built-in
Sourceuse_module(+File, +ImportList)
Load File, which must be a module file, and import the predicates as specified by ImportList. ImportList is a list of predicate indicators specifying the predicates that will be imported from the loaded module. ImportList also allows for renaming or import-everything-except. See also the import option of load_files/2. The first example below loads member/2 from the lists library and append/2 under the name list_concat, which is how this predicate is named in YAP. The second example loads all exports from library option except for meta_options/3. These renaming facilities are generally used to deal with portability issues with as few changes as possible to the actual code. See also section C and section 6.8.
:- use_module(library(lists), [ member/2,
                                append/2 as list_concat
                              ]).
:- use_module(library(option), except([meta_options/3])).

ClioPatria (version V3.1.1-51-ga0b30a5)