summaryrefslogtreecommitdiff
path: root/src/GF/Infra/ReadFiles.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/Infra/ReadFiles.hs')
-rw-r--r--src/GF/Infra/ReadFiles.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/GF/Infra/ReadFiles.hs b/src/GF/Infra/ReadFiles.hs
index 8f6b5c971..7fd81386e 100644
--- a/src/GF/Infra/ReadFiles.hs
+++ b/src/GF/Infra/ReadFiles.hs
@@ -161,12 +161,19 @@ needCompile opts headers sfiles0 = paths $ res $ mark $ iter changed where
CSRead -> gfcFile
CSRes -> gfrFile
+isGFC :: FilePath -> Bool
isGFC = (== "gfc") . fileSuffix
+gfcFile :: FilePath -> FilePath
gfcFile = suffixFile "gfc"
+
+gfrFile :: FilePath -> FilePath
gfrFile = suffixFile "gfr"
+
+gfFile :: FilePath -> FilePath
gfFile = suffixFile "gf"
+resModName :: ModName -> ModName
resModName = ('#':)
-- to get imports without parsing the whole files
@@ -306,6 +313,7 @@ isOldFile f = do
-- old GF tolerated newlines in quotes. No more supported!
+fixNewlines :: String -> String
fixNewlines s = case s of
'"':cs -> '"':mk cs
c :cs -> c:fixNewlines cs