Skip to content

Commit 29e22df

Browse files
MatthewDaggittandreasabel
authored andcommitted
Undeprecate inspect idiom (#2107)
1 parent 824cca0 commit 29e22df

File tree

2 files changed

+8
-23
lines changed

2 files changed

+8
-23
lines changed

CHANGELOG.md

-8
Original file line numberDiff line numberDiff line change
@@ -1556,14 +1556,6 @@ Deprecated names
15561556
* This fixes the fact we had picked the wrong name originally. The erased modality
15571557
corresponds to @0 whereas the irrelevance one corresponds to `.`.
15581558

1559-
### Deprecated `Relation.Binary.PropositionalEquality.inspect`
1560-
in favour of `with ... in ...` syntax (issue #1580; PRs #1630, #1930)
1561-
1562-
* In `Relation.Binary.PropositionalEquality`
1563-
both the record type `Reveal_·_is_`
1564-
and its principal mode of use, `inspect`,
1565-
have been deprecated in favour of the new `with ... in ...` syntax.
1566-
See the documentation of [with-abstraction equality](https://agda.readthedocs.io/en/v2.6.3/language/with-abstraction.html#with-abstraction-equality)
15671559

15681560
New modules
15691561
-----------

src/Relation/Binary/PropositionalEquality.agda

+8-15
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,17 @@ module _ (_≟_ : DecidableEquality A) {x y : A} where
104104
≢-≟-identity = dec-no (x ≟ y)
105105

106106

107+
------------------------------------------------------------------------
108+
-- Inspect
107109

110+
-- Inspect can be used when you want to pattern match on the result r
111+
-- of some expression e, and you also need to "remember" that r ≡ e.
108112

109-
------------------------------------------------------------------------
110-
-- DEPRECATED NAMES
111-
------------------------------------------------------------------------
112-
-- Please use the new names as continuing support for the old names is
113-
-- not guaranteed.
113+
-- See README.Inspect for an explanation of how/why to use this.
114114

115-
-- Version 2.0
115+
-- Normally (but not always) the new `with ... in` syntax described at
116+
-- https://agda.readthedocs.io/en/v2.6.3/language/with-abstraction.html#with-abstraction-equality
117+
-- can be used instead."
116118

117119
record Reveal_·_is_ {A : Set a} {B : A Set b}
118120
(f : (x : A) B x) (x : A) (y : B x) :
@@ -123,12 +125,3 @@ record Reveal_·_is_ {A : Set a} {B : A → Set b}
123125
inspect : {A : Set a} {B : A Set b}
124126
(f : (x : A) B x) (x : A) Reveal f · x is f x
125127
inspect f x = [ refl ]
126-
127-
{-# WARNING_ON_USAGE Reveal_·_is_
128-
"Warning: Reveal_·_is_ was deprecated in v2.0.
129-
Please use new `with ... in` syntax described at https://agda.readthedocs.io/en/v2.6.3/language/with-abstraction.html#with-abstraction-equality instead."
130-
#-}
131-
{-# WARNING_ON_USAGE inspect
132-
"Warning: inspect was deprecated in v2.0.
133-
Please use new `with ... in` syntax described at https://agda.readthedocs.io/en/v2.6.3/language/with-abstraction.html#with-abstraction-equality instead."
134-
#-}

0 commit comments

Comments
 (0)