lean4-htt/src
Leonardo de Moura 5605735137 feat: remove outparam from MonadState
We add helper classes with `outParam`.

@Kha This is similar to the `MonadExceptOf` modification.
Motivation: the new `StateRefT` (state monad implemented using
`IO.Ref`) makes is it quite cheap to have multiple states on the
stack. But, we need a mechanism for accessing the different states in
a convenient way.
Note that, I did not add a `MonadStateOf` class, but helper classes
such as `HasGet` which uses `outParam`. I will do the same for `MonadExcept`.

Summary:
- `get` gets the state on the top of the Monad stack
- `getThe σ` gets the state with type `σ`
- `modify f` modifies the state on the top of the Monad stack.
   We use `modify fun s => { s with ... }` quite often, and we cannot
   infer type of `s` here.
- `modifyThe σ f` allows us to select which state on the stack we are modifying.
- I didn't add `setThe`, since we usually can infer the state type at
  `set s`. In the whole codebase, we have only one instance where this
  is not true.
2020-08-18 15:15:31 -07:00
..
bin fix: build 2020-06-25 15:30:11 -07:00
cmake chore: remove test special case 2020-05-04 11:11:11 +02:00
frontends/lean fix: compiler do a; b as a >>= fun _ => b 2020-08-15 15:51:00 -07:00
include/lean chore: fix includes 2020-05-22 14:17:25 -07:00
Init feat: remove outparam from MonadState 2020-08-18 15:15:31 -07:00
initialize chore: use src/Lean.lean to initialize lean 2020-05-26 13:54:13 -07:00
kernel fix: allow kernel projections to be used in inductive families containing only one constructor 2020-08-05 12:56:04 -07:00
Lean feat: remove outparam from MonadState 2020-08-18 15:15:31 -07:00
library chore: increase class.instance_max_depth 2020-08-13 09:19:26 -07:00
runtime chore: fix C++ warnings 2020-08-14 14:42:44 +02:00
shared chore: src/init ==> src/initialize 2019-11-22 04:59:13 -08:00
shell feat: add --root flag to set package root directory 2020-08-06 09:21:52 -07:00
Std refactor: add prototype2.lean 2020-08-04 18:35:11 -07:00
tests/util chore: fix includes 2020-05-22 14:17:25 -07:00
util chore: fix includes 2020-05-22 14:17:25 -07:00
CMakeLists.txt chore: clean up stage 0 executable build 2020-07-03 19:26:00 +02:00
config.h.in feat(CMakeLists, runtime): add CHECK_RC_OVERFLOW cmake option 2019-08-28 15:35:46 -03:00
CTestConfig.cmake
CTestCustom.cmake.in
githash.h.in
Init.lean chore: move ShareCommon to Std 2020-06-25 11:45:29 -07:00
Lean.lean feat: add CoreM 2020-08-18 09:45:16 -07:00
lean.mk.in leanmake: allow setting linker options 2020-07-13 21:39:04 +02:00
memcheck.supp
Std.lean chore: move ShareCommon to Std 2020-06-25 11:45:29 -07:00
stdlib.make.in chore: add stage 1.5 (yes, really) 2020-08-12 09:15:59 -07:00
version.h.in