diff options
Diffstat (limited to 'src/GF/Infra/ReadFiles.hs')
| -rw-r--r-- | src/GF/Infra/ReadFiles.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/GF/Infra/ReadFiles.hs b/src/GF/Infra/ReadFiles.hs index 5e4d2b165..bc2706b49 100644 --- a/src/GF/Infra/ReadFiles.hs +++ b/src/GF/Infra/ReadFiles.hs @@ -91,15 +91,17 @@ gfFile = suffixFile "gf" importsOfFile :: String -> [FilePath] importsOfFile = + drop 1 . -- ignore module name itself filter (not . spec) . -- ignore keywords and special symbols unqual . -- take away qualifiers takeWhile (not . term) . -- read until curly or semic - drop 2 . -- ignore keyword and module name lexs . -- analyse into lexical tokens unComm -- ignore comments before the headed line where term = flip elem ["{",";"] - spec = flip elem ["of", "open","in", ":", "->", "reuse", "=", "(", ")",",","**"] + spec = flip elem ["of", "open","in", ":", "->", "reuse", "=", "(", ")",",","**","with", + "abstract","concrete","resource","transfer","interface","incomplete", + "instance"] unqual ws = case ws of "(":q:ws' -> unqual ws' w:ws' -> w:unqual ws' |
