Module sys

The sys package provides access to the arguments given to Lily.


define getenv(name: String): Option[String]

Search the environment for name, returning either a Some with the contents, or None. Internally, this is a wrapper over C's getenv.

define recursion_limit: Integer

Return the current recursion limit.

define set_recursion_limit(limit: Integer)

Attempt to set limit as the maximum recursion limit.

  • ValueError if limit is lower than the current recursion depth, or an


var argv: List[String]

This contains arguments sent to the program through the command-line. If Lily was not invoked from the command-line (ex: mod_lily), then this is empty.