Commit graph

739 commits

Author SHA1 Message Date
Gabriel Ebner
0c2a5580cb feat: enforce correct syntax kind in macros 2022-10-18 14:59:14 -07:00
Gabriel Ebner
fb4d90a58b feat: dynamic quotations for categories 2022-10-18 14:59:14 -07:00
Chris Lovett
a6b847430d fix: highlight of deriving instance (#1717) 2022-10-12 14:24:16 -07:00
Gabriel Ebner
f58b26b4b0 chore: update LeanInk 2022-10-11 17:24:35 -07:00
Chris Lovett
664e62e8c5
doc: add question mark to LEAN_IDENT_RE (#1713) 2022-10-11 10:04:56 +02:00
David Renshaw
5c7cf76575 doc: fix link to initialization section in ffi section
The current link goes to doc/dev#init, where there is nothing
about initialization. This PR fixes the link so that it points
to the initialization section lower down on the ffi page.
2022-10-07 19:11:59 +02:00
David Renshaw
4fa1a496b3 doc: Lean USize maps to C++ size_t, not usize_t
usize_t is not a standard C++ type.

See src/include/lean/lean.h for translations between USize and size_t.
2022-10-07 17:51:58 +02:00
Leonardo de Moura
e44fd19074 doc: Semantic highlighting
Many thanks for Patrick Massot for providing the new section at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/semantic.20highlighting.20doc/near/294953547
2022-10-02 08:37:15 -07:00
Matthias Hetzenberger
278c9bb0e4 fix: a grammatically incorrect sentence in monads/intro.md 2022-09-20 15:51:28 -07:00
Sebastian Ullrich
3ef1baae4a doc: refine mdbook docs 2022-09-19 06:30:11 -07:00
Elias Aebi
085f51ecb9 doc: fix Markdown code-blocks 2022-09-16 05:48:44 -07:00
Elias Aebi
fea65d9934 doc: fix an example in the Macro Overview 2022-09-13 03:22:38 -07:00
Elias Aebi
689afdb3b7
doc: enable syntax highlighting for the Macro Overview (#1577) 2022-09-11 08:53:05 -07:00
Chris Lovett
1749210a4b
doc: fix typos and do some polish on wording (#1568) 2022-09-10 15:13:43 -07:00
Sebastian Ullrich
bb1c5a7a49 doc: ink all .lean files in doc/ 2022-09-06 21:12:19 +02:00
Chris Lovett
cc95456639
doc: add documentation on monads (#1505)
* doc: add documentation on functors.

* fix: make comments green

* minor tweaks

* doc: add section on Applicatives.

* doc: add some more info on the laws from Mario.

* doc: add law list and move lazy evaluation up so the chapter ends properly.

* doc: Add something on seqLeft and seqRight.

* doc: add section on monads.

* doc: fix some typos.

* doc: switch to LeanInk for chaper on Monads.

* doc: remove old files.

* doc: fix mdbook test errors.

* doc: add part 4: readers

* doc: add section on State monads

* doc: fix some typos and add some more details.

* doc: fix typos and add some CR feedback.

* doc: add Except monad section.

* doc: add info on monad transformers.

* Delete transformers.lean.md

* doc: fix some typos.

* doc: fix typos and move forward reference to monad lifting.

* doc: Update `State` to `StateM`

* doc: fix references to State to become StateM.

* doc: generalize indexOf implementation.

* doc: add chapter on monad laws and move "law" sections to this chapter to avoid redundancy.

* doc: add theorem

* Delete laws.lean.md

* doc: fix some typos.

* doc: fix broken link.

* doc: fox typos.

* fix: language changed from "us" to "you".

* doc: fix code review comments.

* doc: some word smithing

* doc: some word smithing and sample simplification.

* doc: add bad_option_map example.

* doc: add side note on `return` statement and fix heading level consistency.

* Add `withReader` info

* doc: change language from us, our, your, we, we'll, we've to "you"

* doc: add some forward links.

* doc: put spaces around colon in function  arguments like "(x : List Nat)"

* doc:
Add backticks on map
Remove commands on multiline structure instance
Fix centerdot
Add "one of"

* doc: Remove info about Functor in other languages.

* doc:
add info on <$> being left associative
remove another forward reference to monad
fix typo `operatoions`
remove unneccesary parens after <$>

* doc:
fix Type u -> Type v
fix you -> your
use `let val? ← IO.getEnv name`
in Readers call it "context" rather than "state".

* doc: fix withReader docs
use 'context' to describe the ReaderM state.
remove "trivial"
type inference => Lean
"abstract classes" => "abstract structures"
remove unnecessary parens

* doc: fix bug in explanation of `let x ← readerFunc2`
Fix explanation of equivalence between `def f (a : Nat) : String` and `def f : Nat → String`

* doc: move hasSomeItemGreaterThan to Except.lean
Add validateList List.anyM example.
fix `def f (a : Nat) : String` language.

* doc: fix "What transformation are you referring to"

* doc: fix typo.

* doc: add missing period.

* doc: fix validateList

* doc: explain `λ` notation.

* doc: reword the map, seq, bind comparison.

* doc: fix some more 'reader state' to 'reader context' language

* doc: fix wrote statement about return only works in do blocks.

* doc: fix typo

Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch>

* doc: improve language

Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch>

* doc: fix typo

Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch>

* Add info on what a do block is doing for you.

* doc: define definitionally equal

* doc: make `readerFunc3.run env` canonical.

* doc: remove unnecessary parens.

* doc: fix typos

* doc: make List.map a bit more clear in the intro to Functors.

* doc: simplify readerFunc3WithReader

* doc: switch to svg for diagram so it works better on dark themes.

* doc: align nodes in diagram and convert to svg.

* doc: simplify playGame using while true.

* doc: drop confusing statement about "definitionally equal"

* doc: switch to `import Lean.Data.HashMap`

* doc: fix typo "operatoins"

* doc: update diagram to add more info and polish the intro paragraphs so they better match the actual contents of each chapter.

* doc: fix typo

* doc: fix typo.

Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch>
2022-09-05 13:33:15 -07:00
Mario Carneiro
bff9cdbfb3 doc: update lean 3 -> lean 4 in declarations.md 2022-09-03 08:35:37 -07:00
Chris Lovett
e8335240d8
doc: update the mdbook instructions (#1521) 2022-09-03 11:08:38 +02:00
Mario Carneiro
37252e5fa7 chore: remove Bootstrap package 2022-09-02 16:39:03 -07:00
Mario Carneiro
bf89c5a0f5 chore: move Std -> Bootstrap 2022-08-29 01:26:12 -07:00
Wojciech Nawrocki
98571e6620 doc: explain acronym 2022-08-12 10:28:49 +02:00
Sebastian Ullrich
185829d089 chore: update mdBook
Resolves #1421
2022-08-09 22:19:40 +02:00
Wojciech Nawrocki
7b7e2f54da fix: image paths 2022-08-06 23:46:09 +02:00
Wojciech Nawrocki
bbe11d6e20 doc: clarify widget tutorial 2022-08-06 11:54:44 -07:00
Wojciech Nawrocki
9b595649bf hack: rm JavaScript snippet 2022-08-06 11:54:44 -07:00
Wojciech Nawrocki
72b9ba0dc5 chore: move tutorial to examples folder 2022-08-06 11:54:44 -07:00
Wojciech Nawrocki
4e2b3b8345 doc: move widgets chapter to Lean file 2022-08-06 11:54:44 -07:00
Wojciech Nawrocki
273bc683b9 feat: widget tutorial and general RequestM lifts 2022-08-06 11:54:44 -07:00
Mario Carneiro
df85fee62c chore: rename ac_refl to ac_rfl 2022-08-01 06:53:08 -07:00
Mario Carneiro
d92948bc20 chore: prune ancient keywords 2022-08-01 13:32:56 +02:00
Wojciech Nawrocki
161ef7a67c doc: fix link 2022-08-01 13:03:54 +02:00
Leonardo de Moura
d38fca5f4d chore: update phoas.lean
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/PHOAS.20example/near/291433426
2022-07-30 08:44:18 -07:00
Leonardo de Moura
3dfa895bf0 feat: OfNat instance postprocessor
Closes #1389
2022-07-30 08:35:45 -07:00
E.W.Ayers
591b218607 doc: fix @kha issues 2022-07-25 08:01:27 -07:00
E.W.Ayers
839956c75e doc: update widget docs
[skip ci]
2022-07-25 08:01:27 -07:00
E.W.Ayers
b7d70877f7 feat: user widgets
See #1225
2022-07-25 08:01:27 -07:00
Sebastian Ullrich
5160cb7b0f refactor: remove some unnecessary antiquotation kind annotations 2022-07-23 17:09:32 +02:00
Sebastian Ullrich
9e9786203f
doc: fix minted example 2022-07-23 15:14:44 +02:00
Leonardo de Moura
6d17e8abbf chore: ICERM notation demo 2022-07-21 08:13:20 -04:00
Leonardo de Moura
977329ce1c chore: ICERM examples 2022-07-21 06:49:47 -04:00
Yuri de Wit
dc8e404d15 chore: renamed constant to opaque 2022-07-20 15:35:40 -07:00
Sebastian Ullrich
be11e8e29b doc: missing linebreak 2022-07-18 22:31:16 +02:00
Leonardo de Moura
2116f69315 chore: unused variables 2022-07-17 13:04:08 -04:00
Sebastian Ullrich
6bf7648941 doc: spurious space 2022-07-16 14:51:16 +02:00
Sebastian Ullrich
392c72db86 chore: Nix: renderLean/renderDir 2022-07-15 18:44:17 +02:00
Leonardo de Moura
20d6b9c4aa doc: add new example 2022-07-09 17:04:08 -07:00
Sebastian Ullrich
6d1b2094e9 chore: nix flake update
This comes with ccache 4.6.1, which seems to fix the specific
miscompilation I managed to reproduce with 4.6.0
2022-07-08 13:46:57 +02:00
Leonardo de Moura
fce7697151 fix: def _root_ and dotted notation in recursive definitions
closes #1289
2022-07-07 07:57:51 -07:00
Leonardo de Moura
2494f1d4a4 chore: fix doc 2022-07-06 19:56:25 -07:00
Sebastian Ullrich
5e46c0865e doc: update LeanInk 2022-07-03 17:56:51 +02:00