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

Reply via email to