mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-02 15:52:50 -06:00
Improved make facility.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user