diff options
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 |
