ghc-boot-9.10.3: Shared functionality between GHC and its boot libraries

Safe Haskell | Safe-Inferred
Language | Haskell2010

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

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 #