Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

erl_pp(3erl) [linux man page]

erl_pp(3erl)						     Erlang Module Definition						      erl_pp(3erl)

NAME
erl_pp - The Erlang Pretty Printer DESCRIPTION
The functions in this module are used to generate aesthetically attractive representations of abstract forms, which are suitable for print- ing. All functions return (possibly deep) lists of characters and generate an error if the form is wrong. All functions can have an optional argument which specifies a hook that is called if an attempt is made to print an unknown form. EXPORTS
form(Form) -> DeepCharList form(Form, HookFunction) -> DeepCharList Types Form = term() HookFunction = see separate description below. DeepCharList = [char()|DeepCharList] Pretty prints a Form which is an abstract form of a type which is returned by erl_parse:parse_form . attribute(Attribute) -> DeepCharList attribute(Attribute, HookFunction) -> DeepCharList Types Attribute = term() HookFunction = see separate description below. DeepCharList = [char()|DeepCharList] The same as form , but only for the attribute Attribute . function(Function) -> DeepCharList function(Function, HookFunction) -> DeepCharList Types Function = term() HookFunction = see separate description below. DeepCharList = [char()|DeepCharList] The same as form , but only for the function Function . guard(Guard) -> DeepCharList guard(Guard, HookFunction) -> DeepCharList Types Form = term() HookFunction = see separate description below. DeepCharList = [char()|DeepCharList] The same as form , but only for the guard test Guard . exprs(Expressions) -> DeepCharList exprs(Expressions, HookFunction) -> DeepCharList exprs(Expressions, Indent, HookFunction) -> DeepCharList Types Expressions = term() HookFunction = see separate description below. Indent = integer() DeepCharList = [char()|DeepCharList] The same as form , but only for the sequence of expressions in Expressions . expr(Expression) -> DeepCharList expr(Expression, HookFunction) -> DeepCharList expr(Expression, Indent, HookFunction) -> DeepCharList expr(Expression, Indent, Precedence, HookFunction) ->-> DeepCharList Types Expression = term() HookFunction = see separate description below. Indent = integer() Precedence = DeepCharList = [char()|DeepCharList] This function prints one expression. It is useful for implementing hooks (see below). UNKNOWN EXPRESSION HOOKS
The optional argument HookFunction , shown in the functions described above, defines a function which is called when an unknown form occurs where there should be a valid expression. It can have the following formats: Function : The hook function is called by: Function(Expr, CurrentIndentation, CurrentPrecedence, HookFunction) none : There is no hook function The called hook function should return a (possibly deep) list of characters. expr/4 is useful in a hook. If CurrentIndentation is negative, there will be no line breaks and only a space is used as a separator. BUGS
It should be possible to have hook functions for unknown forms at places other than expressions. SEE ALSO
io(3erl) , erl_parse(3erl) , erl_eval(3erl) Ericsson AB stdlib 1.17.3 erl_pp(3erl)

Check Out this Related Man Page

sets(3erl)						     Erlang Module Definition							sets(3erl)

NAME
sets - Functions for Set Manipulation DESCRIPTION
Sets are collections of elements with no duplicate elements. The representation of a set is not defined. This module provides exactly the same interface as the module ordsets but with a defined representation. One difference is that while this module considers two elements as different if they do not match ( =:= ), ordsets considers two elements as different if and only if they do not compare equal ( == ). DATA TYPES
set() as returned by new/0 EXPORTS
new() -> Set Types Set = set() Returns a new empty set. is_set(Set) -> bool() Types Set = term() Returns true if Set is a set of elements, otherwise false . size(Set) -> int() Types Set = term() Returns the number of elements in Set . to_list(Set) -> List Types Set = set() List = [term()] Returns the elements of Set as a list. from_list(List) -> Set Types List = [term()] Set = set() Returns an set of the elements in List . is_element(Element, Set) -> bool() Types Element = term() Set = set() Returns true if Element is an element of Set , otherwise false . add_element(Element, Set1) -> Set2 Types Element = term() Set1 = Set2 = set() Returns a new set formed from Set1 with Element inserted. del_element(Element, Set1) -> Set2 Types Element = term() Set1 = Set2 = set() Returns Set1 , but with Element removed. union(Set1, Set2) -> Set3 Types Set1 = Set2 = Set3 = set() Returns the merged (union) set of Set1 and Set2 . union(SetList) -> Set Types SetList = [set()] Set = set() Returns the merged (union) set of the list of sets. intersection(Set1, Set2) -> Set3 Types Set1 = Set2 = Set3 = set() Returns the intersection of Set1 and Set2 . intersection(SetList) -> Set Types SetList = [set()] Set = set() Returns the intersection of the non-empty list of sets. is_disjoint(Set1, Set2) -> bool() Types Set1 = Set2 = set() Returns true if Set1 and Set2 are disjoint (have no elements in common), and false otherwise. subtract(Set1, Set2) -> Set3 Types Set1 = Set2 = Set3 = set() Returns only the elements of Set1 which are not also elements of Set2 . is_subset(Set1, Set2) -> bool() Types Set1 = Set2 = set() Returns true when every element of Set 1 is also a member of Set2 , otherwise false . fold(Function, Acc0, Set) -> Acc1 Types Function = fun (E, AccIn) -> AccOut Acc0 = Acc1 = AccIn = AccOut = term() Set = set() Fold Function over every element in Set returning the final value of the accumulator. filter(Pred, Set1) -> Set2 Types Pred = fun (E) -> bool() Set1 = Set2 = set() Filter elements in Set1 with boolean function Fun . SEE ALSO
ordsets(3erl) , gb_sets(3erl) Ericsson AB stdlib 1.17.3 sets(3erl)
Man Page