Skip to content

Commit f9f0ea2

Browse files
committed
Work-in-progress second edition of generics.tex
This is not ready for review yet so I'm not updating the PDF on Swift.org.
1 parent 8f64bce commit f9f0ea2

32 files changed

+19289
-12263
lines changed

docs/Generics/Makefile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,3 @@ generics.pdf:
33
bibtex generics
44
pdflatex generics
55
pdflatex generics
6-
7-
clean:
8-
rm *.aux *.bbl *.blg *.idx *.ilg *.ind *.log *.out *.pdf *.toc
9-
10-
.PHONY: clean

docs/Generics/chapters/basic-operation.tex

Lines changed: 531 additions & 0 deletions
Large diffs are not rendered by default.

docs/Generics/chapters/building-generic-signatures.tex

Lines changed: 1334 additions & 0 deletions
Large diffs are not rendered by default.

docs/Generics/chapters/class-inheritance.tex

Lines changed: 267 additions & 0 deletions
Large diffs are not rendered by default.

docs/Generics/chapters/compilation-model.tex

Lines changed: 726 additions & 0 deletions
Large diffs are not rendered by default.

docs/Generics/chapters/completion.tex

Lines changed: 1037 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
\documentclass[../generics]{subfiles}
2+
3+
\begin{document}
4+
5+
\chapter{Concrete Conformances}\label{concrete conformances}
6+
7+
\ifWIP
8+
TODO:
9+
\begin{itemize}
10+
\item Concrete conformance rule, property-like
11+
\item Virtual rule that introduces it
12+
\item Idea: it should eliminate the conformance rule but not the concrete type rule
13+
\item Doesn't actually appear in signature so should not impact minimization
14+
\item Conditional requirement inference, only in generic signatures and not protocols, because we can't merge connected components during completion. for a generic signature this actually has to import new components in the general case
15+
\end{itemize}
16+
\fi
17+
18+
\section{Type Witnesses}
19+
20+
\IndexTwoFlag{debug-requirement-machine}{concretize-nested-types}
21+
22+
\ifWIP
23+
TODO:
24+
\begin{itemize}
25+
\item Concrete type witness
26+
\item Abstract type witness
27+
\item Virtual rules
28+
\item Algorithm for building a ``relative'' concrete type symbol from substituting another symbol's pattern type
29+
\end{itemize}
30+
\fi
31+
32+
\section{Recursive Conformances}
33+
34+
\ifWIP
35+
TODO:
36+
\begin{itemize}
37+
\item Free conformances
38+
\item Can a protocol have a free conformance
39+
\item Can a conformance be made free by changing the protocol
40+
\item Conformance evaluation graph
41+
\item Heuristic to find same-type requirements from a conformance; just the parent type thing
42+
\item The problem with opaque archetypes
43+
\item Open question: can we encode a conformance more directly without evaluating it; \verb|G<G<G<T>>>| example
44+
\end{itemize}
45+
\fi
46+
47+
\IndexFlag{enable-requirement-machine-opaque-archetypes}
48+
49+
\section{Concrete Contraction}
50+
51+
\IndexFlag{disable-requirement-machine-concrete-contraction}
52+
\IndexTwoFlag{debug-requirement-machine}{concrete-contraction}
53+
54+
\ifWIP
55+
TODO:
56+
\begin{itemize}
57+
\item Doesn't actually appear in signature so should not impact minimization
58+
\item The problem: it might give you a smaller anchor
59+
\item Invariant violation without concrete contraction
60+
\item Concrete contraction substitutes superclass and concrete types
61+
\item Also GSB compatibility: T.A, T == C, C.A is a concrete typealias that's not an associated type. this doesn't add a rule
62+
\item Open question: can we do this in a more principled way
63+
\end{itemize}
64+
\fi
65+
66+
\section{Source Code Reference}
67+
68+
\end{document}

docs/Generics/chapters/conformance-paths.tex

Lines changed: 1389 additions & 0 deletions
Large diffs are not rendered by default.

docs/Generics/chapters/conformances.tex

Lines changed: 681 additions & 0 deletions
Large diffs are not rendered by default.

docs/Generics/chapters/declarations.tex

Lines changed: 611 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)