[e-lang] Bug (0.8.37d+): term`foo` pattern behavior changed
Mark S. Miller
markm at cs.jhu.edu
Sat Jan 20 14:00:08 CST 2007
Kevin Reid wrote:
> In E 0.8.36t,
>
> ? def term`foo` := term`foo(bar)`
> # value: term`foo(bar)`
>
> In E 0.8.37d and SVN:
>
> ? def term`foo` := term`foo(bar)`
> # problem: foo doesn't match: term`foo(bar)`
>
> This change has broken several term-using programs, and I do not
> recall it being announced.
This is an unintended consequence of the change announced at
<http://erights.org/download/0-8-37/highlights.html#non-up>:
# Change term-tree coercion rules
<https://sourceforge.net/tracker/index.php?func=detail&aid=1593181&group_id=75274&atid=551529>
# Only tags can serve as functors.
# Strings in other positions convert to term-strings rather than tags.
I have amended the closed bug report linked to above with your observation and
added the note:
# Although this behavior surprised me, I don't consider it a bug, and so am
# leaving this bug closed.
Cases such as you show above can be fixed as follows:
? def term`foo at _` := term`foo(bar)`
Sorry for the unpleasant surprise, and for the fact that I did not anticipate
it, but I do not dislike the change in behavior.
--
Text by me above is hereby placed in the public domain
Cheers,
--MarkM
More information about the e-lang
mailing list