cabal-fmt-0.1.5.1: Format .cabal files
Safe HaskellNone
LanguageHaskell2010

CabalFmt.Glob

Synopsis

Documentation

data Glob Source #

Constructors

Glob FilePath [GlobPiece] 

Instances

Instances details
Show Glob Source # 
Instance details

Defined in CabalFmt.Glob

Methods

showsPrec :: Int -> Glob -> ShowS #

show :: Glob -> String #

showList :: [Glob] -> ShowS #

data GlobPiece Source #

Instances

Instances details
Show GlobPiece Source # 
Instance details

Defined in CabalFmt.Glob

data GlobChar Source #

Constructors

GlobStar 
GlobChar Char 

Instances

Instances details
Show GlobChar Source # 
Instance details

Defined in CabalFmt.Glob

match :: Glob -> FilePath -> Bool Source #

Match glob

>>> let Right g = parseGlob "cbits/**/*.c"
>>> map (match g) ["foo", "cbits/header.h", "cbits/source.c", "cbits/dir/source.c"]
[False,False,True,True]