on master help sign in
Get rid of unused eightyCharLines function
ef76c15Evan Czaplicki
src/Reporting/PrettyPrint.hs−12
@@ -32,15 +32,3 @@ parensIf bool doc =
32variable :: String -> Doc
32variable :: String -> Doc
33variable x =
33variable x =
34 if Help.isOp x then parens (text x) else text x
34 if Help.isOp x then parens (text x) else text x
35−
36−
37−eightyCharLines :: Int -> String -> String
38−eightyCharLines indent message = answer
39− where
40− (answer,_,_) = foldl step (spaces, indent-1, "") chunks
41−
42− chunks = map (\w -> (w, length w)) (words message)
43− spaces = replicate indent ' '
44− step (sentence, slen, space) (word, wlen)
45− | slen + wlen > 79 = (sentence ++ "\n" ++ spaces ++ word, indent + wlen, " ")
46− | otherwise = (sentence ++ space ++ word, slen + wlen + length space, " ")