File: loadt.doc

package info (click to toggle)
hol-light 20170109-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 36,568 kB
  • ctags: 8,549
  • sloc: ml: 540,018; cpp: 439; lisp: 286; java: 279; makefile: 262; sh: 229; yacc: 108; perl: 78; ansic: 57; sed: 39
file content (38 lines) | stat: -rw-r--r-- 904 bytes parent folder | download | duplicates (6)
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
37
38
\DOC loadt

\TYPE {loadt : string -> unit}

\SYNOPSIS
Finds a file on the load path and loads it.

\DESCRIBE
The function {loadt} takes a string indicating an OCaml file name as
argument and loads it. If the filename is relative, it is found on the load
path {load_path}, and it is then loaded, updating the list of loaded files.

\FAILURE
{loadt} will fail if the file named by the argument does not exist in
the search path. It will of course fail if the file is not a valid OCaml
file. Failure in the OCaml file will also terminate loading.

\EXAMPLE
If we have an ML file called {foo.ml} on the load path, e.g. in the current
directory, which contains the line
{
   let x=2+2;;
}
\noindent this can be loaded as follows:
{
   # loadt "foo.ml";;
}
\noindent and the system would respond with:
{
  # loadt "foo.ml";;
  val x : int = 4
  val it : unit = ()
}

\SEEALSO
load_path, loads, needs.

\ENDDOC