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

Safe Haskell | Ignore
Language | GHC2021

GHC.Settings.Utils

Synopsis

- maybeRead :: Read a => String -> Maybe a
- maybeReadFuzzy :: Read a => String -> Maybe a
- type RawSettings = Map String String
- getTargetArchOS :: FilePath -> RawSettings -> Either String ArchOS
- getGlobalPackageDb :: FilePath -> RawSettings -> Either String FilePath
- getRawSetting :: FilePath -> RawSettings -> String -> Either String String
- getRawFilePathSetting :: FilePath -> FilePath -> RawSettings -> String -> Either String String
- getRawBooleanSetting :: FilePath -> RawSettings -> String -> Either String Bool
- readRawSetting :: (Show a, Read a) => FilePath -> RawSettings -> String -> Either String a

# Documentation

maybeRead :: Read a => String -> Maybe a Source #

maybeReadFuzzy :: Read a => String -> Maybe a Source #

type RawSettings = Map String String Source #

getTargetArchOS Source #

Arguments

:: FilePath | Settings filepath (for error messages)
-> RawSettings | Raw settings file contents
-> Either String ArchOS |

Read target Arch/OS from the settings

getGlobalPackageDb :: FilePath -> RawSettings -> Either String FilePath Source #

getRawSetting :: FilePath -> RawSettings -> String -> Either String String Source #

getRawFilePathSetting :: FilePath -> FilePath -> RawSettings -> String -> Either String String Source #

getRawBooleanSetting :: FilePath -> RawSettings -> String -> Either String Bool Source #

readRawSetting :: (Show a, Read a) => FilePath -> RawSettings -> String -> Either String a Source #