diff options
author | Richard Carlsson <[email protected]> | 2016-12-06 12:14:18 +0100 |
---|---|---|
committer | Richard Carlsson <[email protected]> | 2017-02-06 15:36:20 +0100 |
commit | 0eb45e21d406539caaad98bfc1740f9a11e32565 (patch) | |
tree | e7254e79a17efe61e25ecc4f6efbea4c919c0340 /lib/stdlib/doc/src/shell.xml | |
parent | eab4b024957a27be018f8bc155bdd1dc05ec7969 (diff) | |
download | otp-0eb45e21d406539caaad98bfc1740f9a11e32565.tar.gz otp-0eb45e21d406539caaad98bfc1740f9a11e32565.tar.bz2 otp-0eb45e21d406539caaad98bfc1740f9a11e32565.zip |
Add shell shortcut for recompiling existing modules
This extends the shell function c/1 and c/2 so that if the argument is a
module name instead of a file name, it automatically locates the .beam file
and the corresponding source file, and then recompiles the module using the
same compiler options (plus any options passed to c/2). If compilation
fails, the old beam file is preserved. Also adds c(Mod, Opts, Filter),
where the Filter argument allows you to remove old compiler options before
the new options are added.
Diffstat (limited to 'lib/stdlib/doc/src/shell.xml')
-rw-r--r-- | lib/stdlib/doc/src/shell.xml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/stdlib/doc/src/shell.xml b/lib/stdlib/doc/src/shell.xml index d6e8036d4e..f52bc39deb 100644 --- a/lib/stdlib/doc/src/shell.xml +++ b/lib/stdlib/doc/src/shell.xml @@ -165,12 +165,12 @@ <item> <p>Evaluates <c>shell_default:help()</c>.</p> </item> - <tag><c>c(File)</c></tag> + <tag><c>c(Mod)</c></tag> <item> - <p>Evaluates <c>shell_default:c(File)</c>. This compiles - and loads code in <c>File</c> and purges old versions of - code, if necessary. Assumes that the file and module names - are the same.</p> + <p>Evaluates <c>shell_default:c(Mod)</c>. This compiles and + loads the module <c>Mod</c> and purges old versions of the + code, if necessary. <c>Mod</c> can be either a module name or a + a source file path, with or without <c>.erl</c> extension.</p> </item> <tag><c>catch_exception(Bool)</c></tag> <item> |