Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
cpdt
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
research
cpdt
Commits
36daf5e8
Commit
36daf5e8
authored
May 15, 2010
by
Adam Chlipala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Typo pointed out by Ben Moseley
parent
e78f5c70
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
StackMachine.v
src/StackMachine.v
+1
-1
No files found.
src/StackMachine.v
View file @
36daf5e8
...
@@ -618,7 +618,7 @@ Definition tbinopDenote arg1 arg2 res (b : tbinop arg1 arg2 res)
...
@@ -618,7 +618,7 @@ Definition tbinopDenote arg1 arg2 res (b : tbinop arg1 arg2 res)
(
**
This
function
has
just
a
few
differences
from
the
denotation
functions
we
saw
earlier
.
First
,
[
tbinop
]
is
an
indexed
type
,
so
its
indices
become
additional
arguments
to
[
tbinopDenote
]
.
Second
,
we
need
to
perform
a
genuine
%
\
textit
{%
#
<
i
>
#
dependent
pattern
match
#
</
i
>
#
%}%
to
come
up
with
a
definition
of
this
function
that
type
-
checks
.
In
each
branch
of
the
[
match
]
,
we
need
to
use
branch
-
specific
information
about
the
indices
to
[
tbinop
]
.
General
type
inference
that
takes
such
information
into
account
is
undecidable
,
so
it
is
often
necessary
to
write
annotations
,
like
we
see
above
on
the
line
with
[
match
]
.
(
**
This
function
has
just
a
few
differences
from
the
denotation
functions
we
saw
earlier
.
First
,
[
tbinop
]
is
an
indexed
type
,
so
its
indices
become
additional
arguments
to
[
tbinopDenote
]
.
Second
,
we
need
to
perform
a
genuine
%
\
textit
{%
#
<
i
>
#
dependent
pattern
match
#
</
i
>
#
%}%
to
come
up
with
a
definition
of
this
function
that
type
-
checks
.
In
each
branch
of
the
[
match
]
,
we
need
to
use
branch
-
specific
information
about
the
indices
to
[
tbinop
]
.
General
type
inference
that
takes
such
information
into
account
is
undecidable
,
so
it
is
often
necessary
to
write
annotations
,
like
we
see
above
on
the
line
with
[
match
]
.
The
[
in
]
annotation
restates
the
type
of
the
term
being
case
-
analyzed
.
Though
we
use
the
same
names
for
the
indices
as
we
use
in
the
type
of
the
original
argument
binder
,
these
are
actually
fresh
variables
,
and
they
are
%
\
textit
{%
#
<
i
>
#
binding
occurrences
#
</
i
>
#
%}%.
Their
scope
is
the
[
return
]
clause
.
That
is
,
[
arg1
]
,
[
arg2
]
,
and
[
arg3
]
are
new
bound
variables
bound
only
within
the
return
clause
[
typeDenote
arg1
->
typeDenote
arg2
->
typeDenote
res
]
.
By
being
explicit
about
the
functional
relationship
between
the
type
indices
and
the
match
result
,
we
regain
decidable
type
inference
.
The
[
in
]
annotation
restates
the
type
of
the
term
being
case
-
analyzed
.
Though
we
use
the
same
names
for
the
indices
as
we
use
in
the
type
of
the
original
argument
binder
,
these
are
actually
fresh
variables
,
and
they
are
%
\
textit
{%
#
<
i
>
#
binding
occurrences
#
</
i
>
#
%}%.
Their
scope
is
the
[
return
]
clause
.
That
is
,
[
arg1
]
,
[
arg2
]
,
and
[
res
]
are
new
bound
variables
bound
only
within
the
return
clause
[
typeDenote
arg1
->
typeDenote
arg2
->
typeDenote
res
]
.
By
being
explicit
about
the
functional
relationship
between
the
type
indices
and
the
match
result
,
we
regain
decidable
type
inference
.
In
fact
,
recent
Coq
versions
use
some
heuristics
that
can
save
us
the
trouble
of
writing
[
match
]
annotations
,
and
those
heuristics
get
the
job
done
in
this
case
.
We
can
get
away
with
writing
just
:
*
)
In
fact
,
recent
Coq
versions
use
some
heuristics
that
can
save
us
the
trouble
of
writing
[
match
]
annotations
,
and
those
heuristics
get
the
job
done
in
this
case
.
We
can
get
away
with
writing
just
:
*
)
...
...
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