Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Tej Chajed
iris
Commits
6a3c7402
Commit
6a3c7402
authored
Jan 23, 2017
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Error message when the deprecated * specialization pattern is used.
parent
fdfc790d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
theories/proofmode/spec_patterns.v
theories/proofmode/spec_patterns.v
+5
-1
theories/proofmode/tactics.v
theories/proofmode/tactics.v
+3
-0
No files found.
theories/proofmode/spec_patterns.v
View file @
6a3c7402
...
...
@@ -12,7 +12,8 @@ Inductive spec_pat :=
|
SGoal
:
spec_goal
→
spec_pat
|
SGoalPersistent
:
spec_pat
|
SGoalPure
:
spec_pat
|
SName
:
string
→
spec_pat
.
|
SName
:
string
→
spec_pat
|
SForall
:
spec_pat
.
Module
spec_pat
.
Inductive
token
:
=
...
...
@@ -22,6 +23,7 @@ Inductive token :=
|
TBracketR
:
token
|
TPersistent
:
token
|
TPure
:
token
|
TForall
:
token
|
TModal
:
token
|
TFrame
:
token
.
...
...
@@ -35,6 +37,7 @@ Fixpoint tokenize_go (s : string) (k : list token) (kn : string) : list token :=
|
String
"]"
s
=>
tokenize_go
s
(
TBracketR
::
cons_name
kn
k
)
""
|
String
"#"
s
=>
tokenize_go
s
(
TPersistent
::
cons_name
kn
k
)
""
|
String
"%"
s
=>
tokenize_go
s
(
TPure
::
cons_name
kn
k
)
""
|
String
"*"
s
=>
tokenize_go
s
(
TForall
::
cons_name
kn
k
)
""
|
String
">"
s
=>
tokenize_go
s
(
TModal
::
cons_name
kn
k
)
""
|
String
"$"
s
=>
tokenize_go
s
(
TFrame
::
cons_name
kn
k
)
""
|
String
a
s
=>
...
...
@@ -57,6 +60,7 @@ Fixpoint parse_go (ts : list token) (k : list spec_pat) : option (list spec_pat)
|
TBracketL
::
ts
=>
parse_goal
ts
(
SpecGoal
false
false
[]
[])
k
|
TModal
::
TBracketL
::
ts
=>
parse_goal
ts
(
SpecGoal
true
false
[]
[])
k
|
TModal
::
ts
=>
parse_go
ts
(
SGoal
(
SpecGoal
true
true
[]
[])
::
k
)
|
TForall
::
ts
=>
parse_go
ts
(
SForall
::
k
)
|
_
=>
None
end
with
parse_goal
(
ts
:
list
token
)
(
g
:
spec_goal
)
...
...
theories/proofmode/tactics.v
View file @
6a3c7402
...
...
@@ -285,6 +285,9 @@ Local Tactic Notation "iSpecializePat" constr(H) constr(pat) :=
let
rec
go
H1
pats
:
=
lazymatch
pats
with
|
[]
=>
idtac
|
SForall
::
?pats
=>
idtac
"the * specialization pattern is deprecated because it is applied implicitly"
;
go
H1
pats
|
SName
?H2
::
?pats
=>
eapply
tac_specialize
with
_
_
H2
_
H1
_
_
_
_;
(* (j:=H1) (i:=H2) *)
[
env_cbv
;
reflexivity
||
fail
"iSpecialize:"
H2
"not found"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment