diff options
Diffstat (limited to 'src/compiler/GF/Data/Operations.hs')
| -rw-r--r-- | src/compiler/GF/Data/Operations.hs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/compiler/GF/Data/Operations.hs b/src/compiler/GF/Data/Operations.hs index 52632c163..3c8b16b8a 100644 --- a/src/compiler/GF/Data/Operations.hs +++ b/src/compiler/GF/Data/Operations.hs @@ -38,7 +38,7 @@ module GF.Data.Operations ( tree2list, -- ** Printing - indent, (+++), (++-), (++++), (+++++), + indent, (+++), (++-), (++++), (+++-), (+++++), prUpper, prReplicate, prTList, prQuotedString, prParenth, prCurly, prBracket, prArgList, prSemicList, prCurlyList, restoreEscapes, numberedParagraphs, prConjList, prIfEmpty, wrapLines, @@ -160,13 +160,20 @@ tree2list = Map.toList indent :: Int -> String -> String indent i s = replicate i ' ' ++ s -(+++), (++-), (++++), (+++++) :: String -> String -> String +(+++), (++-), (++++), (+++-), (+++++) :: String -> String -> String a +++ b = a ++ " " ++ b + a ++- "" = a a ++- b = a +++ b + a ++++ b = a ++ "\n" ++ b + +a +++- "" = a +a +++- b = a ++++ b + a +++++ b = a ++ "\n\n" ++ b + prUpper :: String -> String prUpper s = s1 ++ s2' where (s1,s2) = span isSpace s |
