Zulip Chat Archive
Stream: general
Topic: comment block
Paul van Wamelen (Jan 14 2021 at 23:27):
What is the correct way to comment out a big block of code? If I use either '/-' or '/--' and a closing '-/' I often get strange errors further down the file. Often saying "unexpected end of comment block".
Yakov Pechersky (Jan 14 2021 at 23:27):
The safest way is --
at the start of every line
Yakov Pechersky (Jan 14 2021 at 23:28):
/-- ... -/
has special meaning re docstrings and those can't be associated with some declarations
Kevin Buzzard (Jan 14 2021 at 23:33):
/-
...
-/
should work fine. If you get weird errors then just restart Lean -- I agree that there is some comment block bug (adding them and removing them quickly can confuse Lean) but restarting Lean always fixes it immediately.
Last updated: Dec 20 2023 at 11:08 UTC