File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ private
26
26
∷-injective : ∀ {x y xs ys} →
27
27
(List⁺ A ∋ x ∷ xs) ≡ y ∷ ys → x ≡ y × xs ≡ ys
28
28
∷-injective refl = (refl , refl)
29
+
29
30
module _ ⦃ _ : DecEq A ⦄ where instance
30
31
DecEq-List⁺ : DecEq (List⁺ A)
31
32
DecEq-List⁺ ._≟_ (x ∷ xs) (y ∷ ys)
@@ -44,6 +45,15 @@ module _ ⦃ _ : DecEq A ⦄ where instance
44
45
DecEq-Maybe ._≟_ = M.≡-dec _≟_
45
46
where import Data.Maybe.Properties as M
46
47
48
+ open import Data.Refinement
49
+
50
+ -- Equality for a Refinement type is decide if the equality
51
+ -- for the type to be refined is decidable.
52
+ DecEq-Refinement : ∀ {p} {P : A → Set p} → DecEq (Refinement A P)
53
+ DecEq-Refinement ._≟_ (x , px) (y , py) with x ≟ y
54
+ ... | no neq = no (neq ∘ cong value)
55
+ ... | yes refl = yes refl
56
+
47
57
module _ ⦃ _ : DecEq A ⦄ ⦃ _ : DecEq B ⦄ where
48
58
49
59
-- Not exported as instance so that users can also choose `Class.DecEq.WithK.DecEq-Σ`
You can’t perform that action at this time.
0 commit comments