aboutsummaryrefslogtreecommitdiffstats
path: root/system/doc/reference_manual
AgeCommit message (Collapse)Author
2016-02-17Implement ?FUNCTION_NAME and ?FUNCTION_ARITY macrosBjörn Gustavsson
For a long time, users have asked for one or more macros that would return the name and arity of the current function. We could define a single ?FUNCTION macro that would return a {Name,Arity} tuple. However, to access just the name or just the arity for the function, element/2 must be used. That would limit its usefulness, because element/2 is not allowed in all contexts. Therefore, it seems that we will need two macros. ?FUNCTION_NAME that expands to the name of the current function and ?FUNCTION_ARITY that expands to arity of the current function. Converting the function name to a string can be done like this: f() -> atom_to_list(?FUNCTION_NAME) ++ "/" ++ integer_to_list(?FUNCTION_ARITY). f/0 will return "f/0". The BEAM compiler will evaluate the entire expression at compile-time, so there will not be any run-time penalty for the function calls. The implementation is non-trivial because the preprocessor is run before the parser. One way to implement the macros would be to replace them with some placeholder and then let the parser or possibly a later pass replace the placeholder with correct value. That could potentially slow down the compiler and cause incompatibilities for parse transforms. Another way is to let the preprocessor do the whole job. That means that the preprocessor will have to scan the function head to find out the name and arity. The scanning of the function head can be delayed until the first occurrence of a ?FUNCTION_NAME or ?FUNCTION_ARITY. I have chosen the second way because it seems less likely to cause weird compatibility problems.
2016-01-26Delete a couple of leftover chars in Dialyzer docLuca Favatella
2016-01-20doc: Update a refman exampleHans Bolinder
2015-12-15doc: Remove 'is_subtype' from Types and Function SpecificationsHans Bolinder
It is harder to remove is_subtype from the parser since the abstract format does not separate is_subtype from the '::' syntax.
2015-12-07doc: Fix some minor issues in Types and Function SpecificationsHans Bolinder
2015-10-27Remove mention of erlang:faultMagnus Henoch
erlang:fault no longer exists, so don't mention it in the reference manual. Also fix minor markup issue in following paragraph.
2015-09-08doc: Update term comparison with MapsBjörn-Egil Dahlberg
2015-06-18Change license text to APLv2Bruce Yinhe
2015-05-08Merge branch 'richcarl/md5-fixes'Björn Gustavsson
* richcarl/md5-fixes: Set module_info md5 for native modules properly Add module_info entry for native code Gracefully handle empty md5 field in module_info Remove 'imports' key from spec of get_module_info()
2015-05-08dialyzer: document the type identifier()Hans Bolinder
2015-05-07Set module_info md5 for native modules properlyRichard Carlsson
Use the md5 of the native code chunk instead of the Beam code md5.
2015-05-07Add module_info entry for native codeRichard Carlsson
2015-03-26doc: Use module() in the definition of the built-in type mfa()Hans Bolinder
2015-03-17Correct links in the system documentationHans Bolinder
2015-03-12Update Erlang Reference ManualHans Bolinder
Language cleaned up by the technical writers xsipewe and tmanevik from Combitech. Proofreading and corrections by Hans Bolinder.
2015-01-14dialyzer: Introduce module local suppression of warningsHans Bolinder
The -dialyzer() attribute can be used for suppressing warnings in a module by specifying functions or warning options. It can also be used for requesting warnings in a module.
2014-11-27Merge branch 'maint'Marcus Arendt
2014-11-27Merge branch 'mururu/typespec-doc-about-function/OTP-12327' into maintMarcus Arendt
* mururu/typespec-doc-about-function/OTP-12327: Add infometion about function()
2014-11-24Merge branch 'maint'Marcus Arendt
2014-11-21Add infometion about function()Yuki Ito
2014-11-20Fix spelling and grammarDerek Brown
2014-11-18Merge branch 'maint'Siri Hansen
2014-11-11Remove comments about unicode atoms in OTP 18Siri Hansen
There was once a plan to implement support for unicode atoms in OTP 18. This plan has been stopped until further notice, and the information about this is now removed from the documentation.
2014-11-07Merge branch 'maint'Bruce Yinhe
2014-11-05Section reference number incorrectjmrepetti
2014-07-02Merge branch 'maint'Bruce Yinhe
2014-06-29rephrase sentence in process links docWasif Malik
2014-06-18Merge branch 'maint'Björn-Egil Dahlberg
2014-06-17doc: Fix broken linksBjörn-Egil Dahlberg
2014-05-20Merge branch 'sverk/better-module-info'Sverker Eriksson
OTP-11940 * sverk/better-module-info: Remove obsolete 'imports' entry from module_info/1/2 functions Add 'module' entry for module_info/0 function for completeness Add 'md5' entry for module_info/0/1 functions.
2014-05-14doc: Move Maps reference documentation to expressionsBjörn-Egil Dahlberg
2014-05-14Remove obsolete 'imports' entry from module_info/1/2 functionsRichard Carlsson
It previously always returned an empty list and was documented to be removed.
2014-05-14Add 'module' entry for module_info/0 function for completenessRichard Carlsson
as it exist in module_info/1.
2014-05-14Add 'md5' entry for module_info/0/1 functions.Richard Carlsson
2014-04-01Merge branch 'egil/maps-doc'Björn-Egil Dahlberg
* egil/maps-doc: doc: Add Maps example for sequential programming doc: Mention map expressions and map guards doc: Add maps to reference manual edoc: Add map/0 as a new predefined type doc: Descripe Maps type syntax doc: Clearify language of user-defined attributes doc: Document Maps datatype in reference manual erts: Document map guard functions erts: Fix is_map/1 spec
2014-04-01doc: Mention map expressions and map guardsBjörn-Egil Dahlberg
2014-04-01doc: Add maps to reference manualBjörn-Egil Dahlberg
2014-04-01doc: Descripe Maps type syntaxBjörn-Egil Dahlberg
2014-04-01doc: Clearify language of user-defined attributesBjörn-Egil Dahlberg
2014-03-27doc: Document Maps datatype in reference manualBjörn-Egil Dahlberg
2014-03-26refman: Clarify the '-callback' attributeHans Bolinder
2014-03-17Clarify the reference manual regarding source file encodingHans Bolinder
2014-02-20erts: Add more details to warning in on_load docsSverker Eriksson
2014-02-12[refmanual] Fix List in definition of pre-defined typesHans Bolinder
improper_list(Type1, Type2) has been replaced by nonempty_improper_list(Type1, Type2).
2014-01-28Merge branch 'essen/remote-set-cookie/OTP-11637'Lukas Larsson
* essen/remote-set-cookie/OTP-11637: set_cookie/2 call needs to be fully qualified
2014-01-27Update the note for -on_load()Björn Gustavsson
We can't recommend -on_load() for general use.
2014-01-16set_cookie/2 call needs to be fully qualifiedLoïc Hoguin
2013-12-12Document named fun expressionsAnthony Ramine
2013-09-12Merge branch 'maint'Hans Bolinder
* maint: Correct documentation of predefined types crypto: Add ticket for 5d8a13bb6a180e0a
2013-09-12Correct documentation of predefined typesHans Bolinder
The documentation of predefined types has been corrected Thanks to Kostis Sagonas.