Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
concordium
smart-contract-interactions
Commits
0caed85a
Commit
0caed85a
authored
Jun 14, 2019
by
Jakob Botsch Nielsen
Browse files
Use constructor again, but make cbn/simpl unfold it
parent
b11b457b
Pipeline
#12767
passed with stage
in 6 minutes and 6 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
vendor/record-update/RecordSet.v
View file @
0caed85a
...
...
@@ -8,6 +8,9 @@ Arguments Reader : clear implicits.
(
*
pure
/
return
*
)
Definition
constructor
{
E
T
}
(
x
:
T
)
:
Reader
E
(
fun
_
=>
T
)
:=
fun
_
=>
x
.
(
*
Always
unfold
constructor
when
applied
with
with
a
"final"
argument
.
*
)
Arguments
constructor
{
_
_
}
_
_
/
.
(
*
Applicative
'
s
(
<*>
)
(
written
as
`ap
`
).
This
has
an
awkwardly
long
name
since
it
'
s
intended
to
be
used
infix
with
...
...
@@ -98,12 +101,12 @@ Hint Extern 1 (SetterWf _) => SetterWfInstance_t : typeclass_instances.
Module
RecordSetNotations
.
Delimit
Scope
record_set
with
rs
.
Open
Scope
rs
.
Notation
"x <| proj := v |>"
:=
(
set
proj
(
fun
_
=>
v
)
x
)
Notation
"x <| proj := v |>"
:=
(
set
proj
(
constructor
v
)
x
)
(
at
level
12
,
left
associativity
)
:
record_set
.
Notation
"x <| proj ::= f |>"
:=
(
set
proj
f
x
)
(
at
level
12
,
f
at
next
level
,
left
associativity
)
:
record_set
.
Notation
"x <| proj1 ; proj2 ; .. ; projn := v |>"
:=
(
set
proj1
(
set
proj2
..
(
set
projn
(
fun
_
=>
v
))
..)
x
)
(
set
proj1
(
set
proj2
..
(
set
projn
(
constructor
v
))
..)
x
)
(
at
level
12
,
left
associativity
).
Notation
"x <| proj1 ; proj2 ; .. ; projn ::= f |>"
:=
(
set
proj1
(
set
proj2
..
(
set
projn
f
)
..)
x
)
...
...
Write
Preview
Supports
Markdown
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