Commit graph

6 commits

Author SHA1 Message Date
Leonardo de Moura
f36fca875c feag(frontends/lean): explicit delimiters in declaration parameters
Comment from parser.h

This commit makes sure that all declaration parameters must be surrounded with some kind of bracket. (e.g., '()', '{}', '[]').
The goal is to avoid counter-intuitive declarations such as:

              example p : false := trivial
              def main proof : false := trivial

which would be parsed as

              example (p : false) : _ := trivial

              def main (proof : false) : _ := trivial

where `_` in both cases is elaborated into `true`. This issue was raised by @gebner in the slack channel.

Remark: we still want implicit delimiters for lambda/pi expressions. That is, we want to write

               fun x : t, s
           or
               fun x, s

instead of

               fun (x : t), s
2017-09-15 10:07:09 -07:00
Leonardo de Moura
62c24f9bb5 chore(*): remove pos_num and num from stdlib 2017-05-25 18:24:16 -07:00
Leonardo de Moura
325177bfd9 chore(tests/lean): make sure all tests can be processed using new elaborator 2016-09-19 16:17:32 -07:00
Leonardo de Moura
0fcbcb4cce chore(tests/lean): make sure tests only use init and systems.IO 2016-08-11 18:31:33 -07:00
Leonardo de Moura
4e78e35f77 fix(tests/lean): adjust remaining tests to changes in the standard library 2015-11-08 14:04:56 -08:00
Leonardo de Moura
b0f8d86f26 feat(frontends/lean/parser): reject ambiguous parameter declaration, closes #242 2014-10-10 18:08:03 -07:00