Commit graph

29512 commits

Author SHA1 Message Date
Gabriel Ebner
fb259f95db feat: remove description argument from register_simp_attr 2022-09-08 14:49:43 -07:00
Leonardo de Moura
5b969b75bd chore: fix build 2022-09-08 14:23:18 -07:00
Henrik Böving
576a4ec2c5 test: basic compiler tests for findJoinPoints 2022-09-08 14:09:14 -07:00
Henrik Böving
f912349a29 fix: compiler test framework style 2022-09-08 14:09:14 -07:00
Henrik Böving
d2f7e724ac feat: findJoinPoints pass 2022-09-08 14:09:14 -07:00
Mario Carneiro
f2254088d1 feat: deriving Repr for TSyntax 2022-09-08 13:14:06 +02:00
Leonardo de Moura
26e304261f fix: PullFunDecls.lean
Use topological sort.
2022-09-07 22:41:05 -07:00
Leonardo de Moura
46b85ec297 chore: update stage0 2022-09-07 20:39:33 -07:00
Leonardo de Moura
0a21603cdc feat: apply implementedBy replacements at second simp pass 2022-09-07 20:38:16 -07:00
Leonardo de Moura
07bdab45d2 feat: apply casesOn implementedBy replacements 2022-09-07 20:37:09 -07:00
Leonardo de Moura
bd21583d4b fix: ComputedFields.lean
`all` fields was not being set correctly.
TODO: check `all` fields in the kernel.
2022-09-07 20:35:59 -07:00
Leonardo de Moura
ea3235c551 fix: skip casesOn recursors at code generation 2022-09-07 18:46:48 -07:00
Leonardo de Moura
5c00708b7f test: specialize attribute tests 2022-09-07 16:32:25 -07:00
Leonardo de Moura
19f5fe6f42 feat: add getSpecializationArgs? 2022-09-07 16:08:45 -07:00
Leonardo de Moura
de0be1d820 chore: update stage0 2022-09-07 15:46:17 -07:00
Leonardo de Moura
55171a893a feat: elaborate specialization arguments 2022-09-07 15:22:56 -07:00
Leonardo de Moura
d0d98bef25 chore: update stage0 2022-09-07 14:53:01 -07:00
Leonardo de Moura
f611a6e52f feat: add specialize attribute parser 2022-09-07 14:50:29 -07:00
Leonardo de Moura
1e135e58a1 chore: update stage0 2022-09-07 13:24:19 -07:00
Leonardo de Moura
735dabdb3f refactor: use ParametricAttribute to implement [specialize] 2022-09-07 13:17:24 -07:00
Leonardo de Moura
04b32eb140 chore: remove noinline and nospecialize from runEval 2022-09-07 13:08:01 -07:00
Leonardo de Moura
661eb39bc8 feat: add inlinePartial config option 2022-09-06 20:46:17 -07:00
Leonardo de Moura
f4fbf92313 fix: make privateToUserNameAux more robust 2022-09-06 17:15:56 -07:00
Leonardo de Moura
85851d0c43 fix: bug at PullFunDecls 2022-09-06 17:15:56 -07:00
Sebastian Ullrich
bb1c5a7a49 doc: ink all .lean files in doc/ 2022-09-06 21:12:19 +02:00
Leonardo de Moura
56f0d6c183 feat: specialize partial applications of local functions 2022-09-06 06:44:33 -07:00
Leonardo de Moura
c769808a4e chore: add TODO 2022-09-05 19:35:17 -07:00
Leonardo de Moura
1812e86c7f feat: eta expand partial applications of functions that take local instances as arguments 2022-09-05 19:33:22 -07:00
Leonardo de Moura
bf44e9fb2f fix: bug at inferProjType for LCNF 2022-09-05 19:23:35 -07:00
Leonardo de Moura
3e210d9f26 chore: helper functions, missing instance 2022-09-05 19:20:31 -07:00
Leonardo de Moura
7113d71cd2 doc: LCNF/Simp.lean docstrings 2022-09-05 17:36:35 -07:00
Leonardo de Moura
1207e5e285 feat: erase cases when all alternatives are the same 2022-09-05 17:22:54 -07:00
Leonardo de Moura
58d8224d9e feat: add LCNF cases default 2022-09-05 14:08:14 -07: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
Gabriel Ebner
8e7e58fc38 feat: synchronous operations for Channel 2022-09-05 08:52:46 -07:00
Gabriel Ebner
213cb322be chore: add test 2022-09-05 08:52:46 -07:00
Gabriel Ebner
c4d421b3de feat: Channel 2022-09-05 08:52:46 -07:00
Gabriel Ebner
7c552380da feat: Mutex, Condvar 2022-09-05 08:52:46 -07:00
Gabriel Ebner
c2f1e01b3b feat: Promise 2022-09-05 08:52:46 -07:00
Gabriel Ebner
451f6df5df fix: IO.waitAny requires nonempty list 2022-09-05 08:52:46 -07:00
Gabriel Ebner
20f41deea7 feat: add Eval instance for BaseIO 2022-09-05 08:52:46 -07:00
Gabriel Ebner
b80775df6f chore: add nonempty instance for monads 2022-09-05 08:52:46 -07:00
Gabriel Ebner
3bd0379993 chore: add nonempty instance for Task 2022-09-05 08:52:46 -07:00
Gabriel Ebner
f7bae54b09 chore: resurrect Std.Queue 2022-09-05 08:52:46 -07:00
Gabriel Ebner
22c3ec3996 chore: generalize IO.sleep to BaseIO 2022-09-05 08:52:46 -07:00
Leonardo de Moura
553addc078 feat: alpha equivalence for LCNF code 2022-09-05 08:06:05 -07:00
Leonardo de Moura
34f3fcdee5 chore: fix test 2022-09-05 06:58:32 -07:00
Leonardo de Moura
fde8d35bbb refactor: declare passes when declaring transformations 2022-09-05 06:58:32 -07:00
Leonardo de Moura
1c41a750ed feat: add ReduceJpArity compiler pass 2022-09-05 06:58:32 -07:00
Mario Carneiro
a73e02e5fc doc: fix typo 2022-09-05 10:24:57 +02:00