HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

ModuleCabal-3.12.1.0Haskell2010

Distribution.Simple.Glob.Internal

Internal module for simple file globbing. Please import Distribution.Simple.Glob instead.

  • 5 types
  • 11 values
  • PackageCabal-3.12.1.0
  • Exports16
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceInternal.hs
datadata Glob
#

A filepath specified by globbing.

Constructors

Instances8Eq, Show, Generic, Binary, Parsec, Pretty, …
datadata GlobPiece
#

A piece of a globbing pattern

Constructors

Instances6Eq, Show, Generic, Binary, Structured, Rep

Matching

2 declarations
valuematchGlob :: FilePath -> Glob -> IO [FilePath]
#

Match a Glob against the file system, starting from a given root directory. The results are all relative to the given root.

Parsing & printing

0 declarations

Parsing globs in a cabal package

Parsing globs otherwise

Cabal package globbing errors

datadata GlobResult a
#

Constructors

  • GlobMatch a

    The glob matched the value supplied.

  • GlobWarnMultiDot a

    The glob did not match the value supplied because the cabal-version is too low and the extensions on the file did not precisely match the glob's extensions, but rather the glob was a proper suffix of the file's extensions; i.e., if not for the low cabal-version, it would have matched.

  • GlobMissingDirectory a

    The glob couldn't match because the directory named doesn't exist. The directory will be as it appears in the glob (i.e., relative to the directory passed to matchDirFileGlob, and, for 'data-files', relative to 'data-dir').

  • GlobMatchesDirectory a

    The glob matched a directory when we were looking for files only. It didn't match a file!

Instances4Functor, Eq, Ord, Show
  • Functor GlobResultDefined in Cabal-3.12.1.0 · Distribution.Simple.Glob.Internal
  • Eq a => Eq (GlobResult a)Defined in Cabal-3.12.1.0 · Distribution.Simple.Glob.Internal
  • Ord a => Ord (GlobResult a)Defined in Cabal-3.12.1.0 · Distribution.Simple.Glob.Internal
  • Show a => Show (GlobResult a)Defined in Cabal-3.12.1.0 · Distribution.Simple.Glob.Internal
valuerunDirFileGlob
  1. :: Verbosity
  2. -> Maybe CabalSpecVersion

    If the glob we are running should care about the cabal spec, and warnings such as GlobWarnMultiDot, then this should be the version. If you want to run a glob but don't care about any of the cabal-spec restrictions on globs, use Nothing!

  3. -> FilePath
  4. -> Glob
  5. -> IO [GlobResult FilePath]
#

Match files against a pre-parsed glob, starting in a directory.

The Version argument must be the spec version of the package description being processed, as globs behave slightly differently in different spec versions.

The FilePath argument is the directory that the glob is relative to. It must be a valid directory (and hence it can't be the empty string). The returned values will not include this prefix.

valueisRecursiveInRoot :: Glob -> Bool
#

Is the root of this relative glob path a directory-recursive wildcard, e.g. **/*.txt ?