ppr typesigs

This commit is contained in:
crumbtoo committed 2024-02-08 11:40:13 -07:00
1 parent 6c943af4a1
commit fba46296db
3 files changed
+43 -3

No files matched your search

+9
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