ghc-lib-parser-9.14.1.20251220: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.SysTools.BaseDir

Synopsis

- expandTopDir :: FilePath -> String -> String
- expandToolDir :: Bool -> Maybe FilePath -> String -> String
- findTopDir :: Maybe String -> IO String
- findToolDir :: Bool -> FilePath -> IO (Maybe FilePath)
- tryFindTopDir :: Maybe String -> IO (Maybe String)

# Documentation

expandTopDir :: FilePath -> String -> String #

Expand occurrences of the `$topdir` interpolation in a string.

expandToolDir #

Arguments

:: Bool | whether we use the ambient mingw toolchain
-> Maybe FilePath | tooldir
-> String |
-> String |

Expand occurrences of the `$tooldir` interpolation in a string on Windows, leave the string untouched otherwise.

findTopDir :: Maybe String -> IO String #

Returns a Unix-format path pointing to TopDir.

findToolDir #

Arguments

:: Bool | whether we use the ambient mingw toolchain
-> FilePath | topdir
-> IO (Maybe FilePath) |

tryFindTopDir #

Arguments

:: Maybe String | Maybe TopDir path (without the '-B' prefix).
-> IO (Maybe String) | TopDir (in Unix format `/` separated)