ppr typesigs

This commit is contained in:
crumbtoo
2024-02-08 11:40:13 -07:00
parent 6c943af4a1
commit fba46296db
3 changed files with 43 additions and 3 deletions

View File

@@ -3,6 +3,8 @@ module Data.Pretty
, ttext
-- * Pretty-printing lens combinators
, hsepOf, vsepOf
, vcatOf
, vlinesOf
, module Text.PrettyPrint
, maybeParens
)
@@ -49,3 +51,10 @@ hsepOf l = foldrOf l (<+>) mempty
vsepOf :: Getting (Endo Doc) s Doc -> s -> Doc
vsepOf l = foldrOf l ($+$) mempty
vcatOf :: Getting (Endo Doc) s Doc -> s -> Doc
vcatOf l = foldrOf l ($$) mempty
vlinesOf :: Getting (Endo Doc) s Doc -> s -> Doc
vlinesOf l = foldrOf l (\a b -> a $+$ "" $+$ b) mempty
-- hack(?) to separate chunks with a blankline