HELP PERVASIVE                                 Robert Duncan, Sept. 1987
                                                      Revised April 1990

The pervasive declaration form.


    CONTENTS - (Use <ENTER> g to access required sections)

 -- Introduction
 -- Syntax
 -- Semantics


-- Introduction -------------------------------------------------------

The PERVASIVE declaration  is an additional  top-level declaration  form
unique to Poplog ML. It allows identifiers declared inside structures to
be  made  "pervasive".   A  pervasive  identifier   may  be   referenced
non-locally inside a  module without a  qualifying structure path,  even
when closure  rules  are  enforced  (see  HELP  *  closure_rules).  This
property is by default  possessed only by the  small set of  identifiers
declared in the initial basis.


-- Syntax -------------------------------------------------------------

The pervasive  declaration  form  extends the  syntax  of  ML  top-level
declarations as described in HELP * SYNTAX (Pervasive Declarations).

The symbol "pervasive" is an additional reserved word of PML.


-- Semantics ----------------------------------------------------------

The pervasive declaration is similar in both syntax and semantics to the
"open" declaration:  it identifies  a set  of structure  paths, each  of
which is opened up so that all the substructures, types, exceptions  and
variables defined  inside it  become usable  in subsequent  declarations
without the  need  for  qualified  names. As  with  "open",  the  output
resulting from a  successful pervasive declaration  shows all the  names
which have been made visible by the declaration.

The extra feature added by the new declaration form is that the names so
exported have  the extra  quality of  "pervasiveness", such  that  their
visibility extends to the inside of subsequent signature, structure  and
functor declarations, even  in the  case where closure  rules have  been
enabled (see  HELP  *  closure_rules).  This  quality  is,  by  default,
possessed only by the small set of names declared as "primitives" by the
Standard ML language definition. This non-standard mechanism effectively
allows users to define their own primitives. Note that if closure  rules
are disabled (the default) then the "pervasive" and "open"  declarations
are exactly equivalent.

The nature of the  declaration restricts its use  to top-level only,  as
only names which are globally accessible can be considered as primitive.
It may be used anywhere at top-level, but the most logical place for  it
is  in  the  "init.ml"  initialisation  file:  declarations  there   are
evaluated automatically  every time  the  PML system  is run,  so  names
declared as pervasive  there will appear  to be true  primitives of  the
language.


--- C.all/pml/help/pervasive
--- Copyright University of Sussex 1991. All rights reserved. ----------
