doc: missing (type := true) in reader monad example (#6196)
This PR adds missing `(types := true)` to `#reduce` example in [Readers example](https://lean-lang.org/lean4/doc/monads/readers.lean.html). Since [4.10](https://lean-lang.org/blog/2024-8-1-lean-4100/) the `(types := true)` is necessary for the `ReaderM Environment String` type to be reduced into `Environment → String`.
This commit is contained in:
parent
6447fda253
commit
762c5758f5
1 changed files with 2 additions and 2 deletions
|
|
@ -139,7 +139,7 @@ You might be wondering, how does the context actually move through the `ReaderM`
|
|||
add an input argument to a function by modifying its return type? There is a special command in
|
||||
Lean that will show you the reduced types:
|
||||
-/
|
||||
#reduce ReaderM Environment String -- Environment → String
|
||||
#reduce (types := true) ReaderM Environment String -- Environment → String
|
||||
/-!
|
||||
And you can see here that this type is actually a function! It's a function that takes an
|
||||
`Environment` as input and returns a `String`.
|
||||
|
|
@ -196,4 +196,4 @@ entirely.
|
|||
|
||||
Now it's time to move on to [StateM Monad](states.lean.md) which is like a `ReaderM` that is
|
||||
also updatable.
|
||||
-/
|
||||
-/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue