Skip to content

Commit

Permalink
Minor edits from David.
Browse files Browse the repository at this point in the history
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
  • Loading branch information
ezyang committed Jun 7, 2017
1 parent 8ae351c commit a38d242
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mixin.tex
Expand Up @@ -60,7 +60,7 @@ \section{Pictorial interpretation}
\begin{definition}[Well-formedness of component shapes] \normalfont{}
A shape $\lctxpair{\provs}{\reqs}$ is \emph{well-formed} if:
\begin{enumerate}
\item It does not provide a module variables
\item It does not provide module variables
(there is no $m$ such that $\hv{m} \in \textsf{range}(\provs)$),
e.g., $\lctxpair{\{\prov{B}{\hv{A}}\}}{\hv{A}}$ is ill-formed,
\item It does not require what it provides (no $m$
Expand Down
3 changes: 3 additions & 0 deletions overview.tex
Expand Up @@ -205,6 +205,9 @@ \section{Mixin linking to a \unit{}}
renaming $r$. $P$ is an \uid{}; a \cid{} augmented with a
\emph{module substitution} $S ::= \overline{\subst{m}{M}}$
specifying how every requirement of the component is instantiated.
A \uid{} need not be fully instantiated: we can also leave some
requirements uninstantiated by recording a \emph{module hole}
($\hv{m}$) in the module substitution.
(Compare to the \texttt{mixin} in a \ccomp{}, which only gives a \cid{}).
\item \UsynMod{m}{\Uhsbody} indicates that this component defines
a module named $m$ with Haskell source code $\Uhsbody$.
Expand Down
13 changes: 12 additions & 1 deletion tour.tex
Expand Up @@ -640,6 +640,18 @@ \section{Refining types in signatures}
Previously, this would not have been possible, because the
abstract type \verb|Chr| was considered distinct from \verb|Char|.

Similarly, you could refine an abstract data type with a concrete
data declaration, like below:

\begin{lstlisting}
signature Str where
data Chr = Zero | One
\end{lstlisting}

\noindent
This \verb|Chr| doesn't define a data type per se, but it can only
be implemented by a data type with exactly the same constructors.

\section{Reusing and thinning signatures}

For applications more complex than a regular expression matcher, the set
Expand All @@ -657,7 +669,6 @@ \section{Reusing and thinning signatures}
version: 1.0
library
signatures: Str
build-depends: base
\end{lstlisting}

\noindent
Expand Down

0 comments on commit a38d242

Please sign in to comment.