[R6RS] Re: Slides for "modules talk"

R. Kent Dybvig dyb
Sun Sep 26 22:32:20 EDT 2004


> ... I'd like them --- specifically, I'd like the sources, so I can come
> up with changes to the proposal :-)

I've attached the pdf and source (extended latex) files.  I cannot easily
send all of the stuff required to rebuild the pdf file from source, but
you should be able to rework the source pretty easily to use whatever
typesetting method you want.

I've fixed a few of the things that were noted during our discussion of
the proposal and added a "notes" slide that clarifies some issues
otherwise unspecified by the slides.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: talk.pdf
Type: application/pdf
Size: 41529 bytes
Desc: 
Url : http://mailman.iro.umontreal.ca/mailman/private/r6rs/attachments/20040926/4ad705b7/talk-0001.pdf
-------------- next part --------------
\documentclass[pdf,total,slideColor,colorBG,final,dybstyle]{prosper}
\usepackage[latin1]{inputenc}
\usepackage{pstricks,pst-node,pst-text,pst-3d}
\usepackage{graphicx}
\usepackage{scheme}

\input macros.tex

\schemesmall
\def\var#1{{\sl #1}}

\def\smallskip{\removelastskip\vskip 4pt}
\def\medskip{\removelastskip\vskip 8pt}
\def\bigskip{\removelastskip\vskip 12pt}

\begin{document}

\begingroup\def\NGFrame#1{{#1}}
\begin{slide}{}
\vskip .5in
\begin{center}
\textcolor{red}{\textbf{\Large Proposal for R6RS Modules}}
\vskip 1in
Kent Dybvig September 2004
\end{center}
\par\end{slide}
\endgroup

\begin{slide}{$\strut$Outline}
Issues

\bigskip
Proposal

\bigskip
Notes

\bigskip
Examples
\par\end{slide}

\begin{slide}{$\strut$Issues}
Portability: specifying implementation language

\bigskip
Top-level namespace management

\bigskip
Local requires

\bigskip
Interchangeability and specifying implementations

\bigskip
Loading and invoking modules

\bigskip
Separate but dependent analysis/compilation

\bigskip
Mutability of module bindings
\par\end{slide}

\begin{slide}{$\strut$Non-Issues (for now)}
Local modules

\bigskip
Components
\par\end{slide}

\begin{slide}{$\strut$Proposal}
\begin{grammar}
\var{library}\longis\var{module-form}\kstar\\

\var{module-form}\longis\scheme{(module \var{module-name} \var{language} \var{body-form}\raw{\kstar})}\\

\var{module-name}\longis\var{identifier}\\

\var{language}\longis\var{module-spec}\\

\var{body-form}\longis\var{init-expr}\\
   \orbar\var{definition}\\
   \orbar\scheme{(provides \var{provides-spec}\raw{\kstar})}\\

\var{init-expr}\longis\var{expression}\\

\var{definition}\longis\var{variable-definition}\\
   \orbar\var{keyword-definition}\\
   \orbar\var{begin-definition}\\
   \orbar\var{require-form}\\
   \orbar\var{derived-definition}\\

\var{require-form}\longis\scheme{(require \var{require-spec}\raw{\kstar})}\\
\end{grammar}
\par\end{slide}

\begin{slide}{$\strut$Proposal}
\begin{grammar}
\var{provides-spec}\longis\var{identifier}\\
   \orbar\scheme{(identifier implicit-export\raw{\kstar})}\\
   \orbar\scheme{(all-imported-from \var{module-name})}\\
   \orbar \dots\\

\var{implicit-export}\longis\var{identifier}\\

\var{require-spec}\longis\var{module-spec}\\
   \orbar\scheme{(only-for-syntax \var{module-spec})}\\
   \orbar\scheme{(also-for-syntax \var{require-spec})}\\

\var{module-spec}\longis\var{module-name}\\
   \orbar\scheme{(\var{module-name} from \var{pathname})}\\
   \orbar\scheme{(except \var{module-spec} name\raw{\kstar})}\\
   \orbar\scheme{(only \var{module-spec} name\raw{\kstar})}\\
   \orbar \dots
\end{grammar}
\par\end{slide}

\begin{slide}{$\strut$Notes}
A module is implicitly loaded (and its keyword definitions evaluated) when
a module of that name is not already in scope,
a \scheme{require} form naming the module is expanded, and
a file is specified for the module.

\medskip
A module's \var{inits} and non-keyword definitions are evaluated at least
the first time a \scheme{require} form naming the module is evaluated,
a \scheme{require} \scheme{also-for-syntax} form naming the module is
expanded, or a \scheme{require} \scheme{only-for-syntax} form naming
the module is expanded.  (We need to tighten this up.)

\medskip
References to module bindings made visible by \scheme{require} may not
be evaluated by transformer code.  Simiarly, references to module bindings
made visble by \scheme{require} \scheme{only-for-syntax} may not be
evaluated by non-transformer code.

\medskip
\scheme{require} forms may appear wherever other definitions may appear

\medskip
Modules create bindings; \scheme{require} forms make them visible

\medskip
Implicit exports, if any, must be listed for each exported keyword

\medskip
All exported (explicit or implicit) module bindings are immutable
\par\end{slide}

\begin{slide}{$\strut$Interchangeability}
\schemedisplay
; gui.ss:
(module GUI r6rs
  (require (gtk from "gtk.ss"))
  \var{definition}
  \raw{\vdots}
  \var{definition}
  (provides edit-widgit set-height! force-paint \dots))
\endschemedisplay
\par\end{slide}

\begin{slide}{$\strut$Interchangeability}
\schemedisplay
; gui.ss:
(module GUI r6rs
  (require \raw{\textcolor{red}\bgroup}(glib from "config.ss")\raw{\egroup})
  \var{definition}
  \raw{\vdots}
  \var{definition}
  (provides edit-widgit set-height! force-paint \dots))

; in config.ss:
(module glib r6rs
  (require (gtk from "gtk.ss"))
  (provides (all-imported-from gtk)))
\endschemedisplay
\par\end{slide}

\begin{slide}{$\strut$Interchangeability}
\schemedisplay
; gui.ss:
(module GUI r6rs
  (require (glib from "config.ss"))
  \var{definition}
  \raw{\vdots}
  \var{definition}
  (provides edit-widgit set-height! force-paint \dots))

; in config.ss:
(module glib r6rs
  (require \raw{\textcolor{red}\bgroup}(gqt from "gqt.ss")\raw{\egroup})
  (provides (all-imported-from \raw{\textcolor{red}\bgroup\@}gqt\raw{\egroup})))
\endschemedisplay
\par\end{slide}

\begin{slide}{$\strut$Interchangeability}
\schemedisplay
; gui.ss:
(module GUI r6rs
  (require (glib from "config.ss"))
  \var{definition}
  \raw{\vdots}
  \var{definition}
  (provides edit-widgit set-height! force-paint \dots))

; in config.ss:
(module glib r6rs
  (require \raw{\textcolor{red}\bgroup}(only (gqt from "gqt.ss") open-window \dots)\raw{\egroup})
  (provides (all-imported-from gqt)))
\endschemedisplay
\par\end{slide}


\end{document}


More information about the R6RS mailing list