---------------------------------------------------------------------
 Perl 6 Object Meta Model
---------------------------------------------------------------------

This is a first sketch/prototype of the Perl 6 Object Meta Model. It 
is very much a work in progress, and any thoughts/ideas/suggestions
are very much welcome. 

Currently the people involved in this are:

    Stevan "stevan" Little & Sam "mugwump" Vilian 

Contact them on #perl6 for more details.

The many levels of introspection
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There are several "layers" to the Perl 6 object system.  Overview
information can be found in:

    docs/meta_meta_classes.pod

off the Pugs root there is some more information:
    docs/class/*
    src/Pugs/Class.hs

Each level is currently being developed in parallel, as 

M1 - Class level - the language Model
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Perl 6 "clean" prototypes of Perl 6 core language entities, for
example the "Class" class defined as a class, can be found in;

    lib/*

These entities should be derived primarily from features required by
things in the Synopses.  In particular, most of S29 should end up
defined as methods on classes in this directory.

Currently in Pugs, the closest corresponding entities are;

  - Compiled Types:
      - MkType inserting to envClasses in Pugs/AST/Internals.hs

  - "Core" types, including "Classes":
      - Type in Pugs/Types.hs (as a base class)

      - VStr, VBool, VInt, VRat, VNum, VComplex, VHandle, VSocket,
        VThread, MatchPGE in Pugs/Types.hs

      - VRef, VOpaque, VControl, VScalar, VPair, VList, VSubst,
        VArray, VHash, VThunk, VProcess, VMatch, VCode, VJunc,
        VObject, VType in Pugs/AST/Internals.hs

Classes that are what you would get out of introspecting the Haskell
source at:

    lib/Pugs/*.pm 

Attribute names should be taken from the Haskell source where
possible.  Note that there are several Haskell constructs that are
hazy areas about how the same thing is written in Perl 6; Haskell is
an advanced language!

M2 - Meta::Class level - the langauge Meta-Model
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
These objects represent data structures capable of describing the M1
classes, and changes that are permitted to the M1 objects, such as
defining new Class traits.  These are being built in:

    lib/Meta/*.pm

M3 - Meta::Meta::Class - the language Meta-Meta-Model
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
These are designed to be a minimal set of classes that can describe
any Meta::Model.

If we follow the same path that SmallTalk72 did when they found the M3
was unnecessary, then perhaps the M3 will be unnecessary.

For now, the M3 is based on the core Class support in Pugs, and the
module;

    lib/Meta/Util.pm

This module generates accessors which support the Class::Tangram
collection message passing convention, which allows references and
collection properties of objects to "track" each other; see the last
few tests in t/01-util.t for an example of how this works.
