Safe Haskell | None |
---|---|
Language | Haskell98 |
- env :: (MVar (), IORef (FiniteMap key1 elt1), IORef (FiniteMap key2 elt2), IORef PkgEnvs, IORef (Set [Char]), IORef (FiniteMap key3 elt3))
- withModEnv :: Env -> (ModEnv -> IO a) -> IO a
- withDepEnv :: Env -> (DepEnv -> IO a) -> IO a
- withPkgEnvs :: Env -> (PkgEnvs -> IO a) -> IO a
- withMerged :: Env -> (MergeEnv -> IO a) -> IO a
- modifyModEnv :: Env -> (ModEnv -> IO ModEnv) -> IO ()
- modifyDepEnv :: Env -> (DepEnv -> IO DepEnv) -> IO ()
- modifyPkgEnv :: Env -> (PkgEnvs -> IO PkgEnvs) -> IO ()
- modifyMerged :: Env -> (MergeEnv -> IO MergeEnv) -> IO ()
- addModule :: String -> Module -> IO ()
- rmModule :: String -> IO Bool
- addModules :: [(String, Module)] -> IO ()
- isLoaded :: String -> IO Bool
- loaded :: String -> IO Bool
- addModuleDeps :: Module -> [Module] -> IO ()
- getModuleDeps :: Module -> IO [Module]
- rmModuleDeps :: Module -> IO ()
- isMerged :: FilePath -> FilePath -> IO Bool
- lookupMerged :: FilePath -> FilePath -> IO (Maybe FilePath)
- addMerge :: FilePath -> FilePath -> FilePath -> IO ()
- addPkgConf :: FilePath -> IO ()
- union :: PkgEnvs -> [PackageConfig] -> PkgEnvs
- addStaticPkg :: PackageName -> IO ()
- isStaticPkg :: PackageName -> IO Bool
- rmStaticPkg :: String -> IO Bool
- grabDefaultPkgConf :: IO PkgEnvs
- readPackageConf :: FilePath -> IO [PackageConfig]
- lookupPkg :: PackageName -> IO ([FilePath], [FilePath])
Documentation
env :: (MVar (), IORef (FiniteMap key1 elt1), IORef (FiniteMap key2 elt2), IORef PkgEnvs, IORef (Set [Char]), IORef (FiniteMap key3 elt3)) Source #
withModEnv :: Env -> (ModEnv -> IO a) -> IO a Source #
apply f
to the loaded objects Env, apply f
to the package.conf
FM locks up the MVar so you can't recursively call a function
inside a with any -Env function. Nice and threadsafe
withDepEnv :: Env -> (DepEnv -> IO a) -> IO a Source #
withPkgEnvs :: Env -> (PkgEnvs -> IO a) -> IO a Source #
withMerged :: Env -> (MergeEnv -> IO a) -> IO a Source #
modifyModEnv :: Env -> (ModEnv -> IO ModEnv) -> IO () Source #
modifyDepEnv :: Env -> (DepEnv -> IO DepEnv) -> IO () Source #
modifyPkgEnv :: Env -> (PkgEnvs -> IO PkgEnvs) -> IO () Source #
modifyMerged :: Env -> (MergeEnv -> IO MergeEnv) -> IO () Source #
rmModule :: String -> IO Bool Source #
remove a module name from the environment. Returns True if the module was actually removed.
getModuleDeps :: Module -> IO [Module] Source #
Get module dependencies. Nothing if none have been recored.
rmModuleDeps :: Module -> IO () Source #
Unrecord a module from the environment.
addPkgConf :: FilePath -> IO () Source #
Insert a single package.conf (containing multiple configs) means: create a new FM. insert packages into FM. add FM to end of list of FM stored in the environment.
union :: PkgEnvs -> [PackageConfig] -> PkgEnvs Source #
add a new FM for the package.conf to the list of existing ones; if a package occurs multiple times, pick the one with the higher version number as the default (e.g., important for base in GHC 6.12)
addStaticPkg :: PackageName -> IO () Source #
isStaticPkg :: PackageName -> IO Bool Source #
grabDefaultPkgConf :: IO PkgEnvs Source #
generate a PkgEnv from the system package.conf The path to the default package.conf was determined by configure This imposes a constraint that you must build your plugins with the same ghc you use to build hs-plugins. This is reasonable, we feel.
readPackageConf :: FilePath -> IO [PackageConfig] Source #