From b0c707e6f1fc03280ab45e34bec199740469e539 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Wed, 30 Mar 2022 14:33:32 -0400 Subject: Add isCab function --- Biz/Namespace.hs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Biz/Namespace.hs') 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 -- cgit v1.2.3