ghc-lib-parser-9.10.1.20250103: 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
- 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 #

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

type RawSettings = Map String String #

getTargetArchOS #

Arguments

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

Read target Arch/OS from the settings

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 #