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.
1 parent 031508a commit d62e45dCopy full SHA for d62e45d
libs/base/Data/DPair.idr
@@ -1,5 +1,7 @@
1
module Data.DPair
2
3
+import Decidable.Equality
4
+
5
%default total
6
7
namespace DPair
@@ -16,6 +18,12 @@ namespace DPair
16
18
bimap : {0 p : a -> Type} -> {0 q : b -> Type} -> (f : a -> b) -> (forall x. p x -> q (f x)) -> (x : a ** p x) -> (y : b ** q y)
17
19
bimap f g (x ** y) = (f x ** g y)
20
21
+ public export
22
+ DecEq k => ({x : k} -> Eq (v x)) => Eq (DPair k v) where
23
+ (k1 ** v1) == (k2 ** v2) = case decEq k1 k2 of
24
+ Yes Refl => v1 == v2
25
+ No _ => False
26
27
namespace Exists
28
29
||| A dependent pair in which the first field (witness) should be
0 commit comments