on master help sign in
Rewrite a helper function to be more maintainable.
commit5af85a44eeddfeeb248c9bc4d4ae111a3241bb48 authorJan de Muijnck-Hughes <jan.deMuijnck-Hughes@glasgow.ac.uk> dateTue 1 Aug 2017, 08:49 (9 years ago) parentf801dfc
1 file changed+4−4
libs/contrib/Text/PrettyPrint/WL/Core.idr+4−4
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