blob: d7a43db0dd8c823eae81ebf5aba7e737ec7be4f9 (
plain)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
.Dd Oct 6, 2014
.Dt TAMASHEQ 1
.Os
.Sh NAME
.Nm tamasheq
.Nd an OCaml instrumentation tool
.Sh SYNOPSIS
.Nm
.Op Fl denv
.Op Fl dlam
.Op Fl h Ar hook
.Op Fl o Ar dir
.Op Fl t
.Ar file
.Op Ar
.Sh DESCRIPTION
.Nm
is an instrumentation tool that works by running
.Em hooks
over OCaml programs.
.Pp
.Nm
takes at least one
.Ar file
which must be a
.Sy .ml
file.
.Pp
.Ar file
may be one of the following:
.Pp
.Bl -bullet -offset Em -compact
.It
.Sy .ml
files
.It
.Sy .mli
files
.El
.Pp
.Nm
also takes the following parameters:
.Bl -tag -width 7n -offset Em
.It Fl denv
Dump the final environment on stderr.
.Pp
The format of the output is not specified and may change in the
future.
It is only provided for debugging purposes.
.It Fl dlam
Print the lambda AST of every
.Ar file
on stderr.
.Pp
The format of the output is not specified and may change in the
future.
It is only provided for debugging purposes.
.It Fl h Ar hook
Load the hook
.Ar hook .
.Pp
Hooks must be
.Sy .cmo
files and must register themselves using the
.Sy register_hook
function.
If a hook does not register itself, it will be ignored.
.It Fl o Ar dir
Set the output directory to
.Ar dir .
.Pp
By default,
.Nm
will output object files into the current working directory.
.It Fl t
Always exit with a return code of 0.
.Pp
By default,
.Nm
will crash if an exception raised in the code being run is not caught.
This option makes
.Nm
catch any escaping exception.
The exception will then be printed on stderr and
.Nm
will exit with a return code of 0.
.El
|