6      !"#$%&'()*+,-./012345non-portable (ghc >= 7.6 only) experimentalggreif+dynamic@gmail.comNone DDynamically load a shared library (DLL or .so). A shared library can't 5be unloaded using this interface, if you need it use $System.Posix.DynamicLinker instead. +Load a module given its name (for instance Data.FiniteMap ), maybe a Gpath to the base directory and maybe a file extension. If no such path Eis given the current working directory is used and if no file suffix  is given "o" is used. #If we have our module hierarchy in /usr/lib/modules and we want to load the module Foo.Bar located in /usr/lib/modules/Foo/Bar.o we could issue the command:   loadModule "Foo.Bar" (Just "/usr/lib/modules" ) NothingIf our current directory was /tmp" and we wanted to load the module Foo located in the file /tmp/Foo.obj we would write:   loadModule "Foo" Nothing (Just "obj")9If it cannot load the object it will throw an exception. GLoad a module given its full path and maybe a base directory to use in figuring out the module'-s hierarchical name. If no base directory is +given, it is set to the current directory. )For instance if one wants to load module Foo.Bar located in /usr/modules/Foo/Bar.o one would issue the command:  loadModuleFromPath "/usr/modules/Foo/Bar.o" (Just "/usr/modules")9If it cannot load the object it will throw an exception. Load a GHC package such as "base" or "text". Takes the package name, Amaybe a path to the packages, maybe a package prefix and maybe a package suffix. :Path defaults to the current directory, package prefix to "HS" and package suffix to "o". GThis function also loads accompanying cbits-packages. I.e. if you load  the package base located in /usr/modules using HS and o as prefix and suffix,  loadPackage will also look for the file /usr/modules/HSbase_cbits.o and load it if present. CIf it fails to load a package it will throw an exception. You will ?need to resolve functions before you use any functions loaded. Load a GHC package such as "base" or "text". Takes the full path to  the package. GThis function also loads accompanying cbits-packages. I.e. if you load  the package /usr/modules/HSbase.o it will deduce that o is the  suffix and loadPackageFromPath" will then also look for the file /usr/modules/HSbase_cbits.o and load it if present. CIf it fails to load a package it will throw an exception. You will ?need to resolve functions before you use any functions loaded. Unload a package (such as base) and its cbits-package (if 2any). Throws an exception if any unloading fails. GUnload a previously loaded module. If it cannot unload it an exception will be thrown. 8Load a function from a given module. If the function can't be found an 1exception will be thrown. You should have called resolveFunctions before you call this. Beware that this function isn't type-safe in any way! CLoad a function from package (or module) given the fully qualified  name (e.g. Data.FiniteMap.emptyFM). If the function can't be found an 1exception will be thrown. You should have called resolveFunctions before you call this. FYou must take care that you load the function qualified with the name of the module it',s defined in! You can for instance not load  Data.Bool.not4 because it is only reexported in that module (from  GHC.Base). Beware that this function isn't type-safe in any way! DResolve all loaded functions. Should be called before any functions Fare loaded. If it is unable to resolve all functions it will throw an  exception. 6Find a symbol in a module')s symbol-table. Throw an exception if it isn' t found. 789:;<=>?@ 6  789:;<=>?@ 6NoneAWhen the symbol'2s type is Typeable and we are in a monad that can J | reliably fail, we load from the suffixed symbol and try to resolve it, C | failing when the type does not correspond with the expectation. BWhen the symbol'8s type is Typeable we load from the suffixed symbol and  | try to resolve it. CABDECABNoneFDEGFnon-portable (ghc >= 7.6 only) experimentalggreif+dynamic@gmail.comNone LSet the base path used in figuring out module names. If not set the default &(i.e. currentDirectory) will be used. 8Add a module dependency. Any dependencies must be added before any calls to loadModule/3loadPackage or symbols will not be resolved with a crash as result. =Set all dependencies. All previous dependencies are removed. Delete a module dependency. 8Delete all dependencies for a module. Same behaviour as setDependencies path []. ?Do something with the current dependencies of a module. You can't use ?(blocking) functions from this module in the function given to 7withDependencies. If you do so, a deadlock will occur. GLoad a module (or package) and modules (or packages) it depends on. It :is possible to load a module many times without any error 7occuring. However to unload a module one needs to call  unloadModule the same number of times. CBefore loading any modules you should add wich dependencies it has Ewith addDependency (and which dependencies the modules upon which it depends have). BIf the module already has been loaded nothing will be done except Eupdating the reference count. I.e. if dependencies have been updated Gthey will be ignored until the module has been completely unloaded and loaded again. ,If any error occurs an exception is thrown. CUnload a module and all modules it depends on. This unloading only occurs if the module isn''t needed by any other libraries or hasn't Ebeen loaded more than once. An exception is thrown in case of error. Same as  unloadModule just doesn' t trow any exceptions on error. !FLoad a function from a module. It cannot load functions from packages Eand will throw an exception if one tries to do so. Also throws if an error occurs. It seems (but I'5m unsure) like any functions loaded will continue to Gbe valid even after the module it resides in is unloaded. It will also Gstill be valid if a new version of that module is loaded (it will thus still call the old function). "ELoad a qualified function from a module or package. It will throw an 6exception if an error occurs. Same restriction as for 6DynamicLinker.loadQualifiedFunction applies here too. #GGive the modification time for a loded module. Will throw an exception if the module isn' t loaded. 3HIJKLMNOPQRSTUVWXYZ[\]^_ `a!"#b$cdefghi !"#$ !"#$+HIJKLMNOPQRSTUVWXYZ[\]^_ `a!"#b$cdefghinon-portable (ghc >= 7.6 only) experimentalggreif+dynamic@gmail.comNone *DSet the environment in wich all module loading will reside. If this  function isn'$t called the defaults will be used. FThe parameters are: Path to modules, module suffix, path to packages, Epackage prefix and package suffix. The paths will default to current %directory and the rest (in order) to o, HS and o. +8Add a module dependency. Any dependencies must be added before any Dcalls to loadModule or symbols will not be resolved with a crash as result. ,Delete a module dependency. -&Delete all dependencies for a module. .?Do something with the current dependencies of a module. You can't use ?(blocking) functions from this module in the function given to 7withDependencies. If you do so, a deadlock will occur. /ELoad a module (or package) and modules it depends on. It is possible Cto load a module many times without any error occuring. However to "unload a module one needs to call  unloadModule the same number of times. CBefore loading any modules you should add wich dependencies it has Ewith addDependency (and which dependencies the modules upon which it depends have). BIf the module already has been loaded nothing will be done except Eupdating the reference count. I.e. if dependencies have been updated Gthey will be ignored until the module has been completely unloaded and loaded again. 9It treats names begining with uppercase letters (such as Foo.Bar) as !modules and other names (such as base) as packages. ,If any error occurs an exception is thrown. 0CUnload a module and all modules it depends on. This unloading only occurs if the module isn''t needed by any other libraries or hasn't Ebeen loaded more than once. An exception is thrown in case of error. 1Same as  unloadModule just doesn' t trow any exceptions on error. 2FLoad a function from a module. It cannot load functions from packages Eand will throw an exception if one tries to do so. Also throws if an error occurs. It seems (but I'5m unsure) like any functions loaded will continue to Gbe valid even after the module it resides in is unloaded. It will also Gstill be valid if a new version of that module is loaded (it will thus still call the old function). 3GGive the modification time for a loded module. Will throw an exception if the module isn' t loaded. 3jklmnopqrst%&'(u)vwxyz*+{,|-}./~012345%&'()*+,-./012345)(%'&*+,-./012345+jklmnopqrst%'&(u)vwxyz*+{,|-}./~012345      !"# $%&'(!"# $%&)*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgFGHhijLMOPQRSTUVWkXYZ[\]ldynamic-loader-0.0System.Plugins.DynamicLoader%System.Plugins.Criteria.LoadCriterionSystem.Plugins.PathLoaderSystem.Plugins.NameLoader'System.Plugins.Criteria.UnsafeCriterionDynamicPackagedp_path DynamicModuledm_pathaddDLL loadModuleloadModuleFromPath loadPackageloadPackageFromPath unloadPackage unloadModule loadFunctionloadQualifiedFunctionresolveFunctions LoadCriterion Criterion EffectiveaddDynamicLibraryresolveSymbols loadQualified ModuleType MT_Package MT_Module LoadedModule setBasePath addDependencysetDependencies delDependency delAllDepswithDependenciesunloadModuleQuietmoduleLoadedAt loadedModulesModulesetEnvironmentsm_path lookupSymbolRTPdp_cbitsRTMdm_qnamec_addDLLc_lookupSymbol c_resolveObjs c_unloadObj c_loadObjsplit$fLoadCriterion(,)t$fLoadCriterionTypeabletloadQualifiedDynFunctionDynamicFailableCriterionDynamicCriterion$fLoadCriterion()tUnsafeCriterionPathEnv PathEnvData PathModulePMpm_refcpm_timepm_deps pm_modulePathDep PathDynamicsModuleWTLMLoadable withPathEnv withPathEnvNBmodifyPathEnv_envaddDependency'setDependencies'delDependency' delAllDeps'loadModuleWithDep midLoadModule lowLoadModuleunloadModuleWithDeplowUnloadModulemoduleLoadedAt'loadedModules'insertHT insertHT_CmodifyHTlookupHTdeleteHT lookupDefHTNameEnv NameEnvData NameModuleSMsm_refcsm_timesm_deps sm_moduleNameDep NameDynamics withNameEnv withNameEnvNBmodifyNameEnv_ nameToMWT