I'd just like to thank everyone for helping. Its now working great! I really appreciate your help. I only wish I'd discovered the mailing list sooner.
All the best. Doug On Thu, 9 Dec 2004 10:31:52 +0000, Jules Bean <[EMAIL PROTECTED]> wrote: > 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 > > _______________________________________________ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe