Permalink
Browse files

Add empty Associative and Positional roles; make List/Parcel/EnumMap …

…do them appropriately.
  • Loading branch information...
1 parent 706682b commit dbdb675a55417f2c66253261d5ab9812222d4d09 @jnthn jnthn committed Jun 25, 2011
Showing with 9 additions and 3 deletions.
  1. +2 −0 src/core/Associative.pm
  2. +1 −1 src/core/EnumMap.pm
  3. +1 −1 src/core/List.pm
  4. +1 −1 src/core/Parcel.pm
  5. +2 −0 src/core/Positional.pm
  6. +2 −0 tools/build/Makefile.in
View
2 src/core/Associative.pm
@@ -0,0 +1,2 @@
+my role Associative {
+}
View
2 src/core/EnumMap.pm
@@ -1,4 +1,4 @@
-my class EnumMap {
+my class EnumMap does Associative {
# declared in BOOTSTRAP.pm:
# has $!storage; # Parrot Hash PMC of key->value mappings
View
2 src/core/List.pm
@@ -1,4 +1,4 @@
-class List {
+class List does Positional {
# declared in BOOTSTRAP.pm:
# is Iterable; # parent class
# has Mu $!items; # RPA of our reified elements
View
2 src/core/Parcel.pm
@@ -1,4 +1,4 @@
-my class Parcel {
+my class Parcel does Positional {
has $!storage; # RPA of Parcel's elements
method flat() {
View
2 src/core/Positional.pm
@@ -0,0 +1,2 @@
+my role Positional {
+}
View
2 tools/build/Makefile.in
@@ -120,6 +120,8 @@ CORE_SOURCES = \
src/core/stubs.pm \
src/core/natives.pm \
src/core/control.pm \
+ src/core/Positional.pm \
+ src/core/Associative.pm \
src/core/Mu.pm \
src/core/Any.pm \
src/core/Code.pm \

0 comments on commit dbdb675

Please sign in to comment.