hsdev-0.3.3.1: Haskell development library

Safe HaskellNone
LanguageHaskell98

HsDev.Tools.Ghc.Worker

Contents

Synopsis

Workers

newtype MGhcT s d m a Source #

Multi-session ghc monad

Constructors

MGhcT 

Fields

Instances
Monad m => MonadReader (Maybe FilePath) (MGhcT s d m) Source # 
Instance details

Defined in HsDev.Tools.Ghc.MGhc

Methods

ask :: MGhcT s d m (Maybe FilePath) #

local :: (Maybe FilePath -> Maybe FilePath) -> MGhcT s d m a -> MGhcT s d m a #

reader :: (Maybe FilePath -> a) -> MGhcT s d m a #

Monad m => MonadState (SessionState s d) (MGhcT s d m) Source # 
Instance details

Defined in HsDev.Tools.Ghc.MGhc

Methods

get :: MGhcT s d m (SessionState s d) #

put :: SessionState s d -> MGhcT s d m () #

state :: (SessionState s d -> (a, SessionState s d)) -> MGhcT s d m a #

Monad m => Monad (MGhcT s d m) Source # 
Instance details

Defined in HsDev.Tools.Ghc.MGhc

Methods

(>>=) :: MGhcT s d m a -> (a -> MGhcT s d m b) -> MGhcT s d m b #

(>>) :: MGhcT s d m a -> MGhcT s d m b -> MGhcT s d m b #

return :: a -> MGhcT s d m a #

fail :: String -> MGhcT s d m a #

Functor m => Functor (MGhcT s d m) Source # 
Instance details

Defined in HsDev.Tools.Ghc.MGhc

Methods

fmap :: (a -> b) -> MGhcT s d m a -> MGhcT s d m b #

(<$) :: a -> MGhcT s d m b -> MGhcT s d m a #

MonadFail m => MonadFail (MGhcT s d m) Source # 
Instance details

Defined in HsDev.Tools.Ghc.MGhc

Methods

fail :: String -> MGhcT s d m a #

Monad m => Applicative (MGhcT s d m) Source # 
Instance details

Defined in HsDev.Tools.Ghc.MGhc

Methods

pure :: a -> MGhcT s d m a #

(<*>) :: MGhcT s d m (a -> b) -> MGhcT s d m a -> MGhcT s d m b #

liftA2 :: (a -> b -> c) -> MGhcT s d m a -> MGhcT s d m b -> MGhcT s d m c #

(*>) :: MGhcT s d m a -> MGhcT s d m b -> MGhcT s d m b #

(<*) :: MGhcT s d m a -> MGhcT s d m b -> MGhcT s d m a #

MonadIO m => MonadIO (MGhcT s d m) Source # 
Instance details

Defined in HsDev.Tools.Ghc.MGhc

Methods

liftIO :: IO a -> MGhcT s d m a #

MonadThrow m => MonadThrow (MGhcT s d m) Source # 
Instance details

Defined in HsDev.Tools.Ghc.MGhc

Methods

throwM :: Exception e => e -> MGhcT s d m a #

MonadCatch m => MonadCatch (MGhcT s d m) Source # 
Instance details

Defined in HsDev.Tools.Ghc.MGhc

Methods

catch :: Exception e => MGhcT s d m a -> (e -> MGhcT s d m a) -> MGhcT s d m a #

MonadMask m => MonadMask (MGhcT s d m) Source # 
Instance details

Defined in HsDev.Tools.Ghc.MGhc

Methods

mask :: ((forall a. MGhcT s d m a -> MGhcT s d m a) -> MGhcT s d m b) -> MGhcT s d m b #

uninterruptibleMask :: ((forall a. MGhcT s d m a -> MGhcT s d m a) -> MGhcT s d m b) -> MGhcT s d m b #

generalBracket :: MGhcT s d m a -> (a -> ExitCase b -> MGhcT s d m c) -> (a -> MGhcT s d m b) -> MGhcT s d m (b, c) #

ExceptionMonad m => GhcMonad (MGhcT s d m) Source # 
Instance details

Defined in HsDev.Tools.Ghc.MGhc

Methods

getSession :: MGhcT s d m HscEnv #

setSession :: HscEnv -> MGhcT s d m () #

MonadIO m => HasDynFlags (MGhcT s d m) Source # 
Instance details

Defined in HsDev.Tools.Ghc.MGhc

Methods

getDynFlags :: MGhcT s d m DynFlags #

ExceptionMonad m => ExceptionMonad (MGhcT s d m) Source # 
Instance details

Defined in HsDev.Tools.Ghc.MGhc

Methods

gcatch :: Exception e => MGhcT s d m a -> (e -> MGhcT s d m a) -> MGhcT s d m a #

gmask :: ((MGhcT s d m a -> MGhcT s d m a) -> MGhcT s d m b) -> MGhcT s d m b #

gbracket :: MGhcT s d m a -> (a -> MGhcT s d m b) -> (a -> MGhcT s d m c) -> MGhcT s d m c #

gfinally :: MGhcT s d m a -> MGhcT s d m b -> MGhcT s d m a #

MonadLog m => MonadLog (MGhcT s d m) Source # 
Instance details

Defined in HsDev.Tools.Ghc.MGhc

Methods

askLog :: MGhcT s d m Log #

localLog :: (Log -> Log) -> MGhcT s d m a -> MGhcT s d m a #

runGhcM :: MonadLog m => Maybe FilePath -> GhcM a -> m a Source #

ghcWorker :: MonadLog m => m GhcWorker Source #

Multi-session ghc worker

workerSession :: SessionType -> PackageDbStack -> [String] -> GhcM () Source #

Create session with options

ghcSession :: PackageDbStack -> [String] -> GhcM () Source #

Get ghc session

ghciSession :: GhcM () Source #

Get ghci session

haddockSession :: PackageDbStack -> [String] -> GhcM () Source #

Get haddock session with flags

tmpSession :: PackageDbStack -> [String] -> GhcM () Source #

Get haddock session with flags

data Ghc a #

A minimal implementation of a GhcMonad. If you need a custom monad, e.g., to maintain additional state consider wrapping this monad or using GhcT.

Instances
Monad Ghc 
Instance details

Defined in GhcMonad

Methods

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

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

return :: a -> Ghc a #

fail :: String -> Ghc a #

Functor Ghc 
Instance details

Defined in GhcMonad

Methods

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

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

MonadFix Ghc 
Instance details

Defined in GhcMonad

Methods

mfix :: (a -> Ghc a) -> Ghc a #

Applicative Ghc 
Instance details

Defined in GhcMonad

Methods

pure :: a -> Ghc a #

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

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

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

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

MonadIO Ghc 
Instance details

Defined in GhcMonad

Methods

liftIO :: IO a -> Ghc a #

MonadThrow Ghc Source # 
Instance details

Defined in HsDev.Tools.Ghc.Worker

Methods

throwM :: Exception e => e -> Ghc a #

GhcMonad Ghc 
Instance details

Defined in GhcMonad

HasDynFlags Ghc 
Instance details

Defined in GhcMonad

ExceptionMonad Ghc 
Instance details

Defined in GhcMonad

Methods

gcatch :: Exception e => Ghc a -> (e -> Ghc a) -> Ghc a #

gmask :: ((Ghc a -> Ghc a) -> Ghc b) -> Ghc b #

gbracket :: Ghc a -> (a -> Ghc b) -> (a -> Ghc c) -> Ghc c #

gfinally :: Ghc a -> Ghc b -> Ghc a #

newtype LogT (m :: Type -> Type) a #

Constructors

LogT 

Fields

Instances
MonadTrans LogT 
Instance details

Defined in System.Log.Simple.Monad

Methods

lift :: Monad m => m a -> LogT m a #

Monad m => MonadReader Log (LogT m) 
Instance details

Defined in System.Log.Simple.Monad

Methods

ask :: LogT m Log #

local :: (Log -> Log) -> LogT m a -> LogT m a #

reader :: (Log -> a) -> LogT m a #

Monad m => Monad (LogT m) 
Instance details

Defined in System.Log.Simple.Monad

Methods

(>>=) :: LogT m a -> (a -> LogT m b) -> LogT m b #

(>>) :: LogT m a -> LogT m b -> LogT m b #

return :: a -> LogT m a #

fail :: String -> LogT m a #

Functor m => Functor (LogT m) 
Instance details

Defined in System.Log.Simple.Monad

Methods

fmap :: (a -> b) -> LogT m a -> LogT m b #

(<$) :: a -> LogT m b -> LogT m a #

MonadFail m => MonadFail (LogT m) 
Instance details

Defined in System.Log.Simple.Monad

Methods

fail :: String -> LogT m a #

Applicative m => Applicative (LogT m) 
Instance details

Defined in System.Log.Simple.Monad

Methods

pure :: a -> LogT m a #

(<*>) :: LogT m (a -> b) -> LogT m a -> LogT m b #

liftA2 :: (a -> b -> c) -> LogT m a -> LogT m b -> LogT m c #

(*>) :: LogT m a -> LogT m b -> LogT m b #

(<*) :: LogT m a -> LogT m b -> LogT m a #

MonadIO m => MonadIO (LogT m) 
Instance details

Defined in System.Log.Simple.Monad

Methods

liftIO :: IO a -> LogT m a #

MonadThrow m => MonadThrow (LogT m) 
Instance details

Defined in System.Log.Simple.Monad

Methods

throwM :: Exception e => e -> LogT m a #

MonadCatch m => MonadCatch (LogT m) 
Instance details

Defined in System.Log.Simple.Monad

Methods

catch :: Exception e => LogT m a -> (e -> LogT m a) -> LogT m a #

MonadMask m => MonadMask (LogT m) 
Instance details

Defined in System.Log.Simple.Monad

Methods

mask :: ((forall a. LogT m a -> LogT m a) -> LogT m b) -> LogT m b #

uninterruptibleMask :: ((forall a. LogT m a -> LogT m a) -> LogT m b) -> LogT m b #

generalBracket :: LogT m a -> (a -> ExitCase b -> LogT m c) -> (a -> LogT m b) -> LogT m (b, c) #

ExceptionMonad m => ExceptionMonad (LogT m) Source # 
Instance details

Defined in HsDev.Tools.Ghc.Worker

Methods

gcatch :: Exception e => LogT m a -> (e -> LogT m a) -> LogT m a #

gmask :: ((LogT m a -> LogT m a) -> LogT m b) -> LogT m b #

gbracket :: LogT m a -> (a -> LogT m b) -> (a -> LogT m c) -> LogT m c #

gfinally :: LogT m a -> LogT m b -> LogT m a #

(MonadIO m, MonadMask m) => MonadLog (LogT m) 
Instance details

Defined in System.Log.Simple.Monad

Methods

askLog :: LogT m Log #

localLog :: (Log -> Log) -> LogT m a -> LogT m a #

Orphan instances

MonadThrow Ghc Source # 
Instance details

Methods

throwM :: Exception e => e -> Ghc a #

ExceptionMonad m => ExceptionMonad (LogT m) Source # 
Instance details

Methods

gcatch :: Exception e => LogT m a -> (e -> LogT m a) -> LogT m a #

gmask :: ((LogT m a -> LogT m a) -> LogT m b) -> LogT m b #

gbracket :: LogT m a -> (a -> LogT m b) -> (a -> LogT m c) -> LogT m c #

gfinally :: LogT m a -> LogT m b -> LogT m a #

(Monad m, GhcMonad m) => GhcMonad (ReaderT r m) Source # 
Instance details

Methods

getSession :: ReaderT r m HscEnv #

setSession :: HscEnv -> ReaderT r m () #