diff options
| author | aarne <unknown> | 2004-02-26 14:49:16 +0000 |
|---|---|---|
| committer | aarne <unknown> | 2004-02-26 14:49:16 +0000 |
| commit | 2e1b57878329eb6a1822ef43c190f8a2aaaa82b7 (patch) | |
| tree | d7a85d0755a7c651e355f3315acd35f7d1a2feb5 /src/GF/Infra/UseIO.hs | |
| parent | 13be0d6356a2f198e2ad5929c5896939da8e168f (diff) | |
Improved make facility.
Diffstat (limited to 'src/GF/Infra/UseIO.hs')
| -rw-r--r-- | src/GF/Infra/UseIO.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/GF/Infra/UseIO.hs b/src/GF/Infra/UseIO.hs index bd9d9e22a..347af2adb 100644 --- a/src/GF/Infra/UseIO.hs +++ b/src/GF/Infra/UseIO.hs @@ -57,6 +57,10 @@ readFileIf f = catch (readFile f) (\_ -> reportOn f) where putStrLnFlush ("File " ++ f ++ " does not exist. Returned empty string") return "" +type FileName = String +type InitPath = String +type FullPath = String + getFilePath :: [FilePath] -> String -> IO (Maybe FilePath) getFilePath paths file = get paths where get [] = putStrLnFlush ("file" +++ file +++ "not found") >> return Nothing @@ -104,6 +108,9 @@ justFileName = reverse . takeWhile (/='/') . reverse suffixFile :: String -> FilePath -> FilePath suffixFile suff file = file ++ "." ++ suff +justModuleName :: FilePath -> String +justModuleName = fileBody . justFileName + -- getLineWell :: IO String -> IO String |
