Safe Haskell | None |
---|---|
Language | Haskell2010 |
GHC utility functions. Importantly, code using our GHC should never:
- Call runGhc, use runGhcFast instead. It's faster and doesn't require config we don't have.
- Call setSessionDynFlags, use modifyDynFlags instead. It's faster and avoids loading packages.
Synopsis
- lookupPackageConfig :: UnitId -> HscEnv -> Maybe PackageConfig
- modifyDynFlags :: GhcMonad m => (DynFlags -> DynFlags) -> m ()
- fakeDynFlags :: DynFlags
- prettyPrint :: Outputable a => a -> String
- runGhcEnv :: HscEnv -> Ghc a -> IO a
- textToStringBuffer :: Text -> StringBuffer
- moduleImportPath :: NormalizedFilePath -> ParsedModule -> Maybe FilePath
- data HscEnvEq
- hscEnv :: HscEnvEq -> HscEnv
- newHscEnvEq :: HscEnv -> IO HscEnvEq
- readFileUtf8 :: FilePath -> IO Text
- hDuplicateTo' :: Handle -> Handle -> IO ()
- cgGutsToCoreModule :: SafeHaskellMode -> CgGuts -> ModDetails -> CoreModule
Documentation
lookupPackageConfig :: UnitId -> HscEnv -> Maybe PackageConfig Source #
prettyPrint :: Outputable a => a -> String Source #
An HscEnv with equality.
cgGutsToCoreModule :: SafeHaskellMode -> CgGuts -> ModDetails -> CoreModule Source #