on master help sign in
Merge pull request #3955 from jfdm/fix-pretty-print
0092d8fJan de Muijnck-Hughes
libs/contrib/Text/PrettyPrint/WL/Characters.idr+2−2
@@ -69,8 +69,8 @@ bang = char '!'
69tick : Doc
69tick : Doc
70tick = char '`'
70tick = char '`'
71
71
72−tilda : Doc
72+tilde : Doc
73−tilda = char '~'
73+tilde = char '~'
74
74
75hash : Doc
75hash : Doc
76hash = char '#'
76hash = char '#'
libs/contrib/Text/PrettyPrint/WL/Core.idr+4−4
@@ -128,10 +128,10 @@ showPrettyDoc : (doc : PrettyDoc) -> String
128showPrettyDoc doc = showPrettyDocS doc ""
128showPrettyDoc doc = showPrettyDocS doc ""
129 where
129 where
130 showPrettyDocS : (doc : PrettyDoc) -> (acc : String) -> String
130 showPrettyDocS : (doc : PrettyDoc) -> (acc : String) -> String
131− showPrettyDocS Empty = id
131+ showPrettyDocS Empty acc = acc
132− showPrettyDocS (Chara c rest) = strCons c . showPrettyDocS rest
132+ showPrettyDocS (Chara c rest) acc = strCons c (showPrettyDocS rest acc)
133− showPrettyDocS (Text len str rest) = (str ++) . showPrettyDocS rest
133+ showPrettyDocS (Text len str rest) acc = str ++ (showPrettyDocS rest acc)
134− showPrettyDocS (Line lvl rest) = (('\n' `strCons` indentation lvl) ++) . showPrettyDocS rest
134+ showPrettyDocS (Line lvl rest) acc = (strCons '\n' (indentation lvl)) ++ showPrettyDocS rest acc
135
135
136private
136private
137fits : (w : Int) -> (x : PrettyDoc) -> Bool
137fits : (w : Int) -> (x : PrettyDoc) -> Bool