Thread: [pure-lang-svn] SF.net SVN: pure-lang: [218] pure/trunk/pure.1.in
Status: Beta
Brought to you by:
agraef
From: <ag...@us...> - 2008-06-14 07:28:58
|
Revision: 218 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=218&view=rev Author: agraef Date: 2008-06-14 00:29:03 -0700 (Sat, 14 Jun 2008) Log Message: ----------- Update documentation. Modified Paths: -------------- pure/trunk/pure.1.in Modified: pure/trunk/pure.1.in =================================================================== --- pure/trunk/pure.1.in 2008-06-14 07:19:07 UTC (rev 217) +++ pure/trunk/pure.1.in 2008-06-14 07:29:03 UTC (rev 218) @@ -14,6 +14,9 @@ .B -n Suppress automatic inclusion of the prelude. .TP +.B -q +Quiet startup (suppresses sign-on message in interactive mode). +.TP .B -v Set verbosity level. See below for details. .TP @@ -883,13 +886,17 @@ .B -v Print information about variable symbols only. .PP -Output is piped through the -.BR more (1) -program to make it easier to read, as some of the options (in particular, +Note that some of the options (in particular, .B -c and .BR -d ) -may produce excessive amounts of information. +may produce excessive amounts of information. By setting the +.B PURE_MORE +environment variable accordingly, you can specify a shell command to be used +for paging, usually +.BR more (1) +or +.BR less (1). .PP For instance, to list all definitions in all loaded scripts (including the prelude), simply say: @@ -1188,6 +1195,11 @@ is not set, it defaults to some default location specified at installation time. .TP +.B PURE_MORE +Shell command to be used for paging through output of the +.B list +command, when the interpreter runs in interactive mode. +.TP .B PURE_PS Command prompt used in the interactive command loop (">\ " by default). .TP This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-14 07:32:39
|
Revision: 220 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=220&view=rev Author: agraef Date: 2008-06-14 00:32:48 -0700 (Sat, 14 Jun 2008) Log Message: ----------- Update documentation. Modified Paths: -------------- pure/trunk/pure.1.in Modified: pure/trunk/pure.1.in =================================================================== --- pure/trunk/pure.1.in 2008-06-14 07:30:09 UTC (rev 219) +++ pure/trunk/pure.1.in 2008-06-14 07:32:48 UTC (rev 220) @@ -2,7 +2,7 @@ .SH NAME pure \- the Pure interpreter .SH SYNOPSIS -\fBpure\fP [-h] [-i] [-n] [-v[\fIlevel\fP]] [\fIscript\fP ...] [-- \fIargs\fP ...] +\fBpure\fP [-h] [-i] [-n] [-q] [-v[\fIlevel\fP]] [\fIscript\fP ...] [-- \fIargs\fP ...] .SH OPTIONS .TP .B -h This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-14 09:37:44
|
Revision: 225 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=225&view=rev Author: agraef Date: 2008-06-14 02:37:52 -0700 (Sat, 14 Jun 2008) Log Message: ----------- Update documentation. Modified Paths: -------------- pure/trunk/pure.1.in Modified: pure/trunk/pure.1.in =================================================================== --- pure/trunk/pure.1.in 2008-06-14 08:52:48 UTC (rev 224) +++ pure/trunk/pure.1.in 2008-06-14 09:37:52 UTC (rev 225) @@ -3,6 +3,8 @@ pure \- the Pure interpreter .SH SYNOPSIS \fBpure\fP [-h] [-i] [-n] [-q] [-v[\fIlevel\fP]] [\fIscript\fP ...] [-- \fIargs\fP ...] +.br +\fBpure\fP [-h] [-i] [-n] [-q] [-v[\fIlevel\fP]] -x \fIscript\fP [\fIargs\fP ...] .SH OPTIONS .TP .B -h @@ -20,6 +22,9 @@ .B -v Set verbosity level. See below for details. .TP +.B -x +Execute script with given command line arguments. +.TP .B -- Stop option processing and pass the remaining command line arguments in the .B argv @@ -61,18 +66,42 @@ from where it is restored the next time you run the interpreter. .PP Options and source files are processed in the order in which they are given on -the command line. Processing of options and source files ends when the +the command line. Processing of options and source files ends when either the .B -- -option is encountered. Any following parameters are passed to the executing -script by means of the global +or the +.B -x +option is encountered. The +.B -x +option must be followed by the name of a script to be executed, which becomes +the ``main script'' of the application. In either case, any remaining +parameters are passed to the executing script by means of the global .B argc and .B argv -variables. Moreover, the +variables, denoting the number of arguments and the list of the actual +parameter strings, respectively. In the case of +.B -x +this also includes the script name as +.BR argv!0 . +The +.B -x +option is useful, in particular, to turn Pure scripts into executable programs +by including a ``shebang'' like +.sp +.nf +#! /usr/local/bin/pure -x +.fi +.sp +as the first line in your main script. (This trick only works with Unix +shells, though.) +.PP +On startup, the interpreter also defines the .B version -variable is set to the Pure interpreter version, and the +variable, which is set to the version string of the Pure interpreter, and the .B sysinfo -variable provides information about the host system. +variable, which provides a string identifying the host system. These are +useful if parts of your script depend on the particular version of the +interpreter and the system it runs on. .PP If available, the prelude script .B prelude.pure @@ -158,7 +187,10 @@ The language is free-format (blanks are insignificant). As indicated, definitions and expressions at the toplevel have to be terminated with a semicolon. Comments have the same syntax as in C++ (using // for line-oriented -and /* ... */ for multiline comments; the latter may not be nested). +and /* ... */ for multiline comments; the latter may not be nested). Lines +beginning with #! are treated as comments, too; as already discussed above, on +Unix-like systems this allows you to add a ``shebang'' to your main script in +order to turn it into an executable program. .PP On the surface, Pure is quite similar to other modern functional languages like Haskell and ML. But under the hood it is a much more dynamic and This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-14 10:20:11
|
Revision: 227 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=227&view=rev Author: agraef Date: 2008-06-14 03:20:10 -0700 (Sat, 14 Jun 2008) Log Message: ----------- Fix typo. Modified Paths: -------------- pure/trunk/pure.1.in Modified: pure/trunk/pure.1.in =================================================================== --- pure/trunk/pure.1.in 2008-06-14 09:56:59 UTC (rev 226) +++ pure/trunk/pure.1.in 2008-06-14 10:20:10 UTC (rev 227) @@ -89,7 +89,7 @@ by including a ``shebang'' like .sp .nf -#! /usr/local/bin/pure -x +#!/usr/local/bin/pure -x .fi .sp as the first line in your main script. (This trick only works with Unix This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-18 08:53:13
|
Revision: 256 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=256&view=rev Author: agraef Date: 2008-06-18 01:53:21 -0700 (Wed, 18 Jun 2008) Log Message: ----------- Update documentation. Modified Paths: -------------- pure/trunk/pure.1.in Modified: pure/trunk/pure.1.in =================================================================== --- pure/trunk/pure.1.in 2008-06-18 08:52:27 UTC (rev 255) +++ pure/trunk/pure.1.in 2008-06-18 08:53:21 UTC (rev 256) @@ -366,6 +366,20 @@ defined functions and constructors and thus there is no magic to figure out whether an equation is meant as a function definition or a pattern binding. .PP +Expressions are parsed according to the following precedence rules: Lambda +binds most weakly, followed by +.BR when , +.B with +and +.BR case , +followed by conditional expressions (\fBif\fP-\fBthen\fP-\fBelse\fP), followed +by the ``simple'' expressions (i.e., all other kinds of expressions involving +operators, function applications, constants, symbols and other primary +expressions). Precedence and associativity of operator symbols are given by +their declarations (in the prelude or the user's program), and function +application binds stronger than all operators. Parentheses can be used to +override default precedences and associativities as usual. +.PP At the toplevel, a Pure program basically consists of rules a.k.a. equations defining functions, variable definitions a.k.a. global ``pattern bindings'', and expressions to be evaluated. @@ -377,41 +391,11 @@ keyword .B otherwise denoting an empty guard which is always true (this is nothing but syntactic -sugar useful to point out the ``default'' case of a definition; the -interpreter just treats -.B otherwise -as a comment, so it can always be omitted). Moreover, the left-hand side can -be omitted if it is the same as for the previous rule. This provides a -convenient means to write out a collection of equations for the same left-hand -side which discriminates over different conditions: +sugar to point out the ``default'' case of a definition; the interpreter just +treats this as a comment). .sp -.nf -\fIlhs\fR = \fIrhs\fB if \fIguard\fR; - = \fIrhs\fB if \fIguard\fR; - ... - = \fIrhs\fB otherwise\fR; -.fi -.sp -Rules are used to define functions at the toplevel and in \fBwith\fP -expressions, as well as inside \fBcase\fP and \fBwhen\fP expressions for the -purpose of performing pattern bindings (however, for obvious reasons the forms -without a left-hand side or including a guard are not permitted in \fBwhen\fP -expressions). When matching against a function call or the subject term in a -\fBcase\fP expression, the rules are always considered in the order in which -they are written, and the first matching rule (whose guard evaluates to a -nonzero value, if applicable) is picked. (Again, the \fBwhen\fP construct is -treated differently, because each rule is actually a separate pattern -binding.) -.sp -In any case, the left-hand side pattern must not contain repeated variables -(i.e., rules must be ``left-linear''), except for the ``anonymous'' variable -`_' which matches an arbitrary value without binding a variable -symbol. Moreover, a left-hand side variable may be followed by one of the -special type tags \fB::int\fP, \fB::bigint\fP, \fB::double\fP, \fB::string\fP, -to indicate that it can only match a constant value of the corresponding -built-in type. (This is useful if you want to write rules matching \fIany\fP -object of one of these types; note that there is no way to write out all -``constructors'' for the built-in types, as there are infinitely many.) +Pure also provides some abbreviations for factoring out common left-hand or +right-hand sides in collections of rules; see below for details. .TP .B Global variable bindings: let\fR \fIlhs\fR = \fIrhs\fR; This binds every variable in the left-hand side pattern to the corresponding @@ -422,24 +406,77 @@ causes the given value to be evaluated (and the result to be printed, when running in interactive mode). .PP -Expressions are parsed according to the following precedence rules: Lambda -binds most weakly, followed by -.BR when , -.B with -and -.BR case , -followed by conditional expressions (\fBif\fP-\fBthen\fP-\fBelse\fP), followed -by the ``simple'' expressions (i.e., all other kinds of expressions involving -operators, function applications, constants, symbols and other primary -expressions). Precedence and associativity of operator symbols are given by -their declarations (in the prelude or the user's program), and function -application binds stronger than all operators. Parentheses can be used to -override default precedences and associativities as usual. +Basically, the same rule syntax is used to define functions at the toplevel +and in \fBwith\fP expressions, as well as inside \fBcase\fP and \fBwhen\fP +expressions for the purpose of performing pattern bindings (however, for +obvious reasons guards are not permitted in \fBwhen\fP expressions). When +matching against a function call or the subject term in a \fBcase\fP +expression, the rules are always considered in the order in which they are +written, and the first matching rule (whose guard evaluates to a nonzero +value, if applicable) is picked. (Again, the \fBwhen\fP construct is treated +differently, because each rule is actually a separate pattern binding.) .PP -For instance, here are two more function definitions showing most of these -elements in action: +In any case, the left-hand side pattern must not contain repeated variables +(i.e., rules must be ``left-linear''), except for the ``anonymous'' variable +`_' which matches an arbitrary value without binding a variable +symbol. Moreover, a left-hand side variable may be followed by one of the +special type tags \fB::int\fP, \fB::bigint\fP, \fB::double\fP, \fB::string\fP, +to indicate that it can only match a constant value of the corresponding +built-in type. (This is useful if you want to write rules matching \fIany\fP +object of one of these types; note that there is no way to write out all +``constructors'' for the built-in types, as there are infinitely many.) +.PP +The left-hand side of a rule can be omitted if it is the same as for the +previous rule. This provides a convenient means to write out a collection of +equations for the same left-hand side which discriminates over different +conditions: .sp .nf +\fIlhs\fR = \fIrhs\fB if \fIguard\fR; + = \fIrhs\fB if \fIguard\fR; + ... + = \fIrhs\fB otherwise\fR; +.fi +.PP +Pure also allows a collection of rules with different left-hand sides but the +same right-hand side(s) to be abbreviated as follows: +.sp +.nf +\fIlhs\fR | + ... +\fIlhs\fR = \fIrhs\fB; +.fi +.PP +This is useful if you need different specializations of the same rule which +use different type tags on the left-hand side variables. For instance: +.sp +.nf +fact n::int | +fact n::double | +fact n = n*fact(n-1) \fBif\fP n>0; + = 1 \fBotherwise\fP; +.fi +.PP +In fact, the left-hand sides don't have to be related at all, so that you can +also write something like: +.sp +.nf +foo x | bar y = x*y; +.fi +.PP +The same works in +.B case +expressions, which is convenient if different cases should be mapped to the +same value, e.g.: +.sp +.nf +\fBcase\fP ans \fBof\fP "y" | "Y" = 1; _ = 0; \fBend\fP; +.fi +.PP +Here are some more definitions showing most of the elements discussed above in +action: +.sp +.nf fact n = n*fact (n-1) \fBif\fP n>0; = 1 \fBotherwise\fP; @@ -454,7 +491,7 @@ facts; fibs; .fi .PP -And here's a little list comprehension example: Erathosthenes' classical prime +This is a little list comprehension example: Erathosthenes' classical prime sieve. .sp .nf @@ -480,11 +517,11 @@ (catmap (\eq -> if q mod p then [q] else []) qs) end; .fi .PP -List comprehensions are also a useful device to organize backtracking -searches. For instance, here's an algorithm for the n queens problem, which -returns the list of all placements of n queens on an n x n board (encoded as -lists of n pairs (i,j) with i = 1..n), so that no two queens hold each other -in check. +We mention in passing that list comprehensions are also a useful device to +organize backtracking searches. For instance, here's an algorithm for the n +queens problem, which returns the list of all placements of n queens on an n x +n board (encoded as lists of n pairs (i,j) with i = 1..n), so that no two +queens hold each other in check. .sp .nf queens n = search n 1 [] \fBwith\fP This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-19 00:05:03
|
Revision: 266 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=266&view=rev Author: agraef Date: 2008-06-18 17:05:07 -0700 (Wed, 18 Jun 2008) Log Message: ----------- Fix up version number in example. Modified Paths: -------------- pure/trunk/pure.1.in Modified: pure/trunk/pure.1.in =================================================================== --- pure/trunk/pure.1.in 2008-06-18 23:33:49 UTC (rev 265) +++ pure/trunk/pure.1.in 2008-06-19 00:05:07 UTC (rev 266) @@ -983,7 +983,7 @@ argc var argc = 0; argv var argv = []; sysinfo var sysinfo = "i686-pc-linux-gnu"; -version var version = "0.1"; +version var version = "@version@"; 4 variables .fi .PP This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-20 02:49:08
|
Revision: 270 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=270&view=rev Author: agraef Date: 2008-06-19 19:49:17 -0700 (Thu, 19 Jun 2008) Log Message: ----------- Fix some minor formatting glitches. Modified Paths: -------------- pure/trunk/pure.1.in Modified: pure/trunk/pure.1.in =================================================================== --- pure/trunk/pure.1.in 2008-06-20 02:07:32 UTC (rev 269) +++ pure/trunk/pure.1.in 2008-06-20 02:49:17 UTC (rev 270) @@ -432,19 +432,19 @@ conditions: .sp .nf -\fIlhs\fR = \fIrhs\fB if \fIguard\fR; - = \fIrhs\fB if \fIguard\fR; +\fIlhs\fR = \fIrhs\fP \fBif\fP \fIguard\fP; + = \fIrhs\fP \fBif\fP \fIguard\fP; ... - = \fIrhs\fB otherwise\fR; + = \fIrhs\fP \fBotherwise\fP; .fi .PP Pure also allows a collection of rules with different left-hand sides but the same right-hand side(s) to be abbreviated as follows: .sp .nf -\fIlhs\fR | +\fIlhs\fP | ... -\fIlhs\fR = \fIrhs\fB; +\fIlhs\fP = \fIrhs\fP; .fi .PP This is useful if you need different specializations of the same rule which @@ -513,8 +513,8 @@ .sp .nf > list primes -primes n = sieve (2..n) with sieve [] = []; sieve (p:qs) = p:sieve -(catmap (\eq -> if q mod p then [q] else []) qs) end; +primes n = sieve (2..n) \fBwith\fP sieve [] = []; sieve (p:qs) = p:sieve +(catmap (\eq -> if q mod p then [q] else []) qs) \fBend\fP; .fi .PP We mention in passing that list comprehensions are also a useful device to This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-22 22:54:15
|
Revision: 281 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=281&view=rev Author: agraef Date: 2008-06-22 15:54:24 -0700 (Sun, 22 Jun 2008) Log Message: ----------- Update documentation. Modified Paths: -------------- pure/trunk/pure.1.in Modified: pure/trunk/pure.1.in =================================================================== --- pure/trunk/pure.1.in 2008-06-22 21:07:57 UTC (rev 280) +++ pure/trunk/pure.1.in 2008-06-22 22:54:24 UTC (rev 281) @@ -392,10 +392,9 @@ .B otherwise denoting an empty guard which is always true (this is nothing but syntactic sugar to point out the ``default'' case of a definition; the interpreter just -treats this as a comment). -.sp -Pure also provides some abbreviations for factoring out common left-hand or -right-hand sides in collections of rules; see below for details. +treats this as a comment). Pure also provides some abbreviations for factoring +out common left-hand or right-hand sides in collections of rules; see section +RULE SYNTAX below for details. .TP .B Global variable bindings: let\fR \fIlhs\fR = \fIrhs\fR; This binds every variable in the left-hand side pattern to the corresponding @@ -405,27 +404,46 @@ A singleton expression at the toplevel, terminated with a semicolon, simply causes the given value to be evaluated (and the result to be printed, when running in interactive mode). -.PP +.SH RULE SYNTAX Basically, the same rule syntax is used to define functions at the toplevel -and in \fBwith\fP expressions, as well as inside \fBcase\fP and \fBwhen\fP -expressions for the purpose of performing pattern bindings (however, for -obvious reasons guards are not permitted in \fBwhen\fP expressions). When -matching against a function call or the subject term in a \fBcase\fP -expression, the rules are always considered in the order in which they are -written, and the first matching rule (whose guard evaluates to a nonzero -value, if applicable) is picked. (Again, the \fBwhen\fP construct is treated -differently, because each rule is actually a separate pattern binding.) +and in \fBwith\fP expressions, as well as inside \fBcase\fP, \fBwhen\fP and +\fBlet\fP expressions for the purpose of performing pattern bindings (however, +for obvious reasons guards are not permitted in \fBwhen\fP and \fBlet\fP +expressions). When matching against a function call or the subject term in a +\fBcase\fP expression, the rules are always considered in the order in which +they are written, and the first matching rule (whose guard evaluates to a +nonzero value, if applicable) is picked. (Again, the \fBwhen\fP construct is +treated differently, because each rule is actually a separate pattern +binding.) .PP In any case, the left-hand side pattern must not contain repeated variables (i.e., rules must be ``left-linear''), except for the ``anonymous'' variable `_' which matches an arbitrary value without binding a variable -symbol. Moreover, a left-hand side variable may be followed by one of the -special type tags \fB::int\fP, \fB::bigint\fP, \fB::double\fP, \fB::string\fP, -to indicate that it can only match a constant value of the corresponding -built-in type. (This is useful if you want to write rules matching \fIany\fP -object of one of these types; note that there is no way to write out all -``constructors'' for the built-in types, as there are infinitely many.) +symbol. .PP +A left-hand side variable may be followed by one of the special type tags +\fB::int\fP, \fB::bigint\fP, \fB::double\fP, \fB::string\fP, to indicate that +it can only match a constant value of the corresponding built-in type. (This +is useful if you want to write rules matching \fIany\fP object of one of these +types; note that there is no way to write out all ``constructors'' for the +built-in types, as there are infinitely many.) +.PP +Pure also supports Haskell-style ``as'' patterns of the form +.IB variable @ pattern +which binds the given variable to the expression matched by the subpattern +.I pattern +(in addition to the variables bound by +.I pattern +itself). This is convenient if the value matched by the subpattern is to be +used on the right-hand side of an equation. Syntactically, `as'' patterns are +primary expressions; if the subpattern is not a primary expression, it must be +parenthesized. For instance, the following function duplicates the head +element of a list: +.sp +.nf +foo xs@(x:_) = x:xs; +.fi +.PP The left-hand side of a rule can be omitted if it is the same as for the previous rule. This provides a convenient means to write out a collection of equations for the same left-hand side which discriminates over different @@ -438,6 +456,13 @@ = \fIrhs\fP \fBotherwise\fP; .fi .PP +For instance: +.sp +.nf +fact n = n*fact (n-1) \fBif\fP n>0; + = 1 \fBotherwise\fP; +.fi +.PP Pure also allows a collection of rules with different left-hand sides but the same right-hand side(s) to be abbreviated as follows: .sp @@ -464,7 +489,19 @@ foo x | bar y = x*y; .fi .PP -The same works in +However, this is most useful when using an ``as'' pattern to bind a common +variable to a parameter value +.I after +checking that it matches one of several possible argument patterns (which is +slightly more efficient than using an equivalent type-checking guard). E.g., +the following definition binds the xs variable to the parameter of foo, if it +is either the empty list or a list starting with an integer: +.sp +.nf +foo xs@[] | foo xs@(_::int:_) = ... xs ...; +.fi +.PP +The same construct also works in .B case expressions, which is convenient if different cases should be mapped to the same value, e.g.: @@ -473,13 +510,11 @@ \fBcase\fP ans \fBof\fP "y" | "Y" = 1; _ = 0; \fBend\fP; .fi .PP -Here are some more definitions showing most of the elements discussed above in -action: +Here are a few more examples of rules illustrating some of the constructs +introduced above and in the previous section. The first one is a definition of +a function which generates the Fibonacci numbers: .sp .nf -fact n = n*fact (n-1) \fBif\fP n>0; - = 1 \fBotherwise\fP; - fib n = a \fBwhen\fP a, b = fibs n \fBend\fP \fBwith\fP fibs n = 0, 1 \fBif\fP n<=0; = \fBcase\fP fibs (n-1) \fBof\fP @@ -487,12 +522,11 @@ \fBend\fP; \fBend\fP; -\fBlet\fP facts = map fact (1..10); \fBlet\fP fibs = map fib (1..100); -facts; fibs; +\fBlet\fP fibs = map fib (1..100); +fibs; .fi .PP -This is a little list comprehension example: Erathosthenes' classical prime -sieve. +A little list comprehension example (Erathosthenes' classical prime sieve): .sp .nf primes n = sieve (2..n) \fBwith\fP This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-23 01:33:36
|
Revision: 286 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=286&view=rev Author: agraef Date: 2008-06-22 18:33:45 -0700 (Sun, 22 Jun 2008) Log Message: ----------- Update documentation. Modified Paths: -------------- pure/trunk/pure.1.in Modified: pure/trunk/pure.1.in =================================================================== --- pure/trunk/pure.1.in 2008-06-23 00:39:49 UTC (rev 285) +++ pure/trunk/pure.1.in 2008-06-23 01:33:45 UTC (rev 286) @@ -178,8 +178,8 @@ .sp .nf > // my first Pure example -> fact 1 = 1; -> fact n::int = n*fact (n-1) \fBif\fP n>1; +> fact 0 = 1; +> fact n::int = n*fact (n-1) \fBif\fP n>0; > \fBlet\fP x = fact 10; x; 3628800 .fi @@ -215,22 +215,31 @@ (a+b)*(a+b) .fi .PP -The Pure language provides built-in support for machine integers (32 bit), -bigints (implemented using GMP), floating point values (double precision -IEEE), character strings (UTF-8 encoded) and generic C pointers (these don't -have a syntactic representation in Pure, though, so they need to be created -with external C functions). Truth values are encoded as machine integers (as -you might expect, zero denotes ``false'' and any non-zero value ``true''). +In fact, all the Pure interpreter does is evaluating expressions in a symbolic +fashion, rewriting expressions using the equations supplied by the programmer, +until no more equations are applicable. The result of this process is called a +.I "normal form" +which represents the ``value'' of the original expression. Keeping with the +tradition of term rewriting, there's no distinction between ``defined'' and +``constructor'' function symbols in Pure; any function symbol (or operator) +also acts as a constructor if it happens to occur in a normal form term. .PP Expressions are generally evaluated from left to right, innermost expressions first, i.e., using -.I call by value +.I "call by value" semantics. Pure also has a few built-in special forms (most notably, conditional expressions and the short-circuit logical connectives && and ||) which take some of their arguments using -.I call by name +.I "call by name" semantics. .PP +The Pure language provides built-in support for machine integers (32 bit), +bigints (implemented using GMP), floating point values (double precision +IEEE), character strings (UTF-8 encoded) and generic C pointers (these don't +have a syntactic representation in Pure, though, so they need to be created +with external C functions). Truth values are encoded as machine integers (as +you might expect, zero denotes ``false'' and any non-zero value ``true''). +.PP Expressions consist of the following elements: .TP .B Constants: \fR4711, 4711L, 1.2e-3, \(dqHello,\ world!\en\(dq @@ -266,18 +275,18 @@ .TP .B Function and variable symbols: \fRfoo, foo_bar, BAR, bar2 These consist of the usual sequence of ASCII letters (including the -underscore) and digits, starting with a letter. Case is significant, but it -doesn't carry any meaning (that's in contrast to languages like Prolog and Q, -where variables must be capitalized). Pure simply distinguishes function and -variable symbols on the left-hand side of an equation by the ``head = -function'' rule: Any symbol which occurs as the head symbol of a function +underscore) and digits, starting with a letter. The `_' symbol, when occurring +on the left-hand side of an equation, is special; it denotes the +.IR "anonymous variable" . +The case of identifiers is significant, but it doesn't carry any meaning +(that's in contrast to languages like Prolog and Q, where variables must be +capitalized). Instead, Pure distinguishes function and variable symbols on the +left-hand side of an equation by the ``head = function'' rule: Any symbol +(except the anonymous variable) which occurs as the head symbol of a function application is a function symbol, all other symbols are variables -- except symbols explicitly declared as ``constant'' a.k.a. .B nullary -symbols, see below. Another important thing to know is that in Pure, keeping -with the tradition of term rewriting, there's no distinction between -``defined'' and ``constructor'' function symbols; any function symbol can also -act as a constructor if it happens to occur in a normal form term. +symbols, see below. .TP .B Operator and constant symbols: \fRx+y, x==y, \fBnot\fP\ x As indicated, these take the form of an identifier or a sequence of ASCII @@ -417,9 +426,8 @@ binding.) .PP In any case, the left-hand side pattern must not contain repeated variables -(i.e., rules must be ``left-linear''), except for the ``anonymous'' variable -`_' which matches an arbitrary value without binding a variable -symbol. +(i.e., rules must be ``left-linear''), except for the anonymous variable `_' +which matches an arbitrary value without binding a variable symbol. .PP A left-hand side variable may be followed by one of the special type tags \fB::int\fP, \fB::bigint\fP, \fB::double\fP, \fB::string\fP, to indicate that @@ -1180,23 +1188,20 @@ x1 ... xn occurring on (or inside) the left-hand side of an equation, pattern binding, or pattern-matching lambda expression, is always interpreted as a literal function symbol (not a variable). This implies that you cannot match -the ``function'' component of an application against a variable, and thus you -cannot directly define a generic function which operates on arbitrary function -applications. As a remedy, the prelude provides three operations to handle -such objects: -.BR applp , -a predicate which checks whether a given expression is a function application, -and -.B fun -and -.BR arg , -which determine the function and argument parts of such an expression, -respectively. (This may seem a little awkward, but as a matter of fact the -``head = function'' rule is quite convenient since it covers the common cases -without forcing the programmer to declare ``constructor'' symbols (except -nullary symbols). Also note that in standard term rewriting you do not have -rules parameterizing over the head symbol of a function application either.) +the ``function'' component of an application against a variable, at least not +directly. However, an anonymous ``as'' pattern like f@_ will do the trick, +since the anonymous variable is always recognized, even if it occurs as the +head symbol of a function application. .PP +This may seem a little awkward, but as a matter of fact the ``head = +function'' rule is quite useful since it covers the common cases without +forcing the programmer to declare ``constructor'' symbols (except nullary +symbols). On the other hand, generic rules operating on arbitrary function +applications are not all that common, so having to ``escape'' a variable using +the anonymous ``as'' pattern trick is a small price to pay for that +convenience. Moreover, the prelude also provides operations to recognize and +decompose function applications. +.PP .B Numeric types. If possible, you should always decorate numeric variables on the left-hand sides of function definitions with the appropriate type tags, like @@ -1204,7 +1209,17 @@ or .BR ::double . This often helps the compiler to generate better code and makes your programs -run faster. +run faster. The `|' syntax makes it easy to add the necessary specializations +of existing rules to your program. E.g., taking the polymorphic implementation +of the factorial as an example, you only have to add a left-hand side with the +appropriate type tag to make that definition go as fast as possible for the +special case of machine integers: +.sp +.nf +fact n::int | +fact n = n*fact(n-1) \fBif\fP n>0; + = 1 \fBotherwise\fP; +.fi .PP Talking about the built-in types, please note that .B int This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-23 10:25:57
|
Revision: 288 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=288&view=rev Author: agraef Date: 2008-06-23 03:26:04 -0700 (Mon, 23 Jun 2008) Log Message: ----------- Elaborate on declaration syntax. Modified Paths: -------------- pure/trunk/pure.1.in Modified: pure/trunk/pure.1.in =================================================================== --- pure/trunk/pure.1.in 2008-06-23 01:41:19 UTC (rev 287) +++ pure/trunk/pure.1.in 2008-06-23 10:26:04 UTC (rev 288) @@ -679,9 +679,11 @@ \fBinfixl\fP 7 * / div mod ; .fi .sp -Moreover, constant symbols are introduced using a declaration of -the form: +Note that to declare multiple symbols in a single declaration, you just list +them all with whitespace in between. .sp +Similarly, constant symbols are introduced using a declaration of the form: +.sp .nf \fBnullary \fIsymbol\fR ...; .fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-23 11:10:32
|
Revision: 289 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=289&view=rev Author: agraef Date: 2008-06-23 04:10:39 -0700 (Mon, 23 Jun 2008) Log Message: ----------- Add some remarks about implementation restrictions of 'as' patterns. Modified Paths: -------------- pure/trunk/pure.1.in Modified: pure/trunk/pure.1.in =================================================================== --- pure/trunk/pure.1.in 2008-06-23 10:26:04 UTC (rev 288) +++ pure/trunk/pure.1.in 2008-06-23 11:10:39 UTC (rev 289) @@ -1185,6 +1185,28 @@ them around as function values or partial applications, but in this case they lose all their special call-by-name argument processing. .PP +.B ``As'' patterns. +In the current implementation, ``as'' patterns cannot be placed on the +``spine'' of a function definition. Thus rules like the following, which have +the pattern somewhere in the head of the left-hand side, will all provoke an +error message from the compiler: +.sp +.nf +a@foo x y = a,x,y; +a@(foo x) y = a,x,y; +a@(foo x y) = a,x,y; +.fi +.PP +This is because the spine of a function application is not available when the +function is called at runtime. ``As'' patterns in pattern bindings are not +affected by this restriction since the entire value to be matched is available +at runtime. For instance: +.sp +.nf +> \fBcase\fP bar 99 \fBof\fP y@(bar x) = y,x+1; \fBend\fP; +bar 99,100 +.fi +.PP .B Manipulating function applications. The ``head = function'' rule means that the head symbol f of an application f x1 ... xn occurring on (or inside) the left-hand side of an equation, pattern This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-26 09:09:41
|
Revision: 315 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=315&view=rev Author: agraef Date: 2008-06-26 02:09:49 -0700 (Thu, 26 Jun 2008) Log Message: ----------- Update documentation. Modified Paths: -------------- pure/trunk/pure.1.in Modified: pure/trunk/pure.1.in =================================================================== --- pure/trunk/pure.1.in 2008-06-26 08:57:06 UTC (rev 314) +++ pure/trunk/pure.1.in 2008-06-26 09:09:49 UTC (rev 315) @@ -134,8 +134,9 @@ paths; this can be helpful to debug tricky variable binding issues); .TP .B 4 (0x4) -adds abstract code snippets (matching automata etc.; you probably want to see -this only when working on the guts of the interpreter). +adds descriptions of the matching automata for the left-hand sides of +equations (you probably want to see this only when working on the guts of the +interpreter). .TP .B 8 (0x8) dumps the ``real'' output code (LLVM assembler, which is as close to the @@ -952,12 +953,14 @@ formats. This command recognizes the following options. Options may be combined, thus, e.g., \fBlist\fP -tvl is the same as \fBlist\fP -t -v -l. .TP -.B -c -Annotate printed definitions with compiled code (matching automata). Works -like the +.B -a +Disassembles pattern matching automata. Works like the .B -v4 option of the interpreter. .TP +.B -c +Print information about constant symbols. +.TP .B -d Disassembles LLVM IR, showing the generated LLVM assembler code of a function. Works like the @@ -971,7 +974,7 @@ option of the interpreter. .TP .B -f -Print information about function symbols only. +Print information about function symbols. .TP .B -g Indicates that the following symbols are actually shell glob patterns and that @@ -997,10 +1000,19 @@ definition levels. .TP .B -v -Print information about variable symbols only. +Print information about variable symbols. .PP +If none of the +.BR -c , +.B -f +and +.B -v +options are specified, then all kinds of symbols (constants, functions, +variables) are printed, otherwise only the specified categories will be +listed. +.PP Note that some of the options (in particular, -.B -c +.B -a and .BR -d ) may produce excessive amounts of information. By setting the This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-26 23:12:38
|
Revision: 316 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=316&view=rev Author: agraef Date: 2008-06-26 16:12:44 -0700 (Thu, 26 Jun 2008) Log Message: ----------- Update documentation. Modified Paths: -------------- pure/trunk/pure.1.in Modified: pure/trunk/pure.1.in =================================================================== --- pure/trunk/pure.1.in 2008-06-26 09:09:49 UTC (rev 315) +++ pure/trunk/pure.1.in 2008-06-26 23:12:44 UTC (rev 316) @@ -172,10 +172,10 @@ along with additional debugging information. .SH PURE OVERVIEW .PP -Pure is a fairly simple language. Programs are simply collections of -equational rules defining functions, \fBlet\fP commands binding global -variables, and expressions to be evaluated. Here's a simple example, entered -interactively in the interpreter: +Pure is a fairly simple language. Programs are collections of equational rules +defining functions, \fBdef\fP and \fBlet\fP commands binding global constant +and variable symbols, and expressions to be evaluated. Here's a simple +example, entered interactively in the interpreter: .sp .nf > // my first Pure example @@ -185,7 +185,7 @@ 3628800 .fi .PP -The language is free-format (blanks are insignificant). As indicated, +The language is free-format (whitespace is insignificant). As indicated, definitions and expressions at the toplevel have to be terminated with a semicolon. Comments have the same syntax as in C++ (using // for line-oriented and /* ... */ for multiline comments; the latter may not be nested). Lines @@ -281,13 +281,14 @@ .IR "anonymous variable" . The case of identifiers is significant, but it doesn't carry any meaning (that's in contrast to languages like Prolog and Q, where variables must be -capitalized). Instead, Pure distinguishes function and variable symbols on the -left-hand side of an equation by the ``head = function'' rule: Any symbol -(except the anonymous variable) which occurs as the head symbol of a function -application is a function symbol, all other symbols are variables -- except -symbols explicitly declared as ``constant'' a.k.a. +capitalized). Instead, Pure distinguishes function and variable symbols by +their position on the left-hand side of an equation, using the ``head = +function'' rule: Any symbol (except the anonymous variable) which occurs as +the head symbol of a function application is a function symbol, all other +symbols are variables (except symbols explicitly declared as ``constant'' +a.k.a. .B nullary -symbols, see below. +symbols, see below). .TP .B Operator and constant symbols: \fRx+y, x==y, \fBnot\fP\ x As indicated, these take the form of an identifier or a sequence of ASCII @@ -352,30 +353,47 @@ multiple lambda variables in one go, such as \e(x,y)\ ->\ x*y. .TP .B Case expressions: case\fR\ x\ \fBof\fR\ \fIrule\fR;\ ...\ \fBend -Matches an expression, discriminating over a number of different patterns; -similar to the Haskell \fBcase\fP construct. +Matches an expression, discriminating over a number of different cases, +similar to the Haskell \fBcase\fP construct. The expression x is matched in +turn against each left-hand side pattern in the rule list, and the first +pattern which matches x gives the value of the entire expression, by +evaluating the corresponding right-hand side with the variables in the pattern +bound to their corresponding values. .TP .B When expressions: \fRx\ \fBwhen\fR\ \fIrule\fR;\ ...\ \fBend An alternative way to bind local variables by matching a collection of subject terms against corresponding patterns. Similar to Aardappel's \fBwhen\fP -construct, but Pure allows more than one definition. Note that multiple -definitions in a \fBwhen\fP clause are processed from left to right, so that -later definitions may refer to the variables in earlier ones. In fact, a -\fBwhen\fP expression with multiple definitions is treated like several -nested \fBwhen\fP expressions, with the first binding being the ``outermost'' -one. +construct. A single binding such as x \fBwhen\fP u = v \fBend\fP is equivalent +to \fBcase\fP v \fBof\fP u = x \fBend\fP, but the former is often more +convenient to write. In difference to Aardappel, Pure also allows multiple +definitions in a single \fBwhen\fP clause, which are processed from left to +right, so that later definitions may refer to the variables in earlier +ones. In fact, a \fBwhen\fP expression with multiple definitions is treated +like several nested \fBwhen\fP expressions, with the first binding being the +``outermost'' one. .TP .B With expressions: \fRx\ \fBwith\fR\ \fIrule\fR;\ ...\ \fBend\fR -Defines local functions. Like Haskell's \fBwhere\fP construct, but can be used -anywhere inside an expression (just like Aardappel's \fBwhere\fP, but Pure -uses the keyword \fBwith\fP which better lines up with \fBcase\fP and -\fBwhen\fP). Also note that while Haskell lets you do \fIboth\fP function -definitions and ``pattern bindings'' in its \fBwhere\fP clauses, in Pure you -have to use \fBwith\fP for the former and \fBwhen\fP for the latter. This is -necessary because Pure, in contrast to Haskell, does not distinguish between -defined functions and constructors and thus there is no magic to figure out -whether an equation is meant as a function definition or a pattern binding. +Defines local functions. Like Haskell's \fBwhere\fP construct, but it can be +used anywhere inside an expression (just like Aardappel's \fBwhere\fP, but +Pure uses the keyword \fBwith\fP which better lines up with \fBcase\fP and +\fBwhen\fP). Several functions can be defined in a single \fBwith\fP clause, +and the definitions may consist of as many equations as you want. .PP +Syntactically, the equational rules in definitions always look the same (see +RULE SYNTAX below), therefore it is important to note the differences between +\fBwith\fP expressions which define local functions, and the local variable +bindings performed by \fBcase\fP and \fBwhen\fP expressions; the latter are +also called \fIpattern bindings\fP. +.PP +While Haskell lets you do \fIboth\fP function definitions and pattern bindings +in its \fBwhere\fP clauses, in Pure you have to use \fBwith\fP for the former +and \fBwhen\fP for the latter. This is necessary because Pure does not +distinguish between defined functions and constructors, and thus there is no +magic to figure out whether an equation like `foo x = y' by itself is meant as +a definition of a function foo with formal parameter x and return value y, or +a definition binding the local variable x by matching the constructor pattern +foo x against the value y. +.PP Expressions are parsed according to the following precedence rules: Lambda binds most weakly, followed by .BR when , @@ -390,12 +408,11 @@ application binds stronger than all operators. Parentheses can be used to override default precedences and associativities as usual. .PP -At the toplevel, a Pure program basically consists of rules a.k.a. equations -defining functions, variable definitions a.k.a. global ``pattern bindings'', -and expressions to be evaluated. +At the toplevel, a Pure program basically consists of equations defining +functions, constant and variable definitions, and expressions to be evaluated. .TP .B Rules: \fIlhs\fR = \fIrhs\fR; -The basic form can also be augmented with a condition \fBif\ \fIguard\fR +The basic form can also be augmented with a condition \fBif\fP\ \fIguard\fP tacked on to the end of the rule (which restricts the applicability of the rule to the case that the guard evaluates to a nonzero integer), or the keyword @@ -407,24 +424,34 @@ RULE SYNTAX below for details. .TP .B Global variable bindings: let\fR \fIlhs\fR = \fIrhs\fR; -This binds every variable in the left-hand side pattern to the corresponding -subterm of the evaluated right-hand side. +Binds every variable in the left-hand side pattern to the corresponding +subterm of the evaluated right-hand side. This works like a pattern binding in +a \fBwhen\fP clause, but serves to bind \fIglobal\fP variables occurring free +on the right-hand side of other function and variable definitions. .TP +.B Constant bindings: def\fR \fIlhs\fR = \fIrhs\fR; +An alternative form of \fBlet\fP which binds constant symbols rather than +variables. Like \fBlet\fP, this binds the variables on the left-hand side to +the corresponding values on the evaluated right-hand side. The difference is +that constant symbols can only be defined once, after which their values are +substituted directly into the right-hand sides of other definitions, rather +than being evaluated at runtime. +.TP .B Toplevel expressions: \fIexpr\fR; A singleton expression at the toplevel, terminated with a semicolon, simply causes the given value to be evaluated (and the result to be printed, when running in interactive mode). .SH RULE SYNTAX Basically, the same rule syntax is used to define functions at the toplevel -and in \fBwith\fP expressions, as well as inside \fBcase\fP, \fBwhen\fP and -\fBlet\fP expressions for the purpose of performing pattern bindings (however, -for obvious reasons guards are not permitted in \fBwhen\fP and \fBlet\fP -expressions). When matching against a function call or the subject term in a -\fBcase\fP expression, the rules are always considered in the order in which -they are written, and the first matching rule (whose guard evaluates to a -nonzero value, if applicable) is picked. (Again, the \fBwhen\fP construct is -treated differently, because each rule is actually a separate pattern -binding.) +and in \fBwith\fP expressions, as well as inside \fBcase\fP, \fBwhen\fP, +\fBlet\fP and \fBdef\fP constructs for the purpose of performing pattern +bindings (however, for obvious reasons guards are not permitted in \fBwhen\fP, +\fBlet\fP and \fBdef\fP clauses). When matching against a function call or the +subject term in a \fBcase\fP expression, the rules are always considered in +the order in which they are written, and the first matching rule (whose guard +evaluates to a nonzero value, if applicable) is picked. (Again, the \fBwhen\fP +construct is treated differently, because each rule is actually a separate +pattern binding.) .PP In any case, the left-hand side pattern must not contain repeated variables (i.e., rules must be ``left-linear''), except for the anonymous variable `_' @@ -877,9 +904,9 @@ Change the current working dir. .TP .B "clear \fR[\fIsymbol\fP ...]\fP" -Purge the definitions of the given symbols (functions or global variables). If -no symbols are given, purge \fIall\fP definitions (after confirmation) made -after the most recent +Purge the definitions of the given symbols (functions, constants or global +variables). If no symbols are given, purge \fIall\fP definitions (after +confirmation) made after the most recent .B save command (or the beginning of the interactive session). See the \fBDEFINITION LEVELS AND OVERRIDE MODE\fP section below for details. @@ -1238,7 +1265,72 @@ convenience. Moreover, the prelude also provides operations to recognize and decompose function applications. .PP -.B Numeric types. +.B Constant and variable definitions. +Defined constants (symbols bound with \fBdef\fP) are somewhat limited in scope +compared to (\fBlet\fP-bound) variable definitions, since the value bound to +the constant symbol must be usable at compile time, so that it can be +substituted into other definitions. Thus, while there is no \fIa priori\fP +restriction on the computations you can perform to obtain the value of the +constant, the value must not be a pointer object (other than the null +pointer), or an anonymous closure (which also rules out local functions, +because these cannot be referred to by their names at the toplevel), or an +aggregate value containing any such values. +.PP +Global variables are also more versatile in that they can be redefined at any +time, which will immediately affect all uses of the variable in function +definitions. For instance: +.sp +.nf +> foo x = c*x; +> foo 99; +c*99 +> let c = 2; foo 99; +198 +> let c = 3; foo 99; +297 +.fi +.PP +This works pretty much like global variables in imperative languages, but in +Pure the value of a global variable can \fInot\fP be changed inside a function +definition. Thus referential transparency is unimpaired; while the value of an +expression depending on a global variable may change between different +computations, the variable will always take the same value in a single +evaluation. +.PP +Constant symbols work differently in that they cannot be redefined (that's +their purpose after all) and will only take effect on subsequent +definitions. E.g., continuing the previous example: +.sp +.nf +> def d = 2; +> bar x = d*x; +> list foo bar +bar x = 2*x; +foo x = c*x; +> bar 99; +198 +> def d = 3; +<stdin>:9.0-8: symbol 'd' is already defined as a constant +.fi +.PP +Well, in fact it \fIis\fP possible to redefine constant symbols when running +the interpreter in interactive mode, but only after the old definition is +purged with the \fBclear\fP command, and this won't affect any other existing +definitions: +.sp +.nf +> clear d +> def d = 3; +> list bar +bar x = 2*x; +.fi +.PP +(You'll also have to purge any existing definition of a variable if you want +to redefine it as a constant, or vice versa, since Pure won't let you redefine +an existing constant or variable as a different kind of symbol. The same also +holds if a symbol is currently defined as a function.) +.PP +.B Numeric calculations. If possible, you should always decorate numeric variables on the left-hand sides of function definitions with the appropriate type tags, like .B ::int @@ -1257,7 +1349,7 @@ = 1 \fBotherwise\fP; .fi .PP -Talking about the built-in types, please note that +Also note that .B int (the machine integers) and .B bigint @@ -1268,6 +1360,35 @@ constant like `0' only matches machine integers, not bigints; for the latter you'll have to use the ``big L'' notation `0L'. .PP +When definining a function in terms of numeric values bound to a symbol, it's +usually better to use a constant symbol rather than a variable for that +purpose, since this will often allow the compiler to generate better code +using constant folding and similar techniques. Example: +.sp +.nf +> extern double atan(double); +> def pi = 4*atan 1.0; +> foo x = 2*pi*x; +> list foo +foo x = 2*3.14159265358979*x; +.fi +.PP +(If you take a look at the disassembled code for this function, you will find +that the value 2*3.14159265358979 has actually been computed at compile time.) +.PP +Also, the LLVM backend will eliminate dead code automagically, which enables +you to employ a constant computed at runtime to configure your code for +different environments, without any runtime penalties: +.sp +.nf +> def running_on_windows = index sysinfo "mingw32" >= 0; +> foo x = something x if running_on_windows; +> = something_else x otherwise; +.fi +.PP +In this case the code for one of the branches of foo will be completely +eliminated, depending on whether your script runs on Windows or not. +.PP .B External C functions. The interpreter always takes your .B extern This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-07-03 00:23:38
|
Revision: 375 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=375&view=rev Author: agraef Date: 2008-07-02 17:23:46 -0700 (Wed, 02 Jul 2008) Log Message: ----------- Update documentation. Modified Paths: -------------- pure/trunk/pure.1.in Modified: pure/trunk/pure.1.in =================================================================== --- pure/trunk/pure.1.in 2008-07-03 00:19:47 UTC (rev 374) +++ pure/trunk/pure.1.in 2008-07-03 00:23:46 UTC (rev 375) @@ -165,8 +165,10 @@ .B -n option and specify the .B prelude.pure -file explicitly on the command line. Alternatively, you can also use the -interactive +file explicitly on the command line. Verbose output is also suppressed for +modules imported through a +.B using +clause. As a remedy, you can use the interactive .B list command (see the \fBINTERACTIVE USAGE\fP section below) to list definitions along with additional debugging information. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |