HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

cabal-install globbing features

datadata RootedGlob

A file path specified by globbing, relative to some root directory.

Instances8Eq, Show, Generic, Binary, Parsec, Pretty, …

Check if a RootedGlob doesn't actually make use of any globbing and is in fact equivalent to a non-glob FilePath.

If it is trivial in this sense then the result is the equivalent constant FilePath. On the other hand, if it is not trivial (so could in principle match more than one file), then the result is Nothing.

datadata FilePathRoot
#

Constructors

Instances8Eq, Show, Generic, Binary, Parsec, Pretty, …

Additional re-exports

valuematchDirFileGlob
  1. :: Verbosity
  2. -> CabalSpecVersion
  3. -> Maybe (SymbolicPath CWD ('Dir dir))
  4. -> SymbolicPathX allowAbs dir file
  5. -> IO [SymbolicPathX allowAbs dir file]

This will die' when the glob matches no files, or if the glob refers to a missing directory, or if the glob fails to parse.

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

The first 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.

The second FilePath is the glob itself.

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.

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
datadata Glob

A filepath specified by globbing.

Instances8Eq, Show, Generic, Binary, Parsec, Pretty, …
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