File: library_pathname.doc

package info (click to toggle)
hol88 2.02.19940316dfsg-5
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 65,816 kB
  • sloc: ml: 199,939; ansic: 9,666; sh: 6,913; makefile: 6,032; lisp: 2,747; yacc: 894; sed: 201; cpp: 87; awk: 5
file content (36 lines) | stat: -rw-r--r-- 1,159 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
\DOC library_pathname

\TYPE {library_pathname : (void -> string)}

\SYNOPSIS
Returns the pathname to the current library directory.

\DESCRIBE
Evaluating {library_pathname()} returns a string giving the root pathname of
the current library directory.  Usually, this is just the absolute pathname 
to the HOL system library.  But during the evaluation of a call to
{load_library}, the string returned by {library_pathname()} is the library
directory in which the library being loaded resides.

\FAILURE
Never fails.

\EXAMPLE
A very typical application is illustrated by the following code from the
load file for the built-in {string} library:
{
   let path = library_pathname() ^ `/string/` in
       set_search_path (union (search_path()) [path]);;
}
\noindent When the {string} library load file is loaded using {load_library},
this part of the code adds the pathname to the {string} library to the internal
HOL search path.

\USES
The main purpose of the function {library_pathname} is to allow library
load files to update the internal HOL search paths in a site-independent way.

\SEEALSO
install, library_search_path, set_library_search_path.

\ENDDOC