[ deprecate ] Relation/Binary.PropositionalEquality.inspect (#1580 / #1630 / #1930 redux)#2934
Open
jamesmckinna wants to merge 2 commits intoagda:masterfrom
Open
[ deprecate ] Relation/Binary.PropositionalEquality.inspect (#1580 / #1630 / #1930 redux)#2934jamesmckinna wants to merge 2 commits intoagda:masterfrom
Relation/Binary.PropositionalEquality.inspect (#1580 / #1630 / #1930 redux)#2934jamesmckinna wants to merge 2 commits intoagda:masterfrom
Conversation
Collaborator
Author
|
I further experimented with the following 'alternative' (well: hardly!) design, which is less dramatic, but does achieve (by the back door) deprecation of the bugbear module Graph {A : Set a} {B : A → Set b} (f : (x : A) → B x) (x : A) where
record View (y : B x) : Set (a ⊔ b) where
field fx≡y : f x ≡ y
view : View (f x)
view .View.fx≡y = refl
pattern [_] eq = record { fx≡y = eq } -- can be omitted?
-- Version 2.4
module _ {A : Set a} {B : A → Set b} where
Reveal_·_is_ : (f : (x : A) → B x) (x : A) (y : B x) → Set (a ⊔ b)
Reveal f · x is y = Graph.View f x y
inspect : (f : (x : A) → B x) (x : A) → Reveal f · x is f x
inspect = Graph.view
{-# WARNING_ON_USAGE inspect
"Warning: inspect was deprecated in v2.4.
Please use Graph.view instead. "
#-}
{-# WARNING_ON_USAGE Reveal_·_is_
"Warning: Reveal_·_is_ was deprecated in v2.4.
Please use Graph.View instead. "
#-}That way we still retain a useful notion (the graph relation associated with a function, cf. my comment on #2909; this is Conor's
Perhaps the thing to do is to lift this out to a separate module, or else in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1580 see the discussion there and on the previous attempts #1630 #1930.
CHANGELOGbased on text from #1930NB
Relation/Binary.HeterogeneousEquality.*modules, which should be tackled in a separate PR, once we can agree how best to deal with them.README.Inspect#2928 (on which this PR isblocking;-)) forward pointers to documentation of the Agda v2.9.0 release.UPDATED: added
CHANGELOG, but cancelled most recentmake testto save cycles.