
9 Dec
2004
9 Dec
'04
10:31 a.m.
To amplify on the other replies you already had, don't use show here:
makeIndex :: Doc -> Doc -- changed so output can be written to file makeIndex = show . shorten . -- [([Int], Word)] -> [([Int], Word)] amalgamate . -- [([Int], Word)] -> [([Int], Word)] makeLists . -- [(Int, Word)] -> [([Int], Word)] sortLs . -- [(Int, Word)] -> [(Int, Word)] allNumWords . -- [(Int, Line)] -> [(Int, Word)] numLines . -- [Line] -> [(Int, Line)] splitUp -- Doc -> [Line]
Instead use, e.g. printastable :: [([Int],Word)] -> String printastable l = concat $ map (\(xs,w) -> (show xs) ++ " " ++ w ++ "\n") l Jules