diff options
| author | aarne <aarne@cs.chalmers.se> | 2007-09-16 20:52:27 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2007-09-16 20:52:27 +0000 |
| commit | 133b716338db3c61d28556b7c8fd2280dd4ec4d3 (patch) | |
| tree | a0ff9ebfb1fe413717235c4c2f7263634b8e0356 /src/GF/Compile/NoParse.hs | |
| parent | e8d2281684ea4c8a1cd3a32a5068a34ff8a95f07 (diff) | |
strict reading of files; bug fix in readFiles in ShellState
Diffstat (limited to 'src/GF/Compile/NoParse.hs')
| -rw-r--r-- | src/GF/Compile/NoParse.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/GF/Compile/NoParse.hs b/src/GF/Compile/NoParse.hs index 0e37c9f95..c8f828970 100644 --- a/src/GF/Compile/NoParse.hs +++ b/src/GF/Compile/NoParse.hs @@ -38,9 +38,11 @@ getNoparseFromFile :: Options -> FilePath -> IO NoParse getNoparseFromFile opts file = do let f = maybe file id $ getOptVal opts noparseFile s <- readFile f - return $ igns s + let tree = buildTree $ flip zip (repeat ()) $ concat $ map getIgnores $ lines s + tree `seq` return $ igns tree where - igns s i = isInBinTree i $ buildTree $ flip zip (repeat ()) $ concat $ map getIgnores $ lines s + igns tree i = isInBinTree i tree + -- where getIgnores s = case dropWhile (/="--#") (words s) of _:"noparse":fs -> map identC fs |
