ghc-toolchain-0.1.0.0: Utility for managing GHC target toolchains
Safe HaskellNone
LanguageHaskell2010

GHC.Toolchain.Monad

Synopsis

Documentation

data M a Source #

Instances

Instances details
Alternative M Source # 
Instance details

Defined in GHC.Toolchain.Monad

Methods

empty :: M a #

(<|>) :: M a -> M a -> M a #

some :: M a -> M [a] #

many :: M a -> M [a] #

Applicative M Source # 
Instance details

Defined in GHC.Toolchain.Monad

Methods

pure :: a -> M a #

(<*>) :: M (a -> b) -> M a -> M b #

liftA2 :: (a -> b -> c) -> M a -> M b -> M c #

(*>) :: M a -> M b -> M b #

(<*) :: M a -> M b -> M a #

Functor M Source # 
Instance details

Defined in GHC.Toolchain.Monad

Methods

fmap :: (a -> b) -> M a -> M b #

(<$) :: a -> M b -> M a #

Monad M Source # 
Instance details

Defined in GHC.Toolchain.Monad

Methods

(>>=) :: M a -> (a -> M b) -> M b #

(>>) :: M a -> M b -> M b #

return :: a -> M a #

MonadIO M Source # 
Instance details

Defined in GHC.Toolchain.Monad

Methods

liftIO :: IO a -> M a #

runM :: Env -> M a -> IO (Either [Error] a) Source #

makeM :: IO (Either [Error] a) -> M a Source #

throwEs :: [String] -> M a Source #

Throw an error with multiple lines. This should be used rather than `throwE . unlines` to preserve proper logging indentation.

ifCrossCompiling Source #

Arguments

:: M a

what to do when cross-compiling

-> M a

what to do otherwise

-> M a 

Branch on whether we can execute target code locally.

File I/O

createFile :: FilePath -> M () Source #

Create an empty file.

Logging

checking :: Show a => String -> M a -> M a Source #