summaryrefslogtreecommitdiff
path: root/Biz/Namespace.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Biz/Namespace.hs')
-rw-r--r--Biz/Namespace.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Biz/Namespace.hs b/Biz/Namespace.hs
index c3252fd..2312271 100644
--- a/Biz/Namespace.hs
+++ b/Biz/Namespace.hs
@@ -13,6 +13,7 @@ module Biz.Namespace
toPath,
toHaskellModule,
toSchemeModule,
+ isCab,
)
where
@@ -86,3 +87,9 @@ reExt =
<|> Sh <$ Regex.string "sh"
<|> Keys <$ Regex.string "pub"
<|> Json <$ Regex.string "json"
+
+-- | The cab dir is for temporary files and build outputs, not for source
+-- inputs.
+isCab :: FilePath -> Bool
+isCab ('_' : _) = True
+isCab fp = "_" `List.isInfixOf` fp