lean4-htt/library/init
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
..
meta feat(frontends/lean): new pattern matching validation 2016-08-07 11:31:11 -07:00
alternative.lean feat(library/init): add 'guard' and helper typeclasses 2016-07-07 00:52:52 -07:00
applicative.lean chore(library/init/applicative): make it easier to elaborate 2016-08-03 15:32:43 -07:00
bool.lean refactor(library): move 'none', 'some', 'tt', 'ff' to top-level 2016-06-25 12:39:19 -07:00
char.lean chore(library/coercion): disable coercion attribute 2016-07-29 13:15:10 -07:00
classical.lean refactor(library): remove eq.ops namespace 2016-07-31 12:50:11 -07:00
coe.lean feat(frontends/lean/elaborator): coercions to sort 2016-07-30 19:47:04 -07:00
combinator.lean feat(library/init): add combinators SKI 2016-06-09 14:39:20 -07:00
datatypes.lean refactor(frontends/lean/structure_cmd): remove unnecessary options 2016-08-03 15:48:58 -07:00
default.lean feat(library/init): add has_lift has_coe has_coe_to_fun type classes 2016-07-30 10:11:30 -07:00
fin.lean chore(library/coercion): disable coercion attribute 2016-07-29 13:15:10 -07:00
function.lean feat(frontends/lean, library): remove attribute and metaclass scoping 2016-07-29 23:44:21 -04:00
functor.lean refactor(library/init/functor): better signature 2016-07-22 16:43:54 -07:00
funext.lean feat(frontends/lean, library): remove attribute and metaclass scoping 2016-07-29 23:44:21 -04:00
init.md chore(*.md): fix/remove broken links 2016-02-23 10:11:24 -08:00
instances.lean refactor(library/init): change subtype notation and put it on the top-level 2016-07-23 12:30:11 -07:00
list.lean feat(library/init): use mk_dec_eq_instance in the init folder 2016-07-20 20:21:58 -04:00
list_classes.lean feat(library/init): add 'guard' and helper typeclasses 2016-07-07 00:52:52 -07:00
logic.lean feat(frontends/lean): new pattern matching validation 2016-08-07 11:31:11 -07:00
measurable.lean chore(tests/lean): adjust tests 2016-07-23 12:48:35 -07:00
monad.lean feat(library/init): add 'guard' and helper typeclasses 2016-07-07 00:52:52 -07:00
nat.lean refactor(library): remove eq.ops namespace 2016-07-31 12:50:11 -07:00
num.lean refactor(library): move 'none', 'some', 'tt', 'ff' to top-level 2016-06-25 12:39:19 -07:00
option.lean feat(library/init/option): show that optionT is an instance of alternative 2016-07-22 15:39:03 -07:00
ordering.lean feat(frontends/lean): new pattern matching validation 2016-08-07 11:31:11 -07:00
prod.lean refactor(library): move 'none', 'some', 'tt', 'ff' to top-level 2016-06-25 12:39:19 -07:00
quot.lean chore(library): disable sigma.mk notation 2016-08-04 10:44:48 -07:00
relation.lean feat(library/data/list/sort): add sort for lists 2015-08-09 14:23:09 -07:00
reserved_notation.lean feat(frontends/lean): new pattern matching validation 2016-08-07 11:31:11 -07:00
setoid.lean feat(init/setoid): tag equivalence relation 2015-12-05 11:54:27 -08:00
sigma.lean chore(library): disable sigma.mk notation 2016-08-04 10:44:48 -07:00
sigma_lex.lean chore(library): disable sigma.mk notation 2016-08-04 10:44:48 -07:00
simplifier.lean refactor(library): remove eq.ops namespace 2016-07-31 12:50:11 -07:00
state.lean feat(library/init): add state monad and stateT monad transformer 2016-07-22 15:42:29 -07:00
string.lean feat(library/init/string): add utf8_length 2016-07-19 14:22:37 -04:00
subtype.lean refactor(frontends/lean/structure_cmd): remove unnecessary options 2016-08-03 15:48:58 -07:00
timeit.lean chore(library): unit.star ==> () 2016-06-08 17:31:44 -07:00
to_string.lean feat(frontends/lean): add support for character literals 2016-07-18 14:07:10 -04:00
trace.lean fix(library/init): add missing file 2016-06-09 14:39:56 -07:00
unit.lean feat(library/init): use mk_dec_eq_instance in the init folder 2016-07-20 20:21:58 -04:00
unsigned.lean chore(library/coercion): disable coercion attribute 2016-07-29 13:15:10 -07:00
wf.lean chore(library/coercion): disable coercion attribute 2016-07-29 13:15:10 -07:00
wf_k.lean feat(init/wf): port from standard library to HoTT library 2016-02-09 10:03:48 -08:00