summaryrefslogtreecommitdiffstats
path: root/src/utils.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.hs')
-rw-r--r--src/utils.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/utils.hs b/src/utils.hs
index 7618f5b..beff25e 100644
--- a/src/utils.hs
+++ b/src/utils.hs
@@ -31,5 +31,10 @@ isIntStr str =
Just _ -> True
Nothing -> False
+isCharStr str =
+ case str of
+ ['\'', c, '\''] -> True
+ _ -> False
+
breakOn :: (a -> Bool) -> [a] -> ([a], [a])
breakOn cond xs = break cond xs $> B.second (drop 1)