summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-05-01 09:22:49 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-05-01 09:22:49 +0000
commit7717d9e5f781a0b0d79f72c5439cf822f4ea78d0 (patch)
treed45945dd6c43a0a42ad34ff4a19461f51d238702 /lib
parenteb3c0686c9e819aa906eda462fd1952a8063da6a (diff)
Coq-defined equality functions for Allocation.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2225 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'lib')
-rw-r--r--lib/Coqlib.v7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Coqlib.v b/lib/Coqlib.v
index ce5d94e..58c9572 100644
--- a/lib/Coqlib.v
+++ b/lib/Coqlib.v
@@ -633,6 +633,13 @@ Qed.
Set Implicit Arguments.
+(** Comparing option types. *)
+
+Definition option_eq (A: Type) (eqA: forall (x y: A), {x=y} + {x<>y}):
+ forall (x y: option A), {x=y} + {x<>y}.
+Proof. decide equality. Defined.
+Global Opaque option_eq.
+
(** Mapping a function over an option type. *)
Definition option_map (A B: Type) (f: A -> B) (x: option A) : option B :=