xrefcheck-0.3.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Xrefcheck.System

Synopsis

Documentation

askWithinCI :: IO Bool Source #

Heuristics to check whether we are running within CI. Check the respective env variable which is usually set in all CIs.

newtype RelPosixLink Source #

Relative file path with POSIX path separators.

This type exist in contrast to FilePath which, in this project, is used for platform-dependent file paths and related filesystem IO operations.

Note that RelPosixLink may contain `\` characters, but they are considered as part of the filename instead of denoting a path separator.

Constructors

RelPosixLink 

Fields

mkRelPosixLink :: FilePath -> RelPosixLink Source #

Create a POSIX file path from a platform-dependent one.

getIntermediateDirs :: RelPosixLink -> [RelPosixLink] Source #

Get the list of directories between a RelPosixLink and its relative root.

hasBackslash :: RelPosixLink -> Bool Source #

'Check if a RelPosixLink contains any backslash.

data CanonicalRelPosixLink Source #

Relative POSIX file path with some normalizations applied.

It should be created from a RelPosixLink via canonicalizeRelPosixLink.

Instances

hasUnexpanededParentIndirections :: CanonicalRelPosixLink -> Bool Source #

Check if a CanonicalRelPosixLink passes through its relative root when expanding indirections.

canonicalizeRelPosixLink :: RelPosixLink -> CanonicalRelPosixLink Source #

Canonicalize a RelPosixLink.

Applies the following normalizations:

  • Drop trailing path separator.
  • Expand . and '..' indirections syntactically.

data CanonicalRelGlobPattern Source #

Relative Glob pattern with some normalizations applied.

It should be created via mkCanonicalRelGlobPattern.

mkCanonicalRelGlobPattern :: ToString s => s -> Either String CanonicalRelGlobPattern Source #

Create a CanonicalRelGlobPattern from a ToString instance value that represents a POSIX glob pattern.

Applies the following normalizations:

  • Drop trailing path separator.
  • FilePath.Posix.normalise.
  • Expand . and '..' indirections syntactically.