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

Example in widget docs doesn't work #512

Closed
bryangingechen opened this issue Dec 31, 2020 · 1 comment
Closed

Example in widget docs doesn't work #512

bryangingechen opened this issue Dec 31, 2020 · 1 comment

Comments

@bryangingechen
Copy link
Collaborator

The following was reported on Zulip by @SnobbyDragon. This example from https://leanprover-community.github.io/mathlib_docs/init/meta/widget/basic.html doesn't work:

meta def Hello : component string empty := component.pure (λ s, ["hello, ", s, ", good day!"])
#html Hello "lean" -- renders "hello, lean, good day!"
maximum class-instance resolution depth has been reached
(the limit can be increased by setting option 'class.instance_max_depth')
(the class-instance resolution trace can be visualized by setting option 'trace.class_instances')

@EdAyers commented:

So the problem is that when you write Hello "lean", there is a function coercion, but the typeclass inference system is getting stuck in a loop for some reason. I suggest that you just use the clunkier version with html.of_component for now. Maybe someone who actually understands typeclasses knows what needs to change to get this to work.

EdAyers added a commit to EdAyers/lean that referenced this issue Jan 2, 2021
@EdAyers
Copy link
Member

EdAyers commented Jan 2, 2021

I think that the actual problem was that the coe_to_fun got removed at some point... oops.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants