Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui problem in lifting monad #223

Open
lengyijun opened this issue Dec 18, 2024 · 1 comment
Open

ui problem in lifting monad #223

lengyijun opened this issue Dec 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@lengyijun
Copy link

https://lean-lang.org/doc/reference/latest/Functors___-Monads-and--do--Notation/Lifting-Monads/#MonadLift___mk

Example Lifting Transformed Monads

def incrBy (n : Nat) : StateM Nat Unit := modify (def incrOrFail : ReaderT Nat (ExceptT String (StateM Nat)) Unit := do
  if (← read) > 5 then throw "Too much!"
  incrBy (← read)
@david-christiansen
Copy link
Collaborator

That is indeed a problem! Thanks!

I'm out on vacation until the new year, but I'll take a look as soon as I'm back to work.

@david-christiansen david-christiansen added the bug Something isn't working label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants