1
0
forked from GitHub/gf-core

lib path and *

This commit is contained in:
aarne
2005-05-27 10:37:57 +00:00
parent 81b789c3f1
commit 665c542af2
2 changed files with 7 additions and 7 deletions

View File

@@ -5,9 +5,9 @@
-- Stability : (stable) -- Stability : (stable)
-- Portability : (portable) -- Portability : (portable)
-- --
-- > CVS $Date: 2005/05/27 08:13:35 $ -- > CVS $Date: 2005/05/27 11:37:57 $
-- > CVS $Author: aarne $ -- > CVS $Author: aarne $
-- > CVS $Revision: 1.38 $ -- > CVS $Revision: 1.39 $
-- --
-- The top-level compilation chain from source file to gfc\/gfr. -- The top-level compilation chain from source file to gfc\/gfr.
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
@@ -135,7 +135,7 @@ compileEnvShSt st fs = ((0,sgr,cgr),fts) where
fts = readFiles st fts = readFiles st
pathListOpts :: Options -> FileName -> IO [InitPath] pathListOpts :: Options -> FileName -> IO [InitPath]
pathListOpts opts file = maybe (return [file]) getFilePaths $ getOptVal opts pathList pathListOpts opts file = return $ maybe [file] pFilePaths $ getOptVal opts pathList
reverseModules (MGrammar ms) = MGrammar $ reverse ms reverseModules (MGrammar ms) = MGrammar $ reverse ms

View File

@@ -5,9 +5,9 @@
-- Stability : (stable) -- Stability : (stable)
-- Portability : (portable) -- Portability : (portable)
-- --
-- > CVS $Date: 2005/05/27 08:13:35 $ -- > CVS $Date: 2005/05/27 11:37:57 $
-- > CVS $Author: aarne $ -- > CVS $Author: aarne $
-- > CVS $Revision: 1.15 $ -- > CVS $Revision: 1.16 $
-- --
-- (Description of the module) -- (Description of the module)
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
@@ -113,9 +113,9 @@ extendPathEnv :: String -> String -> [FilePath] -> IO [FilePath]
extendPathEnv lib var ps = do extendPathEnv lib var ps = do
b <- catch (getEnv lib) (const (return "")) -- e.g. GF_LIB_PATH b <- catch (getEnv lib) (const (return "")) -- e.g. GF_LIB_PATH
s <- catch (getEnv var) (const (return "")) -- e.g. GF_GRAMMAR_PATH s <- catch (getEnv var) (const (return "")) -- e.g. GF_GRAMMAR_PATH
fs <- getFilePaths s let fs = pFilePaths s
let ss = ps ++ fs let ss = ps ++ fs
return $ ss ++ [b ++ "/" ++ s | s <- ss] liftM concat $ mapM allSubdirs $ ss ++ [b ++ "/" ++ s | s <- ss]
pFilePaths :: String -> [FilePath] pFilePaths :: String -> [FilePath]
pFilePaths s = case break isPathSep s of pFilePaths s = case break isPathSep s of