<feed xmlns='http://www.w3.org/2005/Atom'>
<title>otp.git/lib/syntax_tools/src, branch OTP_R15B</title>
<subtitle>Mirror of Erlang/OTP repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/'/>
<entry>
<title>EEP-23: Allow variables in fun M:F/A</title>
<updated>2011-11-07T12:57:03+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2010-04-09T13:50:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=ff432e262e65243cbc983fcb002527f8fae8c78b'/>
<id>ff432e262e65243cbc983fcb002527f8fae8c78b</id>
<content type='text'>
Currently, the external fun syntax "fun M:F/A" only supports
literals. That is, "fun lists:reverse/1" is allowed but not
"fun M:F/A".

In many real-life situations, some or all of M, F, A are
not known until run-time, and one is forced to either use
the undocumented erlang:make_fun/3 BIF or to use a
"tuple fun" (which is deprecated).

EEP-23 suggests that the parser (erl_parse) should immediately
transform "fun M:F/A" to "erlang:make_fun(M, F, A)". We have
not followed that approach in this implementation, because we
want the abstract code to mirror the source code as closely
as possible, and we also consider erlang:make_fun/3 to
be an implementation detail that we might want to remove in
the future.

Instead, we will change the abstract format for "fun M:F/A" (in a way
that is not backwards compatible), and while we are at it, we will
move the translation from "fun M:F/A" to "erlang:make_fun(M, F, A)"
from sys_pre_expand down to the v3_core pass. We will also update
the debugger and xref to use the new format.

We did consider making the abstract format backward compatible if
no variables were used in the fun, but decided against it. Keeping
it backward compatible would mean that there would be different
abstract formats for the no-variable and variable case, and tools
would have to handle both formats, probably forever.

Reference: http://www.erlang.org/eeps/eep-0023.html
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, the external fun syntax "fun M:F/A" only supports
literals. That is, "fun lists:reverse/1" is allowed but not
"fun M:F/A".

In many real-life situations, some or all of M, F, A are
not known until run-time, and one is forced to either use
the undocumented erlang:make_fun/3 BIF or to use a
"tuple fun" (which is deprecated).

EEP-23 suggests that the parser (erl_parse) should immediately
transform "fun M:F/A" to "erlang:make_fun(M, F, A)". We have
not followed that approach in this implementation, because we
want the abstract code to mirror the source code as closely
as possible, and we also consider erlang:make_fun/3 to
be an implementation detail that we might want to remove in
the future.

Instead, we will change the abstract format for "fun M:F/A" (in a way
that is not backwards compatible), and while we are at it, we will
move the translation from "fun M:F/A" to "erlang:make_fun(M, F, A)"
from sys_pre_expand down to the v3_core pass. We will also update
the debugger and xref to use the new format.

We did consider making the abstract format backward compatible if
no variables were used in the fun, but decided against it. Keeping
it backward compatible would mean that there would be different
abstract formats for the no-variable and variable case, and tools
would have to handle both formats, probably forever.

Reference: http://www.erlang.org/eeps/eep-0023.html
</pre>
</div>
</content>
</entry>
<entry>
<title>erl_tidy: Eliminate two references to 'regexp' in the documentation</title>
<updated>2011-10-27T10:26:50+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2011-10-26T13:37:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=3e8720728abe875683ad54fa4d93ba83df609f57'/>
<id>3e8720728abe875683ad54fa4d93ba83df609f57</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a bug in erl_recomment</title>
<updated>2011-04-01T06:53:48+00:00</updated>
<author>
<name>Hans Bolinder</name>
<email>hasse@erlang.org</email>
</author>
<published>2011-04-01T06:53:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=f135c4e688dba07b42024295c1f111a106a0820c'/>
<id>f135c4e688dba07b42024295c1f111a106a0820c</id>
<content type='text'>
In a file containing declarations and comments without any empty lines
between them, the recomment_forms() function would associate a
multi-line comment with the declaration above it rather than the one
following it. (Thanks to Richard Carlsson.)

This bug has been reported several times. It was corrected by Kostis
Sagonas, but the fix didn't make into the R14B02 release.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In a file containing declarations and comments without any empty lines
between them, the recomment_forms() function would associate a
multi-line comment with the declaration above it rather than the one
following it. (Thanks to Richard Carlsson.)

This bug has been reported several times. It was corrected by Kostis
Sagonas, but the fix didn't make into the R14B02 release.
</pre>
</div>
</content>
</entry>
<entry>
<title>syntax_tools: Fix an erroneous type and strengthen some specs</title>
<updated>2010-10-26T14:09:57+00:00</updated>
<author>
<name>Kostis Sagonas</name>
<email>kostis@cs.ntua.gr</email>
</author>
<published>2010-10-26T10:16:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=44eb815397d0fd34e0a596f32b18ff97358aada1'/>
<id>44eb815397d0fd34e0a596f32b18ff97358aada1</id>
<content type='text'>
The declaration of the stubDescriptop() type in 'igor' was erroneous,
both in the -type and in the published documentation of the module.

While fixing this some specs where strengthened and used a remote
type to refer to ordsets:ordset(T). Consequently, this patch depends
on the ordsets module exporting the ordset/1 type.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The declaration of the stubDescriptop() type in 'igor' was erroneous,
both in the -type and in the published documentation of the module.

While fixing this some specs where strengthened and used a remote
type to refer to ordsets:ordset(T). Consequently, this patch depends
on the ordsets module exporting the ordset/1 type.
</pre>
</div>
</content>
</entry>
<entry>
<title>syntax_tools: Add types to record definitions</title>
<updated>2010-10-05T12:55:56+00:00</updated>
<author>
<name>Kostis Sagonas</name>
<email>kostis@cs.ntua.gr</email>
</author>
<published>2010-10-05T11:08:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=44d6f54d6782d63a25d80f6d920d67adb33bda52'/>
<id>44d6f54d6782d63a25d80f6d920d67adb33bda52</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix crash in epp_dodger:tokens_to_string/1</title>
<updated>2010-09-24T12:24:35+00:00</updated>
<author>
<name>Maria Christakis</name>
<email>mchris@mail.ntua.gr</email>
</author>
<published>2010-09-24T11:00:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=9f09d3d702d183ea47d6763b01ec8bd53268d12e'/>
<id>9f09d3d702d183ea47d6763b01ec8bd53268d12e</id>
<content type='text'>
Add a function clause in the epp_dodger:tokens_to_string/1 to
avoid a crash in case the argument is a character.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a function clause in the epp_dodger:tokens_to_string/1 to
avoid a crash in case the argument is a character.
</pre>
</div>
</content>
</entry>
<entry>
<title>syntax_tools: Add declarations for exported types</title>
<updated>2010-06-03T12:34:26+00:00</updated>
<author>
<name>Kostis Sagonas</name>
<email>kostis@cs.ntua.gr</email>
</author>
<published>2010-03-19T13:06:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=f614f227c077ca52f24cb795e0e46ef04351b36e'/>
<id>f614f227c077ca52f24cb795e0e46ef04351b36e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove (harmless) warnings about min/max in core applications</title>
<updated>2010-06-02T14:47:29+00:00</updated>
<author>
<name>Patrik Nyblom</name>
<email>pan@erlang.org</email>
</author>
<published>2010-06-02T13:22:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=1b8f86d8314389bf6033d23d3e6d707514ba7612'/>
<id>1b8f86d8314389bf6033d23d3e6d707514ba7612</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix an erroneous spec</title>
<updated>2010-05-06T16:09:47+00:00</updated>
<author>
<name>Kostis Sagonas</name>
<email>kostis@cs.ntua.gr</email>
</author>
<published>2010-05-06T14:07:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=ccf1c5d20bcf76139d4f08a3da0f9954636fea10'/>
<id>ccf1c5d20bcf76139d4f08a3da0f9954636fea10</id>
<content type='text'>
While at it, take out redundant code.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While at it, take out redundant code.
</pre>
</div>
</content>
</entry>
<entry>
<title>syntax_tools: Add types and specs for most exported functions</title>
<updated>2010-02-14T11:23:04+00:00</updated>
<author>
<name>Kostis Sagonas</name>
<email>kostis@cs.ntua.gr</email>
</author>
<published>2010-02-14T06:32:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=8b7dd064e2d44b600f05a9135aac08a539a19ffa'/>
<id>8b7dd064e2d44b600f05a9135aac08a539a19ffa</id>
<content type='text'>
While at it, consistently replace "bool()" with "boolean()"
in the Edoc specs.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While at it, consistently replace "bool()" with "boolean()"
in the Edoc specs.
</pre>
</div>
</content>
</entry>
</feed>
