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 | |
| parent | e8d2281684ea4c8a1cd3a32a5068a34ff8a95f07 (diff) | |
strict reading of files; bug fix in readFiles in ShellState
Diffstat (limited to 'src/GF/Compile')
| -rw-r--r-- | src/GF/Compile/NoParse.hs | 6 | ||||
| -rw-r--r-- | src/GF/Compile/ShellState.hs | 2 |
2 files changed, 5 insertions, 3 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 diff --git a/src/GF/Compile/ShellState.hs b/src/GF/Compile/ShellState.hs index 3793b8651..e01171b18 100644 --- a/src/GF/Compile/ShellState.hs +++ b/src/GF/Compile/ShellState.hs @@ -282,7 +282,7 @@ updateShellState opts ign mcnc sh ((_,sgr,gr,eenv),rts) = do treebanks = treebanks sh, probss = zip concrs probss, gloptions = gloptions sh, --- opts, -- this would be command-line options - readFiles = [ft | ft@(_,(f,_)) <- readFiles sh, notInrts f] ++ rts, + readFiles = [ft | ft@(f,(_,_)) <- readFiles sh, notInrts f] ++ rts, absCats = csi, statistics = [StDepTypes deps,StBoundVars binds], transfers = transfers sh, |
