aboutsummaryrefslogtreecommitdiff
path: root/fpga/src/Util.bs
diff options
context:
space:
mode:
Diffstat (limited to 'fpga/src/Util.bs')
-rw-r--r--fpga/src/Util.bs7
1 files changed, 7 insertions, 0 deletions
diff --git a/fpga/src/Util.bs b/fpga/src/Util.bs
new file mode 100644
index 0000000..ab3074c
--- /dev/null
+++ b/fpga/src/Util.bs
@@ -0,0 +1,7 @@
+package Util where
+
+when_ :: (Monad m) => Bool -> m () -> m ()
+when_ True x = x
+when_ False _ = return ()
+
+-- vim: set ft=haskell :