Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Env = Env {
- verbosity :: Int
- targetPrefix :: Maybe String
- keepTemp :: Bool
- canLocallyExecute :: Bool
- logContexts :: [String]
- data M a
- runM :: Env -> M a -> IO (Either [Error] a)
- getEnv :: M Env
- makeM :: IO (Either [Error] a) -> M a
- throwE :: String -> M a
- throwEs :: [String] -> M a
- ifCrossCompiling :: M a -> M a -> M a
- readFile :: FilePath -> M String
- writeFile :: FilePath -> String -> M ()
- appendFile :: FilePath -> String -> M ()
- createFile :: FilePath -> M ()
- logInfo :: String -> M ()
- logDebug :: String -> M ()
- checking :: Show a => String -> M a -> M a
- withLogContext :: String -> M a -> M a
Documentation
Env | |
|
throwEs :: [String] -> M a Source #
Throw an error with multiple lines. This should be used rather than `throwE . unlines` to preserve proper logging indentation.
Branch on whether we can execute target code locally.
File I/O
createFile :: FilePath -> M () Source #
Create an empty file.