lean4-htt/library
Leonardo de Moura 1e6b3614ab feat(frontends/lean): new pattern matching validation
@Kha, we now support variable/constant shadowing in patterns.
A constant may occur in a pattern if it is a constructor or tagged with
the new [pattern] attribute. In the standard library, I have tagged
'add', 'zero', 'one', 'bit0', 'bit1' and 'rfl' with this new attribute.
BTW, arbitrary constants and variables may occur nested in type ascriptions and
inaccessible terms.

Here is an example:

     meta_definition tactic_result_to_string {A : Type} : tactic_result A → string
     | (success a s)   := to_string a
     | (exception ⌞A⌟ e s) := "Exception: " ++ to_string (e ())

I had to use the inaccessible ⌞A⌟ in the example above, otherwise, we would be shadowing the parameter
{A : Type}, and we would get a type error.

The new validation is performed at to_pattern_fn (parser.cpp).
2016-08-07 11:31:11 -07:00
..
algebra refactor(library): remove eq.ops namespace 2016-07-31 12:50:11 -07:00
data feat(frontends/lean): new pattern matching validation 2016-08-07 11:31:11 -07:00
examples chore(frontends/lean): disable expressions that use tactic framework 2016-04-25 15:07:26 -07:00
init feat(frontends/lean): new pattern matching validation 2016-08-07 11:31:11 -07:00
logic refactor(library): remove eq.ops namespace 2016-07-31 12:50:11 -07:00
smt refactor(library/smt): move smt files from algebra 2016-07-29 10:44:44 -07:00
system refactor(library): move 'meta' to 'init' folder 2016-06-06 19:08:07 -07:00
theories fix(library): remove classical instances from global scope 2016-07-29 23:44:23 -04:00
tools chore(library): remove old tactic definition 2016-06-06 14:11:40 -07:00
.gitignore chore(library/.gitignore): update 2014-08-29 10:31:16 -07:00
.project feat(library,frontends/lean/pp): add support for new string encoding 2016-05-24 16:20:43 -07:00
library.md chore(*.md): fix/remove broken links 2016-02-23 10:11:24 -08:00
standard.lean refactor(library/*): remove 'Module:' lines 2015-05-23 20:52:23 +10:00