On Fri, Sep 07, 2007 at 03:00:36PM +0100, Wim Vanderbauwhede wrote:
: On 07/09/2007, Chas Owens <[EMAIL PROTECTED]> wrote:
: >
: > On 9/7/07, Wim Vanderbauwhede <[EMAIL PROTECTED]> wrote:
: > > The following program works fine in pugs r17041 (which is the rev of
: > > /usr/bin/pugs on feather):
: >
In a message dated Fri, 7 Sep 2007, Wim Vanderbauwhede writes:
On 07/09/2007, Chas Owens <[EMAIL PROTECTED]> wrote:
Even
if strict weren't in effect this code should not work since the $x in
the closure is not the one created after the closure:
perl -le 'my$r=sub{print $x+1};my $x = 2;$r->()'
Wim (>):
> I think it could be a GHC bug: I rebuilt r17041 with ghc-6.6.1 (just a few
> changes to use the new filepath package in Pugs.hs and Pugs/Run.hs) and it
> shows the bug. I assume the pugs on feather really is r17041, to be really
> sure I should build r17041 with ghc-6.6. I should manage
I think it could be a GHC bug: I rebuilt r17041 with ghc-6.6.1 (just a few
changes to use the new filepath package in Pugs.hs and Pugs/Run.hs) and it
shows the bug. I assume the pugs on feather really is r17041, to be really
sure I should build r17041 with ghc-6.6. I should manage that next week.
Wim (>):
> The following program works fine in pugs r17041 (which is the rev of
> /usr/bin/pugs on feather):
>
> my $r=\{say $x+1};
> my $x=2;
> $r();
>
> With r17041, this gives 3;
> However, on the latest pugs (r17615 or later), it gives an error:
> ***
> Unexpected "$r"
> expecting "=",
On 07/09/2007, Chas Owens <[EMAIL PROTECTED]> wrote:
>
> On 9/7/07, Wim Vanderbauwhede <[EMAIL PROTECTED]> wrote:
> > The following program works fine in pugs r17041 (which is the rev of
> > /usr/bin/pugs on feather):
> >
> > my $r=\{say $x+1};
> > my $x=2;
> > $r();
> >
> > With r17041, this gives
On 9/7/07, Wim Vanderbauwhede <[EMAIL PROTECTED]> wrote:
> The following program works fine in pugs r17041 (which is the rev of
> /usr/bin/pugs on feather):
>
> my $r=\{say $x+1};
> my $x=2;
> $r();
>
> With r17041, this gives 3;
> However, on the latest pugs (r17615 or later), it gives an error:
>
The following program works fine in pugs r17041 (which is the rev of
/usr/bin/pugs on feather):
my $r=\{say $x+1};
my $x=2;
$r();
With r17041, this gives 3;
However, on the latest pugs (r17615 or later), it gives an error:
***
Unexpected "$r"
expecting "=", "::", context, ":" or "("
V