.\" Man page Copyright 2005-2007 Chris Morris .\" Kayac written by Edwin Brady .\" .\" This is free software; you can redistribute it and/or modify it under .\" the terms of the GNU General Public License version 2 or later as .\" published by the Free Software Foundation. .\" .\" This is distributed in the hope that it will be useful, but WITHOUT .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" for more details. .\" .TH kayac 1 "June 2007" "Kaya" "Kaya program reference" .SH NAME Kayac \- Compiler for the kaya language .SH SYNOPSIS .B kayac .I "FILE [-L DIRECTORY [-L ...]] [-libdir DIRECTORY [-libdir ...]] [-force] [-nochase] [-noprelude] [-nortchecks|-fastvm] [-noopts] [-repl] [-pic] [-xmldocs] [-static] [-profile] [-seedkey STRING] [-dumptac] [-dumpraw] [-dumptree] [-dumpsimpl] [-dumpeqns] [-dumpcg] [-dumpdeps] [-keepc] [-showgcc]" .PP .B kayac .I "[-version|-v|-help|-h|-?|-installdir]" .SH DESCRIPTION .B kayac compiles modules, programs and web applications in the Kaya programming language. .PP kayac will automatically compile dependencies as necessary provided that, for a dependency Foo, the source file is called Foo.k and is in the current working directory. .SH OPTIONS .TP 10 \f3-?\f1 | \f3-h\f1 | \f3-help\f1 Show usage summary .TP \f3-v\f1 | \f3-version\f1 Show version number .TP \f3-installdir\f1 Show the directory in which the libraries are installed .TP \f3-L \f2DIRECTORY\f1 | \f3-libdir \f2DIRECTORY\f1 Add DIRECTORY to the library search path. .TP \f3-force\f1 Force compilation even if kayac thinks it isn't needed. .TP \f3-q\f1 Quiet compilation; don't report which module is being built. .TP \f3-nochase\f1 Don't chase up and compile dependencies. Implies \f3-force\f1 and \f3-q\f1. .TP \f3-deprfail\f1 Fail compilation if a deprecated function is called. .TP \f3-noprelude\f1 Don't import the Prelude (probably only useful when compiling the standard library). Compiling anything other than modules with this option is unlikely to work well. .TP \f3-noenvlibs\f1 kayac will ignore the \f3KAYA_LIBRARY_PATH\f1 environment variable when compiling, and will not import from the compiled-in library directories (probably only useful when compiling the standard library) .TP \f3-nortchecks\f1 Disables some run-time checking. This speeds up the final program, at the cost of making errors harder to track down (and possibly introducing additional subtle errors where an exception would previously have occurred). Only recommended for bug free programs... .TP \f3-fastvm\f1 Uses a version of the Kaya VM that is optimised for applications such as web applications with a short run-time (a few seconds or less) for which it is significantly faster than the normal VM. However, for longer-running applications memory usage can grow very rapidly. This option implies and takes precedence over \f3-nortchecks\f1. .TP \f3-noopts\f1 Disables compile-time optimisations. Probably only useful for debugging purposes. .TP \f3-repl\f1 Read-Eval-Print loop mode. In this mode you can interactively test the behaviour of functions without needing to build a separate testing program, in a top-level interpreter. See .B kaya(1) for more information. This option implies -pic. .TP \f3-pic\f1 Use the -fPIC option of the C compiler to make position-independent code suitable for shared libraries. This option has no effect on Windows, where all code is position-independent. .TP \f3-xmldocs\f1 Generate XML documentation. This can then be converted into HTML or Manpage format using the KayaDoc module and the .B xml2man(1) tool. .TP \f3-static\f1 Statically link executables so that they can be run on a wider range of systems at the cost of signficantly increased file size. This is generally only useful if you are making a pre-compiled binary distribution. You may get some warnings from the linker about potential problems and limitations when linking some libraries, or compilation may fail entirely if the static libraries are unavailable. .TP \f3-profile\f1 Turns on profiling in the output code. The program will then generate a gmon.out file when run, which can then be analysed with a program such as .B gprof(1). This option also enables \f3-static\f1, and to get a useful call graph report from gprof, your libgc library must have been compiled with profiling enabled. .TP \f3-seedkey \f2STRING\f1 Use a string to seed the random number generator which makes a secret key. Useful for testing web apps. .SH DEBUGGING OPTIONS These options generate debugging information. .TP 10 \f3-dumptac\f1 Dump bytecode .TP \f3-dumpraw\f1 Dump the raw parse tree. .TP \f3-dumptree\f1 Dump the type checked parse tree. .TP \f3-dumpsimpl\f1 Dump the simplified, desugared and optimised code in a human readable (almost) form. .TP \f3-dumpeqns\f1 Dump the type equations used in type inference .TP \f3-dumpcg\f1 Dump the function call graph .TP \f3-dumpdeps\f1 Dump the module dependency graph .TP \f3-keepc\f1 Keep the generated C code .TP \f3-showgcc\f1 Print the command sent to gcc .SH ENVIRONMENT VARIABLES .TP \f3KAYA_LIBRARY_PATH\f1 A list of extra paths to search for kaya libraries. Paths are separated by ':' on Posix systems, and ';' on Windows. .SH DOCUMENTATION .PP Library documentation for Kaya can be found at or in the manual section .B 3kaya .SH OBTAINING .PP The latest release of Kaya can be obtained from . You can receive announcements of new versions of Kaya by subscribing to the kaya-announce mailing list .PP Development versions can be obtained using .B darcs(1) from .SH BUGS .PP Please report bugs found to .SH LICENSE .B kayac is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (version 2 or any later version) as published by the Free Software Foundation. .SH SEE ALSO .BR darcs(1) .BR gcc(1) .BR gprof(1) .BR rekey(1) .BR xml2man(1)