From b4a0f83c3d9853cd2594bfb3f88adda5e783451e Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Mon, 4 Jun 2018 17:07:36 -0400 Subject: Move Option.List.map to OptionList.map to fix name clashes in Tuple --- src/Util/OptionList.v | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/Util/OptionList.v (limited to 'src/Util/OptionList.v') diff --git a/src/Util/OptionList.v b/src/Util/OptionList.v new file mode 100644 index 000000000..57cc52f06 --- /dev/null +++ b/src/Util/OptionList.v @@ -0,0 +1,20 @@ +Require Import Crypto.Util.Notations. + +Module Option. + Module List. + Section map. + Context {A B} + (f : A -> option B). + + Fixpoint map (ls : list A) : list B + := match ls with + | nil => nil + | cons x xs + => match f x with + | Some fx => fx :: map xs + | None => map xs + end + end. + End map. + End List. +End Option. -- cgit v1.2.3