lean4-htt/tests
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
..
bench chore: update cross benches 2020-08-18 11:44:29 +02:00
compiler feat: implement let elaborators without using match_syntax 2020-08-17 09:27:54 -07:00
elabissues chore: fix syntax 2020-05-21 09:57:35 -07:00
ir chore(tests): fix do syntax in tests 2019-06-30 13:04:34 +02:00
lean feat: remove outparam from MonadState 2020-08-18 15:15:31 -07:00
playground test: final webserver demo 2020-06-25 10:48:38 +02:00
plugin chore: remove comment from Linter 2020-06-17 21:28:03 -07:00
.gitignore chore: move bin/ and .oleans into build directory 2020-05-14 14:47:54 +02:00
common.sh test: do not ignore whitespace in diff 2020-08-06 09:26:48 -07:00