lean-ja / lean-ja/lean-by-example

notation はダブルバッククォートと同様に quotPrecheck 機能を持つ

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

Nobody has claimed this yet.

メタプログラミング 宣言的コマンド
Dominant language
Lean
Stars
188
Forks
15
Avg merge
9h 8m
Merged PRs (30d)
6

Description

section

-- エラーになる
local notation s:70 "[" x:70 "↦" n:70 "]" => (fun v => if True then v else v)

end

syntax term "[" term "↦" term "]" : term

section

-- エラーにならない
local macro_rules
| `($s[$x ↦ $n]) => `(fun v ↦ if v = $x then $n else $s v)

end

section

-- エラーになる
local macro_rules
| `($s[$x ↦ $n]) => ``(fun v ↦ if v = $x then $n else $s v)

end

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 reproducing the two notation and macro_rules examples in the issue and compare the behavior of single and double backquoted quotations. No file or test is named; the issue is resolved when notation provides the same quotPrecheck behavior as double backquotes without the shown error.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.