summaryrefslogtreecommitdiff
path: root/src/full/Agda/Utils/Pretty.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/full/Agda/Utils/Pretty.hs')
-rw-r--r--src/full/Agda/Utils/Pretty.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/full/Agda/Utils/Pretty.hs b/src/full/Agda/Utils/Pretty.hs
index 4359cc1..ec84a48 100644
--- a/src/full/Agda/Utils/Pretty.hs
+++ b/src/full/Agda/Utils/Pretty.hs
@@ -1,5 +1,4 @@
{-# LANGUAGE CPP #-}
-{-# LANGUAGE FlexibleInstances #-}
{-| Pretty printing functions.
-}
@@ -77,3 +76,8 @@ align :: Int -> [(String, Doc)] -> Doc
align max rows =
vcat $ map (\(s, d) -> text s $$ nest (maxLen + 1) d) $ rows
where maxLen = maximum $ 0 : filter (< max) (map (length . fst) rows)
+
+-- | Handles strings with newlines properly (preserving indentation)
+multiLineText :: String -> Doc
+multiLineText = vcat . map text . lines
+