Changeset 5890 for src/Pugs/Pretty.hs
- Timestamp:
- 07/29/05 17:19:17 (3 years ago)
- svk:copy_cache_prev:
- 7758
- Files:
-
- 1 modified
-
src/Pugs/Pretty.hs (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Pretty.hs
r4934 r5890 13 13 -} 14 14 15 module Pugs.Pretty where 15 module Pugs.Pretty ( 16 Pretty, pretty, 17 ) where 16 18 import Pugs.Internals 17 19 import Pugs.Types … … 143 145 quoted x = [x] 144 146 145 ratToNum :: VRat -> VNum146 ratToNum x = (fromIntegral $ numerator x) / (fromIntegral $ denominator x)147 148 147 doubleBraces :: Doc -> Doc 149 148 doubleBraces x = vcat [ (lbrace <> lbrace), nest defaultIndent x, rbrace <> rbrace] … … 152 151 joinList x y = cat $ punctuate x y 153 152 154 commasep :: [Doc] -> Doc155 commasep x = cat $ (punctuate (char ',')) x156 157 153 pretty :: Pretty a => a -> String 158 154 pretty a = render $ format a
