diff options
author | Yann Herklotz <git@yannherklotz.com> | 2020-01-22 18:29:14 +0000 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2020-01-22 18:29:14 +0000 |
commit | 25918315c8cde34e5e5587921be9587fbfb3e3eb (patch) | |
tree | 0fddc7996cb831a660a402d46a6bef52d9e588bf | |
parent | 72885d324f8b66dbcbef160c5856cbc1680ca60b (diff) | |
download | vericert-25918315c8cde34e5e5587921be9587fbfb3e3eb.tar.gz vericert-25918315c8cde34e5e5587921be9587fbfb3e3eb.zip |
Add helper function for 'optional'
-rw-r--r-- | CoqUp/Helper.v | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/CoqUp/Helper.v b/CoqUp/Helper.v new file mode 100644 index 0000000..fef7b9e --- /dev/null +++ b/CoqUp/Helper.v @@ -0,0 +1,10 @@ +Module OptionHelpers. + +Definition opt_default {T : Type} (x : T) (u : option T) : T := + match u with + | Some y => y + | None => x + end. + +End OptionHelpers. +Export OptionHelpers. |