Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gaëtan Gilbert
Iris
Commits
08f8c875
Verified
Commit
08f8c875
authored
4 years ago
by
Tej Chajed
Browse files
Options
Downloads
Patches
Plain Diff
Use original pattern in iDestruct error messages
parent
832a63d6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/proofmode.ref
+3
-2
3 additions, 2 deletions
tests/proofmode.ref
tests/proofmode.v
+1
-0
1 addition, 0 deletions
tests/proofmode.v
theories/proofmode/ltac_tactics.v
+12
-10
12 additions, 10 deletions
theories/proofmode/ltac_tactics.v
with
16 additions
and
12 deletions
tests/proofmode.ref
+
3
−
2
View file @
08f8c875
...
...
@@ -634,8 +634,9 @@ The command has indeed failed with message:
Tactic failure: iDestruct: "{HP}"
should contain exactly one proper introduction pattern.
The command has indeed failed with message:
Tactic failure: iDestruct: (IList [[IClear (sel_patterns.SelIdent "HP")]])
invalid.
Tactic failure: iDestruct: "[{HP}]" invalid.
The command has indeed failed with message:
Tactic failure: iDestruct: "[HP HQ HR]" has too many conjuncts.
The command has indeed failed with message:
Tactic failure: iDestruct: "HP HQ HR"
should contain exactly one proper introduction pattern.
...
...
This diff is collapsed.
Click to expand it.
tests/proofmode.v
+
1
−
0
View file @
08f8c875
...
...
@@ -1228,6 +1228,7 @@ Proof.
iIntros
"HP"
.
Fail
iDestruct
"HP"
as
"{HP}"
.
Fail
iDestruct
"HP"
as
"[{HP}]"
.
Fail
iDestruct
"HP"
as
"[HP HQ HR]"
.
Fail
iDestruct
"HP"
as
"HP HQ HR"
.
Abort
.
...
...
This diff is collapsed.
Click to expand it.
theories/proofmode/ltac_tactics.v
+
12
−
10
View file @
08f8c875
...
...
@@ -1419,7 +1419,8 @@ Local Ltac string_to_ident s :=
end
.
(** * Basic destruct tactic *)
Local
Ltac
iDestructHypGo
Hz
pat
:=
(* pat0 is the unparsed pattern and is only used in error messages *)
Local
Ltac
iDestructHypGo
Hz
pat0
pat
:=
lazymatch
pat
with
|
IFresh
=>
lazymatch
Hz
with
...
...
@@ -1430,20 +1431,21 @@ Local Ltac iDestructHypGo Hz pat :=
|
IFrame
=>
iFrameHyp
Hz
|
IIdent
?y
=>
iRename
Hz
into
y
|
IList
[[]]
=>
iExFalso
;
iExact
Hz
|
IList
[[
?pat1
;
IDrop
]]
=>
iAndDestructChoice
Hz
as
Left
Hz
;
iDestructHypGo
Hz
pat1
|
IList
[[
IDrop
;
?pat2
]]
=>
iAndDestructChoice
Hz
as
Right
Hz
;
iDestructHypGo
Hz
pat2
|
IList
[[
?pat1
;
IDrop
]]
=>
iAndDestructChoice
Hz
as
Left
Hz
;
iDestructHypGo
Hz
pat0
pat1
|
IList
[[
IDrop
;
?pat2
]]
=>
iAndDestructChoice
Hz
as
Right
Hz
;
iDestructHypGo
Hz
pat0
pat2
|
IList
[[
?pat1
;
?pat2
]]
=>
let
Hy
:=
iFresh
in
iAndDestruct
Hz
as
Hz
Hy
;
iDestructHypGo
Hz
pat1
;
iDestructHypGo
Hy
pat2
|
IList
[[
?pat1
];[
?pat2
]]
=>
iOrDestruct
Hz
as
Hz
Hz
;
[
iDestructHypGo
Hz
pat1
|
iDestructHypGo
Hz
pat2
]
let
Hy
:=
iFresh
in
iAndDestruct
Hz
as
Hz
Hy
;
iDestructHypGo
Hz
pat0
pat1
;
iDestructHypGo
Hy
pat0
pat2
|
IList
[[
?pat1
];[
?pat2
]]
=>
iOrDestruct
Hz
as
Hz
Hz
;
[
iDestructHypGo
Hz
pat0
pat1
|
iDestructHypGo
Hz
pat0
pat2
]
|
IList
[_
::
_
::
_]
=>
fail
"iDestruct:"
pat0
"has too many conjuncts"
|
IPure
IGallinaAnon
=>
iPure
Hz
as
?
|
IPure
(
IGallinaNamed
?s
)
=>
let
x
:=
string_to_ident
s
in
iPure
Hz
as
x
|
IRewrite
Right
=>
iPure
Hz
as
->
|
IRewrite
Left
=>
iPure
Hz
as
<-
|
IIntuitionistic
?pat
=>
iIntuitionistic
Hz
;
iDestructHypGo
Hz
pat
|
ISpatial
?pat
=>
iSpatial
Hz
;
iDestructHypGo
Hz
pat
|
IModalElim
?pat
=>
iModCore
Hz
;
iDestructHypGo
Hz
pat
|
_
=>
fail
"iDestruct:"
pat
"invalid"
|
IIntuitionistic
?pat
=>
iIntuitionistic
Hz
;
iDestructHypGo
Hz
pat
0
pat
|
ISpatial
?pat
=>
iSpatial
Hz
;
iDestructHypGo
Hz
pat
0
pat
|
IModalElim
?pat
=>
iModCore
Hz
;
iDestructHypGo
Hz
pat
0
pat
|
_
=>
fail
"iDestruct:"
pat
0
"invalid"
end
.
Local
Ltac
iDestructHypFindPat
Hgo
pat
found
pats
:=
lazymatch
pats
with
...
...
@@ -1457,7 +1459,7 @@ Local Ltac iDestructHypFindPat Hgo pat found pats :=
|
IClearFrame
?H
::
?pats
=>
iFrame
H
;
iDestructHypFindPat
Hgo
pat
found
pats
|
?pat1
::
?pats
=>
lazymatch
found
with
|
false
=>
iDestructHypGo
Hgo
pat1
;
iDestructHypFindPat
Hgo
pat
true
pats
|
false
=>
iDestructHypGo
Hgo
pat
pat1
;
iDestructHypFindPat
Hgo
pat
true
pats
|
true
=>
fail
"iDestruct:"
pat
"should contain exactly one proper introduction pattern"
end
end
.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment