cyi1
Interactive interpreter for zinc.
Usage
cyi [option ...]
[module]
Overview
cyi is an interactive environment that allows evaluating and debugging Zinc goals with respect to a Zinc module loaded into the interpreter. At startup, cyi loads either the module specified on the command line or the Zinc prelude.
Goals
A goal is a Zinc expression optionally followed by a where-clause that can be used for providing local definitions for the goal. All free variables of the goal must be declared either in the where clause or by using a let expression as goal. The bindings of the free variables are displayed together with the normal form of the goal after successful evaluation unless the goal is of type IO t.
Commands
At the prompt of the interactive environment, the following commands can be entered:
- goal
-
Evaluate goal in the context of the current module.
:debuggoal-
Invoke the debugger for goal. It may take some time to recompile the source modules with debugging information.
:typegoal-
Print the type of goal instead of evaluating it.
:loadmodule-
Set the current evaluation context to module. This command will compile module and all modules it depends on. The module can be specified either by the name of its source file (ending in .lcurry or .curry) or a plain module name.
cyidisplays the name of the current module in its prompt. :load-
Reset the current evaluation context to the Curry prelude.
:reload-
Repeat the last load command.
:freshen-
Recompile the current module and all imported source files.
:clean-
Remove all compiled files for the current module and all imported source files.
:editfile-
Invoke the editor for file. The default editor is /usr/bin/vi, but this can be changed by setting one of the environment variables VISUAL and EDITOR to your preferred editor before starting
cyi. :edit-
Edit the source file of the current module.
:setoption ...-
Use options when compiling modules.
:set-
Display the current set of compiler options.
:unset-
Reset all compiler options.
:cddir-
Change the current directory to dir.
:cd-
Print the current directory.
- :! command
-
Execute the shell command command.
:version-
Display the compiler's version.
:help-
Show the list of supported commands.
:quit-
Quit
cyi.
All commands, except for :cd and :clean, may be abbreviated to their first letter.