diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2013-05-01 09:22:49 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2013-05-01 09:22:49 +0000 |
commit | 7717d9e5f781a0b0d79f72c5439cf822f4ea78d0 (patch) | |
tree | d45945dd6c43a0a42ad34ff4a19461f51d238702 /lib | |
parent | eb3c0686c9e819aa906eda462fd1952a8063da6a (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.v | 7 |
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 := |