Skip to content

Commit

Permalink
Refactor core class stubs a bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed Aug 18, 2011
1 parent 48a44ea commit c69d4ba
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 20 deletions.
5 changes: 3 additions & 2 deletions src/core/Any.pm
@@ -1,5 +1,6 @@
class MapIter { ... }
class Parcel { ... }
my class MapIter { ... }
my class Whatever { ... }
my class Range { ... }

my class Any {

Expand Down
6 changes: 4 additions & 2 deletions src/core/BackTrace.pm
@@ -1,4 +1,6 @@
class BackTraceLine {
my class Exception { ... }

my class BackTraceLine {
has Str $.file;
has Int $.line;
has Mu $.code;
Expand All @@ -14,7 +16,7 @@ class BackTraceLine {
method is-setting { $!file eq 'src/gen/CORE.setting' }
}

class BackTrace is List {
my class BackTrace is List {
proto method new(|$) {*}

multi method new(Exception $e, Int $offset = 0) {
Expand Down
2 changes: 2 additions & 0 deletions src/core/Cool.pm
@@ -1,3 +1,5 @@
my class IO { ... }

my class Cool {

## numeric methods
Expand Down
2 changes: 1 addition & 1 deletion src/core/Int.pm
@@ -1,4 +1,4 @@
class Rat { ... }
my class Rat { ... }

my class Int {
multi method Bool(Int:D:) {
Expand Down
2 changes: 0 additions & 2 deletions src/core/List.pm
@@ -1,5 +1,3 @@
class Range { ... }

my class List does Positional {
# declared in BOOTSTRAP.pm:
# is Iterable; # parent class
Expand Down
2 changes: 1 addition & 1 deletion src/core/ListIter.pm
@@ -1,4 +1,4 @@
class List { ... }
my class List { ... }

my class ListIter {
# Attributes defined in BOOTSTRAP.pm:
Expand Down
2 changes: 0 additions & 2 deletions src/core/Numeric.pm
@@ -1,5 +1,3 @@
class Complex { ... }

# XXX role Numeric { ... }
my class Numeric {
multi method Numeric(Numeric:D:) { self }
Expand Down
2 changes: 1 addition & 1 deletion src/core/Real.pm
@@ -1,4 +1,4 @@
class Complex { ... }
my class Complex { ... }

# XxX role Real does Numeric { ... }
my class Real {
Expand Down
2 changes: 1 addition & 1 deletion src/core/WhateverCode.pm
@@ -1,2 +1,2 @@
my class WhateverCode {
my class WhateverCode is Code {
}
2 changes: 1 addition & 1 deletion src/core/control.pm
@@ -1,4 +1,4 @@
class Nil { ... }
my class Nil { ... }

my &THROW :=
-> |$ {
Expand Down
8 changes: 1 addition & 7 deletions src/core/stubs.pm
Expand Up @@ -3,18 +3,12 @@
# Code/Block/Routine/Sub/Method and Str/Int/Num. They are built in BOOTSTRAP.pm
# in Perl6::Metamodel for now, though should be a BEGIN block in CORE.setting
# in the end.
my class Whatever is Cool { ... }
my class WhateverCode is Code { ... }
my role Stringy { ... }
my class IO { ... }
my class Enum { ... }
my class Whatever { ... }
my class Bag is Iterable does Associative { }
my class Buf is Iterable does Positional { }
my class Set is Iterable does Associative { }
my class KeyHash is Iterable does Associative { }
my class Seq is List does Positional { }
my class Range { ... }
my class Exception { ... }

sub DYNAMIC(\$name) is rw {
my Mu $x := pir::find_dynamic_lex__Ps(nqp::unbox_s($name));
Expand Down

0 comments on commit c69d4ba

Please sign in to comment.