mainland-pretty 0.1 → 0.1.0.1
raw patch · 2 files changed
+6/−6 lines, 2 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Text.PrettyPrint.Mainland: instance [overlap ok] (Pretty a) => Pretty (Maybe a)
- Text.PrettyPrint.Mainland: instance [overlap ok] (Pretty a) => Pretty (Set a)
- Text.PrettyPrint.Mainland: instance [overlap ok] (Pretty a) => Pretty [a]
- Text.PrettyPrint.Mainland: instance [overlap ok] (Pretty a) => Show a
- Text.PrettyPrint.Mainland: instance [overlap ok] (Pretty x) => Pretty (L x)
+ Text.PrettyPrint.Mainland: instance [overlap ok] Pretty a => Pretty (Maybe a)
+ Text.PrettyPrint.Mainland: instance [overlap ok] Pretty a => Pretty (Set a)
+ Text.PrettyPrint.Mainland: instance [overlap ok] Pretty a => Pretty [a]
+ Text.PrettyPrint.Mainland: instance [overlap ok] Pretty a => Show a
+ Text.PrettyPrint.Mainland: instance [overlap ok] Pretty x => Pretty (L x)
- Text.PrettyPrint.Mainland: class Pretty a
+ Text.PrettyPrint.Mainland: class Pretty a where ppr = pprPrec 0 pprPrec _ = ppr pprList xs = list (map ppr xs)
- Text.PrettyPrint.Mainland: faildoc :: (Monad m) => Doc -> m a
+ Text.PrettyPrint.Mainland: faildoc :: Monad m => Doc -> m a
- Text.PrettyPrint.Mainland: ppr :: (Pretty a) => a -> Doc
+ Text.PrettyPrint.Mainland: ppr :: Pretty a => a -> Doc
- Text.PrettyPrint.Mainland: pprList :: (Pretty a) => [a] -> Doc
+ Text.PrettyPrint.Mainland: pprList :: Pretty a => [a] -> Doc
- Text.PrettyPrint.Mainland: pprPrec :: (Pretty a) => Int -> a -> Doc
+ Text.PrettyPrint.Mainland: pprPrec :: Pretty a => Int -> a -> Doc
- Text.PrettyPrint.Mainland: srcloc :: (Located a) => a -> Doc
+ Text.PrettyPrint.Mainland: srcloc :: Located a => a -> Doc
Files
Text/PrettyPrint/Mainland.hs view
@@ -531,17 +531,17 @@ x `Cat` y -> be p p' k f (Cons i x (Cons i y ds)) Nest j x -> let j' = i + j in j' `seq` be p p' k f (Cons j' x ds)- x `Alt` y -> better k (be p p' k f (Cons i x ds))- (be p p' k f (Cons i y ds))+ x `Alt` y -> better k f (be p p' k id (Cons i x ds))+ (be p p' k id (Cons i y ds)) SrcLoc loc -> be p (merge p' loc) k f ds Column g -> be p p' k f (Cons i (g k) ds) Nesting g -> be p p' k f (Cons i (g i) ds) where (p'', pragma) = lineloc p p' - better :: Int -> RDoc -> RDoc -> RDoc- better k x y | fits (w - k) x = x- | otherwise = y+ better :: Int -> RDocS -> RDoc -> RDoc -> RDoc+ better k f x y | fits (w - k) x = f x+ | otherwise = f y fits :: Int -> RDoc -> Bool fits w _ | w < 0 = False
mainland-pretty.cabal view
@@ -1,5 +1,5 @@ name: mainland-pretty-version: 0.1+version: 0.1.0.1 cabal-version: >= 1.6 license: BSD3 license-file: LICENSE