This commit is contained in:
crumbtoo
2024-03-14 01:15:55 -06:00
parent 8fd75a67d3
commit c5a293acf8
9 changed files with 185 additions and 77 deletions

View File

@@ -41,6 +41,9 @@ class Pretty a where
rpretty :: (IsString s, Pretty a) => a -> s
rpretty = fromString . render . pretty
instance Pretty Doc where
pretty = id
instance Pretty String where
pretty = Text.PrettyPrint.text
@@ -71,9 +74,6 @@ instance (Pretty1 f, Pretty1 g) => Pretty1 (Sum f g) where
instance (Pretty (f (Fix f))) => Pretty (Fix f) where
prettyPrec d (Fix f) = prettyPrec d f
-- instance (Pretty1 f) => Pretty (Fix f) where
-- prettyPrec d (Fix f) = prettyPrec1 d f
--------------------------------------------------------------------------------
ttext :: Pretty t => t -> Doc