Skip to content

Commit 3fe4163

Browse files
jamesmckinnaandreasabel
authored andcommitted
tackles #2124 as regards case_return_of_ (#2157)
1 parent 019e8ae commit 3fe4163

File tree

3 files changed

+26
-7
lines changed

3 files changed

+26
-7
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1776,6 +1776,11 @@ Deprecated names
17761776
map-++-commute ↦ map-++
17771777
```
17781778

1779+
* In `Function.Base`:
1780+
```
1781+
case_return_of_ ↦ case_returning_of_
1782+
```
1783+
17791784
* In `Function.Construct.Composition`:
17801785
```
17811786
_∘-⟶_ ↦ _⟶-∘_

README/Case.agda

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module README.Case where
1212
open import Data.Fin hiding (pred)
1313
open import Data.Maybe hiding (from-just)
1414
open import Data.Nat hiding (pred)
15-
open import Function.Base using (case_of_; case_return_of_)
15+
open import Function.Base using (case_of_; case_returning_of_)
1616
open import Relation.Nullary
1717

1818
------------------------------------------------------------------------
@@ -35,7 +35,7 @@ pred n = case n of λ
3535
-- where-introduced and indentation-identified block of list of clauses
3636

3737
from-just : {a} {A : Set a} (x : Maybe A) From-just x
38-
from-just x = case x return From-just of λ where
38+
from-just x = case x returning From-just of λ where
3939
(just x) x
4040
nothing _
4141

src/Function/Base.agda

+19-5
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ f $- = f _
110110
-- Case expressions (to be used with pattern-matching lambdas, see
111111
-- README.Case).
112112

113-
case_return_of_ : {A : Set a} (x : A) (B : A Set b)
113+
case_returning_of_ : {A : Set a} (x : A) (B : A Set b)
114114
((x : A) B x) B x
115-
case x return B of f = f x
116-
{-# INLINE case_return_of_ #-}
115+
case x returning B of f = f x
116+
{-# INLINE case_returning_of_ #-}
117117

118118
------------------------------------------------------------------------
119119
-- Non-dependent versions of dependent operations
@@ -156,7 +156,7 @@ _|>′_ = _|>_
156156
-- README.Case).
157157

158158
case_of_ : A (A B) B
159-
case x of f = case x return _ of f
159+
case x of f = case x returning _ of f
160160
{-# INLINE case_of_ #-}
161161

162162
------------------------------------------------------------------------
@@ -247,10 +247,24 @@ _*_ on f = f -⟨ _*_ ⟩- f
247247

248248

249249
------------------------------------------------------------------------
250-
-- Deprecated
250+
-- DEPRECATED NAMES
251+
------------------------------------------------------------------------
252+
-- Please use the new names as continuing support for the old names is
253+
-- not guaranteed.
254+
255+
-- Version 1.4
251256

252257
_-[_]-_ = _-⟪_⟫-_
253258
{-# WARNING_ON_USAGE _-[_]-_
254259
"Warning: Function._-[_]-_ was deprecated in v1.4.
255260
Please use _-⟪_⟫-_ instead."
256261
#-}
262+
263+
-- Version 2.0
264+
265+
case_return_of_ = case_returning_of_
266+
{-# WARNING_ON_USAGE case_return_of_
267+
"case_return_of_ was deprecated in v2.0.
268+
Please use case_returning_of_ instead."
269+
#-}
270+

0 commit comments

Comments
 (0)