1kayac(1)                    Kaya program reference                    kayac(1)
2
3
4

NAME

6       Kayac - Compiler for the kaya language
7

SYNOPSIS

9       kayac  FILE  [-L  DIRECTORY [-L ...]] [-libdir DIRECTORY [-libdir ...]]
10       [-force]  [-nochase]   [-noprelude]   [-nortchecks|-fastvm]   [-noopts]
11       [-repl]  [-pic]  [-xmldocs] [-static] [-profile] [-T] [-seedkey STRING]
12       [-dumptac] [-dumpraw] [-dumptree]  [-dumpsimpl]  [-dumpeqns]  [-dumpcg]
13       [-dumpdeps] [-keepc] [-showgcc]
14
15       kayac [-version|-v|-help|-h|-?|-installdir]
16

DESCRIPTION

18       kayac  compiles modules, programs and web applications in the Kaya pro‐
19       gramming language.
20
21       kayac will automatically compile  dependencies  as  necessary  provided
22       that,  for  a dependency Foo, the source file is called Foo.k and is in
23       the current working directory.
24

OPTIONS

26       -? | -h | -help
27                 Show usage summary
28
29
30       -v | -version
31                 Show version number
32
33
34       -installdir
35                 Show the directory in which the libraries are installed
36
37
38       -L DIRECTORY | -libdir DIRECTORY
39                 Add DIRECTORY to the library search path.
40
41
42       -force    Force compilation even if kayac thinks it isn't needed.
43
44
45       -q        Quiet compilation; don't report which module is being built.
46
47
48       -nochase  Don't chase up and compile dependencies. Implies  -force  and
49                 -q.
50
51
52       -deprfail Fail compilation if a deprecated function is called.
53
54
55       -noprelude
56                 Don't import the Prelude (probably only useful when compiling
57                 the standard library). Compiling anything other than  modules
58                 with this option is unlikely to work well.
59
60
61       -noenvlibs
62                 kayac  will ignore the KAYA_LIBRARY_PATH environment variable
63                 when compiling, and will  not  import  from  the  compiled-in
64                 library  directories (probably only useful when compiling the
65                 standard library)
66
67
68       -nortchecks
69                 Disables some run-time checking. This  speeds  up  the  final
70                 program,  at  the  cost of making errors harder to track down
71                 (and possibly introducing additional subtle errors  where  an
72                 exception  would  previously have occurred). Only recommended
73                 for bug free programs...
74
75
76       -fastvm   Uses a version of the Kaya VM that is optimised for  applica‐
77                 tions  such  as web applications with a short run-time (a few
78                 seconds or less) for which it is  significantly  faster  than
79                 the  normal VM. However, for longer-running applications mem‐
80                 ory usage can grow very  rapidly.  This  option  implies  and
81                 takes precedence over -nortchecks.
82
83
84       -noopts   Disables compile-time optimisations. Probably only useful for
85                 debugging purposes.
86
87
88       -repl     Read-Eval-Print loop mode. In this mode you can interactively
89                 test  the  behaviour  of functions without needing to build a
90                 separate testing program, in  a  top-level  interpreter.  See
91                 kaya(1) for more information. This option implies -pic.
92
93
94       -pic      Use the -fPIC option of the C compiler to make position-inde‐
95                 pendent code suitable for shared libraries. This  option  has
96                 no effect on Windows, where all code is position-independent.
97
98
99       -xmldocs  Generate  XML  documentation. This can then be converted into
100                 HTML or Manpage format  using  the  KayaDoc  module  and  the
101                 xml2man(1) tool.
102
103
104       -static   Statically  link  executables  so  that  they can be run on a
105                 wider range of systems at the cost of signficantly  increased
106                 file  size. This is generally only useful if you are making a
107                 pre-compiled binary distribution. You may get  some  warnings
108                 from the linker about potential problems and limitations when
109                 linking some libraries, or compilation may fail  entirely  if
110                 the static libraries are unavailable.
111
112
113       -profile  Turns  on profiling in the output code. The program will then
114                 generate a gmon.out file when run, which can then be analysed
115                 with  a  program  such  as gprof(1). This option also enables
116                 -static, and to get a useful call graph  report  from  gprof,
117                 your  libgc  library  must  have been compiled with profiling
118                 enabled.
119
120
121       -T        Turns on Taint mode. In this mode, all Strings received  from
122                 external  sources are considered "tainted" and cannot be used
123                 until processed by a de-tainting function. This is most  use‐
124                 ful in CGI applications for forcing data validation.
125
126
127       -seedkey STRING
128                 Use  a string to seed the random number generator which makes
129                 a secret key. Useful for testing web apps.
130
131

DEBUGGING OPTIONS

133       These options generate debugging information.
134
135
136       -dumptac  Dump bytecode
137
138
139       -dumpraw  Dump the raw parse tree.
140
141
142       -dumptree Dump the type checked parse tree.
143
144
145       -dumpsimpl
146                 Dump the simplified, desugared and optimised code in a  human
147                 readable (almost) form.
148
149
150       -dumpeqns Dump the type equations used in type inference
151
152
153       -dumpcg   Dump the function call graph
154
155
156       -dumpdeps Dump the module dependency graph
157
158
159       -keepc    Keep the generated C code
160
161
162       -showgcc  Print the command sent to gcc
163
164

ENVIRONMENT VARIABLES

166       KAYA_LIBRARY_PATH
167              A  list  of  extra paths to search for kaya libraries. Paths are
168              separated by ':' on Posix systems, and ';' on Windows.
169
170

DOCUMENTATION

172       Library  documentation  for  Kaya  can   be   found   at   <http://kay
173       alang.org/library> or in the manual section 3kaya
174
175

OBTAINING

177       The   latest   release  of  Kaya  can  be  obtained  from  <http://kay
178       alang.org/download>. You can receive announcements of new  versions  of
179       Kaya    by    subscribing    to    the   kaya-announce   mailing   list
180       <http://lists.kayalang.org/lists/listinfo/kaya-announce>
181
182       Development versions can be obtained using darcs(1)  from  <http://kay
183       alang.org/darcs/>
184
185

BUGS

187       Please report bugs found to <kaya@kayalang.org>
188
189

LICENSE

191       kayac  is free software; you can redistribute it and/or modify it under
192       the terms of the GNU General Public License (version  2  or  any  later
193       version) as published by the Free Software Foundation.
194
195

SEE ALSO

197       darcs(1) gcc(1) gprof(1) rekey(1) xml2man(1)
198
199
200
201
202Kaya                               June 2007                          kayac(1)
Impressum