cabal-fmt-0.1.5: Format .cabal files
CabalFmt.Glob
data Glob Source #
Constructors
Defined in CabalFmt.Glob
Methods
showsPrec :: Int -> Glob -> ShowS #
show :: Glob -> String #
showList :: [Glob] -> ShowS #
data GlobPiece Source #
showsPrec :: Int -> GlobPiece -> ShowS #
show :: GlobPiece -> String #
showList :: [GlobPiece] -> ShowS #
data GlobChar Source #
showsPrec :: Int -> GlobChar -> ShowS #
show :: GlobChar -> String #
showList :: [GlobChar] -> ShowS #
match :: Glob -> FilePath -> Bool Source #
Match glob
>>> let Right g = parseGlob "cbits/**/*.c"
>>>
let Right g = parseGlob "cbits/**/*.c"
>>> map (match g) ["foo", "cbits/header.h", "cbits/source.c", "cbits/dir/source.c"] [False,False,True,True]
map (match g) ["foo", "cbits/header.h", "cbits/source.c", "cbits/dir/source.c"]
parseGlob :: String -> Either String Glob Source #