Commit 9f12dee8 authored by Diederik van Arkel's avatar Diederik van Arkel

avoid problem with strict lists for large input files

parent 29528135
......@@ -70,7 +70,7 @@ textToStringsC { blocks }
stringsToText :: (StrictList String) -> Text
stringsToText lines
# (_,lines) = annotWhole lines
# lines = annotWhole lines
= { nrLines = slLength lines
, blocks = group BlockSize lines
}
......
......@@ -5,5 +5,5 @@ definition module syncol
import StdString
import StrictList
firstParse :: !(StrictList String) -> (Int, StrictList (Int,String))
firstParse :: !(StrictList String) -> StrictList (Int,String)
quickParse :: !Int !Int !(StrictList (Int,String)) -> (Int,StrictList (Int,String))
......@@ -83,7 +83,17 @@ where
/*
firstParse: textlines -> zip initial comment nesting level & textlines
*/
firstParse :: !(StrictList String) -> (Int, StrictList (Int,String))
firstParse :: !(StrictList String) -> StrictList (Int,String)
firstParse lines
= slFromList (fP 0 lines)
where
fP i SNil
= []
fP i (SCons h t)
#! j = parseLine i h
= [ (i,h) : (fP j t) ]
/*
firstParse lines
= fP 0 lines
where
......@@ -93,6 +103,7 @@ where
#! j = parseLine i h
# (k,r) = fP j t
= (k,SCons (i,h) r)
*/
/*
quickParse: (first modified line) (last modified line) textlines
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment