We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
_≟_
Haskell.Law.Eq.Def
1 parent 7cae101 commit 83a2eadCopy full SHA for 83a2ead
lib/Haskell/Law/Eq/Def.agda
@@ -7,6 +7,7 @@ open import Haskell.Prim.Double
7
open import Haskell.Prim.Eq
8
9
open import Haskell.Extra.Dec
10
+open import Haskell.Extra.Refinement
11
12
open import Haskell.Law.Bool
13
open import Haskell.Law.Equality
@@ -35,6 +36,12 @@ record IsLawfulEq (e : Set) ⦃ iEq : Eq e ⦄ : Set₁ where
35
36
37
open IsLawfulEq ⦃ ... ⦄ public
38
39
+-- Types with a lawful Eq instance have decidable equality
40
+_≟_ : {{_ : Eq a}} {{_ : IsLawfulEq a}} → (x y : a) → Dec (x ≡ y)
41
+x ≟ y = (x == y) ⟨ isEquality x y ⟩
42
+
43
+{-# COMPILE AGDA2HS _≟_ inline #-}
44
45
-- Reflexivity: x == x = True
46
eqReflexivity : ⦃ iEq : Eq e ⦄ → ⦃ IsLawfulEq e ⦄
47
→ ∀ (x : e) → (x == x) ≡ True
0 commit comments