aboutsummaryrefslogtreecommitdiff
path: root/src/Assembly/QhasmUtil.v
diff options
context:
space:
mode:
Diffstat (limited to 'src/Assembly/QhasmUtil.v')
-rw-r--r--src/Assembly/QhasmUtil.v6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Assembly/QhasmUtil.v b/src/Assembly/QhasmUtil.v
index 79591d40d..b7dd90da6 100644
--- a/src/Assembly/QhasmUtil.v
+++ b/src/Assembly/QhasmUtil.v
@@ -80,6 +80,12 @@ Section Util.
end.
Notation "A <- X ; B" := (omap X (fun A => B)) (at level 70, right associativity).
+
+ Definition orElse {T} (d: T) (o: option T): T :=
+ match o with
+ | Some v => v
+ | None => d
+ end.
End Util.
Close Scope nword_scope. \ No newline at end of file