summaryrefslogtreecommitdiff
path: root/src/Util.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2022-07-24 20:54:56 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2022-07-24 20:54:56 +0200
commitc90a5abf0eeded8ff8a4aaee5ef35674236ed197 (patch)
treea00c45f0915aa916ccf50872dd32ca5ef0b6fc4f /src/Util.hs
parent7cefecfc3d491ae668a32cbc89668a055c0268de (diff)
Print relevant variable values after expect failure
Diffstat (limited to 'src/Util.hs')
-rw-r--r--src/Util.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Util.hs b/src/Util.hs
new file mode 100644
index 0000000..99d51f6
--- /dev/null
+++ b/src/Util.hs
@@ -0,0 +1,6 @@
+module Util where
+
+uniq :: Eq a => [a] -> [a]
+uniq (x:y:xs) | x == y = uniq (x:xs)
+ | otherwise = x : uniq (y:xs)
+uniq xs = xs