aboutsummaryrefslogtreecommitdiff
path: root/src/Util.bs
diff options
context:
space:
mode:
authorNathan Ringo <nathan@remexre.com>2024-05-05 22:30:50 -0500
committerNathan Ringo <nathan@remexre.com>2024-05-05 22:30:50 -0500
commitf9b73dc7b93bbf60f5b2281a5056c4339e049388 (patch)
tree5325a2e6ee78bb36179c5b2b4c56da806214e426 /src/Util.bs
parent0874c7f1852145c3ae62f1e28dc10c0c89d78b45 (diff)
triyng a uart from scratch... not yet working...
Diffstat (limited to 'src/Util.bs')
-rw-r--r--src/Util.bs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Util.bs b/src/Util.bs
new file mode 100644
index 0000000..ab3074c
--- /dev/null
+++ b/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 :