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
Pierre Roux
Iris
Commits
8c7aa6c8
Commit
8c7aa6c8
authored
2 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Address comments Ralf.
parent
8ebf6025
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
iris/algebra/ofe.v
+9
-8
9 additions, 8 deletions
iris/algebra/ofe.v
with
9 additions
and
8 deletions
iris/algebra/ofe.v
+
9
−
8
View file @
8c7aa6c8
...
...
@@ -1003,18 +1003,19 @@ are two ways in which they can be used:
[natO] below for an example.
2. As part of abstractions that are parametrized with a [Type], but where an
[ofe] is needed to use (camera) combinators. See [ghost_var] as an example.
In this case, the public API of the abstraction should exclusively use
[Type], i.e., the use of [leibnizO] or [discreteO] should not leak. Otherwise
client code can end up with overlapping instances, and thus experience odd
unification failures.
You should *never* use [leibnizO] or [discreteO] on compound types such as
[list nat]. That creates overlapping canonical instances for the head symbol
(e.g., [listO] and [leibnizO (list nat)]) and confuses unification. Instead, you
should declare a canonical instance for the ground type, and use the OFE on the
compound type (e.g., [listO natO]). You can define instances for boxed types.
For example, given [Record ty := Ty { ty_car : list ... }], you can define
[Canonical Structure tyO := leibnizO ty].
When building abstractions (point 2, above), make sure that [leibnizO] does not
leak into the API boundary. Otherwise client code can end up with overlapping
instances, and thus experience odd unification failures. *)
have two options:
- declare/use a canonical instance for the ground type, e.g., [listO natO].
- declare a newtype, e.g., [Record ty := Ty { ty_car : list nat }], and then
declare a canonical instance for that type, e.g.,
[Canonical Structure tyO := leibnizO ty]. *)
(** The combinator [discreteO A] lifts an existing [Equiv A] instance into a
discrete OFE. *)
...
...
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