on master help sign in
Merge pull request #3955 from jfdm/fix-pretty-print

Fix's to Text.PrettyPrint.WL

commit0092d8f7a89c136d8673aa3af18af27a7ed04874 authorJan de Muijnck-Hughes <jfdm@users.noreply.github.com> dateFri 4 Aug 2017, 08:46 (9 years ago) parentdeca2895af85a4
2 files changed+6−6
libs/contrib/Text/PrettyPrint/WL/Characters.idr+2−2 libs/contrib/Text/PrettyPrint/WL/Core.idr+4−4
libs/contrib/Text/PrettyPrint/WL/Characters.idr+2−2
@@ -69,8 +69,8 @@ bang = char '!'
6969tick : Doc
7070tick = char '`'
7171
72−tilda : Doc
73−tilda = char '~'
72+tilde : Doc
73+tilde = char '~'
7474
7575hash : Doc
7676hash = char '#'
libs/contrib/Text/PrettyPrint/WL/Core.idr+4−4
@@ -128,10 +128,10 @@ showPrettyDoc : (doc : PrettyDoc) -> String
128128showPrettyDoc doc = showPrettyDocS doc ""
129129 where
130130 showPrettyDocS : (doc : PrettyDoc) -> (acc : String) -> String
131− showPrettyDocS Empty = id
132− showPrettyDocS (Chara c rest) = strCons c . showPrettyDocS rest
133− showPrettyDocS (Text len str rest) = (str ++) . showPrettyDocS rest
134− showPrettyDocS (Line lvl rest) = (('\n' `strCons` indentation lvl) ++) . showPrettyDocS rest
131+ showPrettyDocS Empty acc = acc
132+ showPrettyDocS (Chara c rest) acc = strCons c (showPrettyDocS rest acc)
133+ showPrettyDocS (Text len str rest) acc = str ++ (showPrettyDocS rest acc)
134+ showPrettyDocS (Line lvl rest) acc = (strCons '\n' (indentation lvl)) ++ showPrettyDocS rest acc
135135
136136private
137137fits : (w : Int) -> (x : PrettyDoc) -> Bool