Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Rice Wine
Iris
Commits
e78a78ab
Commit
e78a78ab
authored
Jun 23, 2016
by
Robbert Krebbers
Browse files
heap_lang notations for Some/None.
parent
ab1f6c67
Changes
1
Hide whitespace changes
Inline
Side-by-side
heap_lang/notation.v
View file @
e78a78ab
...
...
@@ -99,3 +99,17 @@ Notation "'let:' x := e1 'in' e2" := (LamV x%bind e2%E e1%E)
(
at
level
102
,
x
at
level
1
,
e1
,
e2
at
level
200
)
:
val_scope
.
Notation
"e1 ;; e2"
:
=
(
LamV
BAnon
e2
%
E
e1
%
E
)
(
at
level
100
,
e2
at
level
200
,
format
"e1 ;; e2"
)
:
val_scope
.
(** Notations for option *)
Notation
NONE
:
=
(
InjL
#()).
Notation
SOME
x
:
=
(
InjR
x
).
Notation
NONEV
:
=
(
InjLV
#()).
Notation
SOMEV
x
:
=
(
InjRV
x
).
Notation
"'match:' e0 'with' 'NONE' => e1 | 'SOME' x => e2 'end'"
:
=
(
Match
e0
BAnon
e1
x
%
bind
e2
)
(
e0
,
e1
,
x
,
e2
at
level
200
)
:
expr_scope
.
Notation
"'match:' e0 'with' 'SOME' x => e2 | 'NONE' => e1 | 'end'"
:
=
(
Match
e0
BAnon
e1
x
%
bind
e2
)
(
e0
,
e1
,
x
,
e2
at
level
200
,
only
parsing
)
:
expr_scope
.
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment