Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite lists match [] signature #3640

Closed
p6rt opened this issue Jan 11, 2015 · 5 comments
Closed

Infinite lists match [] signature #3640

p6rt opened this issue Jan 11, 2015 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Jan 11, 2015

Migrated from rt.perl.org#123581 (status was 'resolved')

Searchable as RT123581$

@p6rt
Copy link
Author

p6rt commented Jan 11, 2015

From andrspv@gmail.com

Greetings.

$ perl6 --version
This is perl6 version 2014.12 built on MoarVM version 2014.12

$ git log | head -1
commit e487d722daf30f51b4e231d0abee4457eb14ca4d

The following occurs​:

multi foo([]){
  "Empty"
}
my @​x = 1...*;

say foo(@​x);

@p6rt
Copy link
Author

p6rt commented Jan 12, 2015

From @masak

<jnthn> m​: (1..*).Capture.perl.say
<camelia> rakudo-moar 6a3fc3​: OUTPUT«Capture.new(hash => {"excludes-max" => Bool​::False, "excludes-min" => Bool​::False, "min" => 1, "max" => Inf})␤»
<jnthn> ah
<jnthn> m​: (my @​a = 1..*).Capture.perl.say
<camelia> rakudo-moar 6a3fc3​: OUTPUT«Capture.new()␤»
<jnthn> That's a golf.
* masak adds that to the ticket
<jnthn> I think the conservative thing to do is to refuse to coerce an infinite thing to a Capture.
<jnthn> That lets us revisit/liberalize in the future

@p6rt
Copy link
Author

p6rt commented Jan 12, 2015

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Oct 27, 2015

From @jnthn

On Mon Jan 12 05​:49​:02 2015, masak wrote​:

<jnthn> m​: (1..*).Capture.perl.say
<camelia> rakudo-moar 6a3fc3​: OUTPUT«Capture.new(hash => {"excludes-
max" => Bool​::False, "excludes-min" => Bool​::False, "min" => 1, "max"
=> Inf})␤»
<jnthn> ah
<jnthn> m​: (my @​a = 1..*).Capture.perl.say
<camelia> rakudo-moar 6a3fc3​: OUTPUT«Capture.new()␤»
<jnthn> That's a golf.
* masak adds that to the ticket
<jnthn> I think the conservative thing to do is to refuse to coerce an
infinite thing to a Capture.
<jnthn> That lets us revisit/liberalize in the future

Implemented this, and added a test in S02-types/capture.t.

@p6rt
Copy link
Author

p6rt commented Oct 27, 2015

@jnthn - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Oct 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant