Skip to content- 1.1 The top-level files of the Pie repository. Line counts are from
wc -l; the nine small modules are locations, pie-err, pie-info, serialization, tooltip, interactive-editing, slideshow, info and test-todo-output. Not counted: the subdirectory gui, four Racket files of 1296 lines in all: an editor widget that checks Pie text on slides (used by slideshow.rkt), with its styles and printer, and the lexer that colors Pie syntax in DrRacket (loaded at main.rkt:345).Types that mention values - 2.1 Pie’s fixed menu of types. Line numbers in the Formation, Constructors and Eliminators columns are in
typechecker.rkt; in a pair of ranges separated by a slash, the first is the clause of is-type (the type is a type) and the second the clause of synth (the type is an element of U). “check” and “synth” say whether a constructor only checks against a given type or also synthesizes its own. The ι-rules column gives the do-* functions in normalize.rkt. The η column says whether read-back has an η-rule for the type; Table 8.2 in Chapter 8 lists them. On a first reading the Type, Constructors and Eliminators columns are enough: is-type and synth are explained in Chapter 9, the ι- and η-rules in Chapter 8.Programming with a fixed menu of types - 3.1 The eliminators that take a motive, as
synth implements them. “Base”, “step”, “left” and “right” give the type each argument is checked against. marks a target that is checked, one that is synthesized. The result types of ind-Nat, ind-List, ind-Vec and ind-Either are returned as unevaluated Core applications of the motive; those of replace and ind-= are read back first. replace, ind-= and ind-Absurd are treated in Chapter 4 and Chapter 5.Motives, induction and indexed families - 5.1 Reading Pie types as propositions. The arrow in the logic column is implication.Propositions as types, Absurd, Trivial and the universe
- 8.1 Deciding . The environment is
ctx->env of and . The left column is Core, the middle column holds values, and the right column holds Core normal forms, which α-equiv? compares.Normalization by evaluation - 8.2 The η-rules of Pie, as cases of
read-back. Line numbers are in normalize.rkt. The second half of the Absurd rule is alpha.rkt:69–70.Normalization by evaluation - 9.1 The judgments of
typechecker.rkt. Every function also takes , and the first three take a Renaming (Section 7.6). Every result is wrapped in Perhaps.Bidirectional checking as elaboration - 10.1 Pie next to four larger systems. Only the Pie column was tested; “—” marks a cell we do not state.Pie among type theories, and building your own