leanprover / leanprover/fp-lean

Provide example error messages that might result from unintended auto-implicits

Open
#133 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lean
Stars
192
Forks
73
PR merge metrics
No merged PRs in 30d

Description

Auto-implicits can lead to confusing error messages, so the book should discuss them.

An example that occurred recently on Zulip:

   structure RectangularPrism where
      height: Float
      width: Float
      depth: float
      deriving Repr

gave the message

typeclass instance problem is stuck, it is often due to metavariables
  Repr (?m.53213 x✝ prec✝)

https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/.E2.9C.94.20deriving.20Repr.20error

Ideally, there'd be a few examples of this with various language features, as these messages are truly inscrutable.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the book section that discusses auto-implicits and review the linked Zulip example. The documentation is done when it includes several representative examples of confusing error messages from unintended auto-implicits and explains their likely cause.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.