Skip to content

Commit 4fd3ddc

Browse files
chore: add section introductions and planned content tags (#111)
Add links from unwritten sections to tracking issues where users can give prioritization and content feedback.
1 parent 69fa163 commit 4fd3ddc

File tree

6 files changed

+84
-4
lines changed

6 files changed

+84
-4
lines changed

Manual.lean

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ set_option pp.rawOnError true
1919

2020
#doc (Manual) "The Lean Language Reference" =>
2121

22+
This is the _Lean Language Reference_, an in-progress reference work on Lean.
23+
It is intended to be a comprehensive, precise description of Lean: a reference work in which Lean users can look up detailed information, rather than a tutorial for new users.
24+
For other documentation, please refer to the [Lean documentation site](https://lean-lang.org/documentation/).
2225

2326
{include Manual.Intro}
2427

@@ -30,7 +33,17 @@ set_option pp.rawOnError true
3033

3134
# Monads and `do`-Notation
3235

36+
:::planned 102
37+
This chapter will describe `do`-notation in Lean:
38+
* Desugaring of `do` and its associated control structures
39+
* Comprehensive description of the syntax of `do`-notation
40+
* Definition of being in the "same `do`-block"
41+
:::
42+
3343
# IO
44+
:::planned 102
45+
This chapter will describe features for writing programs that can have side effects on the real world.
46+
:::
3447

3548
{include 0 Manual.Tactics}
3649

@@ -40,7 +53,15 @@ set_option pp.rawOnError true
4053

4154
# Standard Library
4255

56+
:::planned 109
57+
Overview of the standard library, including types from the prelude and those that require imports.
58+
:::
59+
4360
## Optional Values
61+
:::planned 110
62+
Describe {name}`Option`, including the default coercions and its API.
63+
:::
64+
4465

4566
# Notations and Macros
4667
%%%

Manual/BasicTypes.lean

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,34 @@ Other types don't have special compiler support _per se_, but rely in important
2626
{include 0 Manual.BasicTypes.Nat}
2727

2828
# Integers
29+
::: planned 104
30+
* Compile-time and run-time characteristics, and how they're inherited from {lean}`Nat`
31+
* API reference
32+
:::
2933

3034
# Fixed-Precision Integer Types
3135

36+
::: planned 105
37+
* Compile-time and run-time characteristics for {lean}`UInt8`, {lean}`UInt16`, {lean}`UInt32`, {lean}`UInt64`
38+
* API reference
39+
:::
40+
41+
# Bitvectors
42+
43+
:::planned 106
44+
* Run-time and kernel representations of {name}`BitVec`
45+
* API reference
46+
* Cross-reference to TBW chapter on `bv_decide`
47+
:::
48+
3249
# Floating-Point Numbers
3350

51+
:::planned 107
52+
* Run-time and kernel representations
53+
* Precision, and whether it's platform-dependent
54+
* Relationship between IEEE floats and decidable equality
55+
:::
56+
3457
# Characters
3558

3659
{docstring Char}
@@ -67,6 +90,13 @@ In monomorphic contexts, characters are represented as 32-bit immediate values.
6790

6891
# Linked Lists
6992

93+
::: planned 108
94+
* Representation at compile time and run time
95+
* API reference
96+
* Literal syntax
97+
* Constructor/pattern syntax
98+
:::
99+
70100
# Arrays
71101

72102
::: planned 91

Manual/Intro.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ The FRO currently has more than ten employees working to support the growth and
7171

7272
# Typographical Conventions
7373

74+
This document makes use of a number of typographical and layout conventions to indicate various aspects of the information being presented.
75+
7476
## Lean Code
7577

7678
This document contains many Lean code examples.

Manual/Language.lean

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ set_option linter.unusedVariables false
2424

2525
{include Manual.Language.Files}
2626

27-
# Types
27+
# The Type System
2828

2929
{deftech}_Terms_, also known as {deftech}_expressions_, are the fundamental units of meaning in Lean's core language.
3030
They are produced from user-written syntax by the {tech}[elaborator].
@@ -518,9 +518,10 @@ def L := List (Type 0)
518518

519519
#### Universe Unification
520520

521-
:::TODO
521+
:::planned 00
522522
* Rules for unification, properties of algorithm
523523
* Lack of injectivity
524+
* Universe inference for unannotated inductive types
524525
:::
525526

526527
{include 2 Language.InductiveTypes}
@@ -536,13 +537,28 @@ tag := "quotients"
536537
* Show the computation rule
537538
:::
538539

539-
# Module Structure
540+
# Module Contents
540541

542+
As described {ref "module-structure"}[in the section on the syntax of files], a Lean module consists of a header followed by a sequence of commands.
541543

542544
## Commands and Declarations
543545

546+
After the header, every top-level phrase of a Lean module is a command.
547+
Commands may add new types, define new constants, or query Lean for information.
548+
Commands may even {ref "language-extension"}[change the syntax used to parse subsequent commands].
549+
550+
::: planned 100
551+
* Describe the various families of available commands (definition-like, `#eval`-like, etc).
552+
* Refer to specific chapters that describe major commands, such as `inductive`.
553+
:::
554+
544555
### Definition-Like Commands
545556

557+
::: planned 101
558+
* Precise descriptions of these commands and their syntax
559+
* Comparison of each kind of definition-like command to the others
560+
:::
561+
546562
The following commands in Lean are definition-like: {TODO}[Render commands as their name (a la tactic index)]
547563
* {syntaxKind}`def`
548564
* {syntaxKind}`abbrev`

Manual/Language/Files.lean

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ open Verso.Genre Manual
1212

1313
#doc (Manual) "Files" =>
1414

15+
The smallest unit of compilation in Lean is a single {deftech}[module].
16+
Modules correspond to source files, and are imported into other modules based on their filenames.
17+
In other words, the names and folder structures of files are significant in Lean code.
18+
1519
# Modules
1620

1721
Every Lean file defines a module.
@@ -140,7 +144,9 @@ Identifiers that contain one or more `'.'` characters, and thus consist of more
140144
Hierarchical identifiers are used to represent both module names and names in a namespace.
141145

142146
## Structure
143-
147+
%%%
148+
tag := "module-structure"
149+
%%%
144150

145151

146152
:::syntax Lean.Parser.Module.module (open := false)

Manual/Tactics.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,11 @@ However, with a few exceptions, the majority of tactics can be identified by a l
486486

487487
## Control Structures
488488

489+
Strictly speaking, there is no fundamental distinction between control structures and other tactics.
490+
Any tactic is free to take others as arguments and arrange for their execution in any context that it sees fit.
491+
Even if a distinction is arbitrary, however, it can still be useful.
492+
The tactics in this section are those that resemble traditional control structures from programming, or those that _only_ recombine other tactics rather than making progress themselves.
493+
489494
### Success and Failure
490495

491496
When run in a proof state, every tactic either succeeds or fails.

0 commit comments

Comments
 (0)