Skip to content
Browse files

More documentation.

  • Loading branch information...
1 parent 56a7d9d commit 9283062ec000cf14b4c8f9413f5393c90b213d11 @rvirding committed Oct 14, 2009
Showing with 25 additions and 15 deletions.
  1. +4 −4 doc/lfe_comp.txt
  2. +2 −2 doc/lfe_gen.txt
  3. +13 −5 doc/lfe_shell.txt
  4. +6 −4 doc/user_guide.txt
View
8 doc/lfe_comp.txt
@@ -63,12 +63,12 @@ file(FileName, Options) -> CompRet
the current directory.
report
- Do not return the errors and warnings but print them
- out insted. This is the default.
+ Print the errors and warnings as they occur.
return
- Return the errors and warnings instead of printing
- them.
+ Return an extra return field containing Warnings on
+ success or the errors and warnings in
+ {error,Errors,Warnings} when there are errors.
debug_print
Causes the compiler to print a lot of debug
View
4 doc/lfe_gen.txt
@@ -103,8 +103,8 @@ Example
CatchAll = [f,[':',erlang,error,
[tuple,unknown_feature,[quote,Param],f]]],
%% Build case clauses
- Cls = foldr(fun ({Feat,Value}, Cls) ->
- [[Feat,[quote,Value]]|Cls]
+ Cls = foldr(fun ({Field,Value}, Cls) ->
+ [[[quote,Field],[quote,Value]]|Cls]
end, [CatchAll], Params),
%% Build function.
Func = [defun,Param,[f],['case',f,Cls]],
View
18 doc/lfe_shell.txt
@@ -39,6 +39,11 @@ DESCRIPTION
Remove all function and macro definitions except the
default ones.
+ (set Pattern Expr)
+ Evaluate Expr ad match the result with Pattern binding
+ variables in it. These variables can then be used in
+ the shell and also rebound in another set.
+
(: c Command Arg ...)
All the commands in the standard Erlang shell can be
reached in this way.
@@ -71,16 +76,19 @@ DESCRIPTION
Starting the LFE shell
+ The best way is probably to start Erlang directly running the
+ LFE shell with:
+
+ erl -noshell -noinput -s lfe_boot start
+
+ This can easily be put in a shell script.
+
From a normal Erlang shell the best way to start the shell is
by calling:
17> lfe_shell:server().
- A modified user_drv.erl from the standard Erlang distribution
- has been provided which allows to start a specific local
- shell, not just the default Erlang shell. If this version of
- user_drv.beam is placed in the standard load path then giving
- the user switch commands:
+ Giving the user switch commands:
--> s lfe_shell
--> c
View
10 doc/user_guide.txt
@@ -19,9 +19,9 @@ Supported Core forms
(tuple e ... )
(binary seg ... ) where seg is
byte or
- (val integer|float|binary|bitstring
+ (val integer|float|binary|bitstring|bytes|bits
(size n) (unit n)
- big-endian|little-endian|native-endian
+ big-endian|little-endian|native-endian|little|native|big
signed|unsigned)
(lambda (arg ...) ...)
(match-lambda - Matches clauses
@@ -73,6 +73,7 @@ Supported macro forms
(call 'mod 'func arg ... )
(?) - Receive next message
(++ ... )
+(list* ...)
(let* (...) ... ) - Sequential let's
(flet ((name (arg ...) ...)
...)
@@ -219,7 +220,7 @@ Module definition
(import (from mod (f1 2) (f2 1) ... )
(rename mod ((f1 2) sune) ((f2 1) kurt) ... ))
(import (prefix mod mod-prefix)) - NYI
- (attr-1 value-1)
+ (attr-1 value-1 value-2)
... )
Can have multiple export and import declarations within module
@@ -342,6 +343,7 @@ field-name value to get non-default values. E.g. for
=> (make-person {{field value}} ... )
(match-person {{field value}} ... )
+ (is-person r)
(set-person r {{field value}} ... )
(person-name r)
(set-person-name r name)
@@ -359,7 +361,7 @@ field-name value to get non-default values. E.g. for
(match-person name name age 55)
Will match a person with age 55 and bind the variable name to
- the name field of the record. Can use any variable name here
+ the name field of the record. Can use any variable name here.
(set-person john age 35 address "front street")

0 comments on commit 9283062

Please sign in to comment.
Something went wrong with that request. Please try again.