diff options
author | Joey Hess <joey@kitenet.net> | 2010-12-08 14:48:10 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-12-08 14:48:10 -0400 |
commit | f8851aad66974691f1fef9d118eceb7ec909c8f4 (patch) | |
tree | b217dfb9a78263f9f087956495c6b697a70b3c81 /Command.hs | |
parent | 2099407d8aa1b1e94f29de0d9094ccfa6e05e471 (diff) |
use Text.Regex.PCRE.Light.Char8 rather than Text.Regexp
Text.Regexp does not think that รก matches . -- seems to be a unicode
problem.
Diffstat (limited to 'Command.hs')
-rw-r--r-- | Command.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Command.hs b/Command.hs index 8edea7622..4ba6ea4b3 100644 --- a/Command.hs +++ b/Command.hs @@ -12,7 +12,7 @@ import System.Directory import System.Posix.Files import Control.Monad (filterM) import System.Path.WildMatch -import Text.Regex +import Text.Regex.PCRE.Light.Char8 import Types import qualified Backend @@ -189,12 +189,12 @@ filterFiles l = do if null exclude then return l' else do - let regexp = mkRegex $ "^" ++ wildToRegex exclude + let regexp = compile ("^" ++ wildToRegex exclude) [] return $ filter (notExcluded regexp) l' where notState f = stateLoc /= take stateLocLen f stateLocLen = length stateLoc - notExcluded r f = case matchRegex r f of + notExcluded r f = case match r f [] of Nothing -> True Just _ -> False |