Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
HIE.Bios.Cradle.Utils
Synopsis
- data ProcessErrorDetails = ProcessErrorDetails {
- processCmd :: CmdSpec
- processStdout :: [String]
- processStderr :: [String]
- processGhcOptions :: [String]
- processHieBiosEnvironment :: [(String, String)]
- prettyProcessErrorDetails :: ProcessErrorDetails -> [String]
- selectCradle :: (a -> FilePath) -> FilePath -> [a] -> Maybe a
- removeInteractive :: [String] -> [String]
- removeRTS :: [String] -> [String]
- removeVerbosityOpts :: [String] -> [String]
- expandGhcOptionResponseFile :: [String] -> IO [String]
Helper for process errors
data ProcessErrorDetails Source #
Constructors
ProcessErrorDetails | |
Fields
|
Cradle utils
selectCradle :: (a -> FilePath) -> FilePath -> [a] -> Maybe a Source #
Given a list of cradles, try to find the most likely cradle that
this FilePath
belongs to.
Processing of ghc-options
removeInteractive :: [String] -> [String] Source #
removeRTS :: [String] -> [String] Source #
Strip out any ["+RTS", ..., "-RTS"] sequences in the command string list.
>>>
removeRTS ["option1", "+RTS -H32m -RTS", "option2"]
["option1", "option2"]
>>>
removeRTS ["option1", "+RTS", "-H32m", "-RTS", "option2"]
["option1", "option2"]
>>>
removeRTS ["option1", "+RTS -H32m"]
["option1"]
>>>
removeRTS ["option1", "+RTS -H32m", "-RTS", "option2"]
["option1", "option2"]
>>>
removeRTS ["option1", "+RTS -H32m", "-H32m -RTS", "option2"]
["option1", "option2"]
removeVerbosityOpts :: [String] -> [String] Source #