ghc-simple-0.4: Simplified interface to the GHC API.

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.GHC.Simple.Impl

Contents

Description

Lower level building blocks for custom code generation.

Synopsis

Documentation

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 

Methods

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

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

return :: a -> Ghc a #

fail :: String -> Ghc a #

Functor Ghc 

Methods

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

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

MonadFix Ghc 

Methods

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

Applicative Ghc 

Methods

pure :: a -> Ghc a #

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

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

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

MonadIO Ghc 

Methods

liftIO :: IO a -> Ghc a #

GhcMonad Ghc 
HasDynFlags Ghc 
ExceptionMonad Ghc 

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 #

type PkgKey = UnitId Source #

Synonym for UnitId, to bridge a slight incompatibility between GHC 7.87.108.0.

liftIO :: MonadIO m => forall a. IO a -> m a #

Lift a computation from the IO monad.

toSimplifiedStg :: ModSummary -> CgGuts -> CompPipeline [StgBinding] Source #

Compile a ModSummary into a list of simplified StgBindings. See https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/StgSynType for more information about STG and how it relates to core and Haskell.

modulePkgKey :: Module -> PkgKey Source #

Package ID/key of a module.

pkgKeyString :: PkgKey -> String Source #

String representation of a package ID/key.

Orphan instances