X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Futils%2FPretty.lhs;h=d610c36044277bfd958057f59cd3e2ca7292dd78;hb=1fb1ab5d53a09607e7f6d2450806760688396387;hp=ad2a76fb9d8b90e35f6d6733ab986d68ac430d97;hpb=5eb1c77c795f92ed0f4c8023847e9d4be1a4fd0d;p=ghc-hetmet.git diff --git a/ghc/compiler/utils/Pretty.lhs b/ghc/compiler/utils/Pretty.lhs index ad2a76f..d610c36 100644 --- a/ghc/compiler/utils/Pretty.lhs +++ b/ghc/compiler/utils/Pretty.lhs @@ -27,7 +27,7 @@ module Pretty ( #endif ppSP, pp'SP, ppLbrack, ppRbrack, ppLparen, ppRparen, ppSemi, ppComma, ppEquals, - ppBracket, ppParens, ppQuote, + ppBracket, ppParens, ppQuote, ppCurlies, ppCat, ppBeside, ppBesides, ppAbove, ppAboves, ppNest, ppSep, ppHang, ppInterleave, ppIntersperse, @@ -168,6 +168,7 @@ ppEquals = ppChar '=' ppBracket p = ppBeside ppLbrack (ppBeside p ppRbrack) ppParens p = ppBeside ppLparen (ppBeside p ppRparen) +ppCurlies p = ppBeside (ppChar '{') (ppBeside p (ppChar '}')) ppQuote p = ppBeside (ppChar '`') (ppBeside p (ppChar '\'')) ppInterleave sep ps = ppSep (pi ps) @@ -325,12 +326,12 @@ ppSep ps width is_vert \begin{code} speakNth :: Int -> Pretty -speakNth 1 = ppStr "first" -speakNth 2 = ppStr "second" -speakNth 3 = ppStr "third" -speakNth 4 = ppStr "fourth" -speakNth 5 = ppStr "fifth" -speakNth 6 = ppStr "sixth" +speakNth 1 = ppPStr SLIT("first") +speakNth 2 = ppPStr SLIT("second") +speakNth 3 = ppPStr SLIT("third") +speakNth 4 = ppPStr SLIT("fourth") +speakNth 5 = ppPStr SLIT("fifth") +speakNth 6 = ppPStr SLIT("sixth") speakNth n = ppBesides [ ppInt n, ppStr st_nd_rd_th ] where st_nd_rd_th | n_rem_10 == 1 = "st"