feat(frontends/lean): add 'record' as an alias for 'structure' command

This commit is contained in:
Leonardo de Moura 2014-11-05 11:40:08 -08:00
parent e71db7109d
commit defc2478b5
3 changed files with 9 additions and 3 deletions

View file

@ -11,7 +11,7 @@
'("import" "reducible" "irreducible" "tactic_hint" "protected" "private" "opaque" "definition" "renaming"
"hiding" "exposing" "parameter" "parameters" "begin" "proof" "qed" "conjecture" "constant" "constants"
"hypothesis" "lemma" "corollary" "variable" "variables" "print" "theorem" "example"
"context" "open" "as" "export" "axiom" "inductive" "with" "structure" "universe" "universes"
"context" "open" "as" "export" "axiom" "inductive" "with" "structure" "record" "universe" "universes"
"alias" "help" "environment" "options" "precedence" "reserve" "postfix" "prefix"
"calc_trans" "calc_subst" "calc_refl" "calc_symm"
"infix" "infixl" "infixr" "notation" "eval" "check" "exit" "coercion" "end"
@ -105,7 +105,7 @@
(,(rx (or "λ" "" "" "" ":=")) . 'font-lock-constant-face )
;; universe/inductive/theorem... "names"
(,(rx word-start
(group (or "inductive" "theorem" "axiom" "lemma" "hypothesis" "definition" "constant"))
(group (or "inductive" "structure" "record" "theorem" "axiom" "lemma" "hypothesis" "definition" "constant"))
word-end
(zero-or-more (or whitespace "(" "{" "["))
(group (zero-or-more (not (any " \t\n\r")))))

View file

@ -95,7 +95,7 @@ void init_token_table(token_table & t) {
pair<char const *, char const *> cmd_aliases[] =
{{"lemma", "theorem"}, {"corollary", "theorem"}, {"hypothesis", "parameter"}, {"conjecture", "parameter"},
{nullptr, nullptr}};
{"record", "structure"}, {nullptr, nullptr}};
auto it = builtin;
while (it->first) {

View file

@ -0,0 +1,6 @@
import data.nat.basic
record point :=
(x y : nat)
check point.x