File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
src/Data/List/Relation/Unary Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,11 @@ New modules
32
32
Additions to existing modules
33
33
-----------------------------
34
34
35
+ * In ` Data.List.Relation.Unary.All ` :
36
+ ``` agda
37
+ search : Decidable P → ∀ xs → All (∁ P) xs ⊎ Any P xs
38
+ ```
39
+
35
40
* In ` Data.List.Relation.Binary.Equality.Setoid ` :
36
41
``` agda
37
42
++⁺ʳ : ∀ xs → ys ≋ zs → xs ++ ys ≋ xs ++ zs
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ open import Data.List.Membership.Propositional renaming (_∈_ to _∈ₚ_)
14
14
import Data.List.Membership.Setoid as SetoidMembership
15
15
open import Data.Product.Base as Product
16
16
using (∃; -,_; _×_; _,_; proj₁; proj₂; uncurry)
17
- open import Data.Sum.Base as Sum using (inj₁; inj₂)
17
+ open import Data.Sum.Base as Sum using (_⊎_; inj₁; inj₂)
18
18
open import Effect.Applicative
19
19
open import Effect.Monad
20
20
open import Function.Base using (_∘_; _∘′_; id; const)
@@ -232,6 +232,9 @@ decide p∪q (x ∷ xs) with p∪q x
232
232
... | inj₂ qx = inj₂ (here qx)
233
233
... | inj₁ px = Sum.map (px ∷_) there (decide p∪q xs)
234
234
235
+ search : Decidable P → ∀ xs → All (∁ P) xs ⊎ Any P xs
236
+ search P? = decide (Sum.swap ∘ Dec.toSum ∘ P?)
237
+
235
238
------------------------------------------------------------------------
236
239
-- DEPRECATED
237
240
------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments