From 133b716338db3c61d28556b7c8fd2280dd4ec4d3 Mon Sep 17 00:00:00 2001 From: aarne Date: Sun, 16 Sep 2007 20:52:27 +0000 Subject: strict reading of files; bug fix in readFiles in ShellState --- src/GF/Compile/NoParse.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/GF/Compile/NoParse.hs') 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 -- cgit v1.2.3