packages feed

plugins 1.5.1.3 → 1.5.1.4

raw patch · 2 files changed

+11/−6 lines, 2 files

Files

plugins.cabal view
@@ -1,5 +1,5 @@ name:               plugins-version:            1.5.1.3+version:            1.5.1.4 homepage:           http://code.haskell.org/~dons/code/hs-plugins synopsis:           Dynamic linking for Haskell and C objects description:        Dynamic linking and runtime evaluation of Haskell,@@ -8,7 +8,9 @@                     Described in the papers:                       * /Plugging Haskell In/, <http://www.cse.unsw.edu.au/~dons/papers/PSSC04.html>+                      * /Dynamic Applications from the Ground Up/, <http://www.cse.unsw.edu.au/~dons/papers/SC05.html>+                      * /Dynamic Extension of Typed Functional Languages/.  category:           System
src/System/Plugins/Env.hs view
@@ -58,7 +58,7 @@  import Data.IORef               ( writeIORef, readIORef, newIORef, IORef() ) import Data.Maybe               ( isJust, isNothing, fromMaybe )-import Data.List                ( nub )+import Data.List                ( (\\), nub, )  import System.IO.Unsafe         ( unsafePerformIO ) import System.Directory         ( doesFileExist )@@ -299,8 +299,8 @@         let fm = emptyFM -- new FM for this package.conf         in foldr addOnePkg fm ps' : ls     where -      -- we add each package with and without it's version number-      addOnePkg p fm' = addToPkgEnvs (addToPkgEnvs fm' (display $ sourcePackageId p) p)+      -- we add each package with and without it's version number and with the full installedPackageId+      addOnePkg p fm' = addToPkgEnvs (addToPkgEnvs (addToPkgEnvs fm' (display $ sourcePackageId p) p) (display $ installedPackageId p) p)                                      (packageName p) p              -- if no version number specified, pick the higher version@@ -361,10 +361,13 @@ -- up to loadObject not to load the same ones twice... -- lookupPkg :: PackageName -> IO ([FilePath],[FilePath])-lookupPkg p = do +lookupPkg pn = go [] pn+    where+      go :: [PackageName] -> PackageName -> IO ([FilePath],[FilePath])+      go seen p = do          (ps, (f, g)) <- lookupPkg' p         static <- isStaticPkg p-        (f', g') <- liftM unzip $ mapM lookupPkg ps+        (f', g') <- liftM unzip $ mapM (go (nub $ seen ++ ps)) (ps \\ seen)         return $ (nub $ (concat f') ++ f, if static then [] else nub $ (concat g') ++ g)  data LibrarySpec