]> gitweb.factorcode.org Git - factor.git/commitdiff
Add an article for roles
authorDoug Coleman <doug.coleman@gmail.com>
Sat, 3 Jul 2010 02:52:26 +0000 (21:52 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 9 Jul 2010 18:32:08 +0000 (13:32 -0500)
extra/roles/roles-docs.factor

index 129959a1cf1f62754bd4d559a17ba7ba2fbbfb54..e499c14db51804fe5497e6ce91abe9cad7c3bc1d 100644 (file)
@@ -46,3 +46,13 @@ HELP: multiple-inheritance-attempted
 HELP: role-slot-overlap
 { $class-description "This error is thrown if a " { $link POSTPONE: TUPLE: } " or " { $link POSTPONE: ROLE: } " definition attempts to inherit a set of " { $link role } "s in which more than one attempts to define the same slot." } ;
 
+ARTICLE: "roles" "Roles"
+"The " { $vocab-link "roles" } " vocabulary implements a way to extend tuple classes that allows them to be composed of multiple roles objects that contain slots." $nl
+"The role superclass:"
+{ $subsections role }
+"Syntax for making a new role:"
+{ $subsection POSTPONE: ROLE: } 
+"Syntax for making tuples that use roles:"
+{ $subsection POSTPONE: TUPLE: } 
+"Errors with roles:"
+{ $subsections multiple-inheritance-attempted role-slot-overlap } ;