typechecking things

This commit is contained in:
crumbtoo
2024-02-09 19:07:34 -07:00
parent 17d764c2ec
commit f53d42bf84
3 changed files with 13 additions and 15 deletions

View File

@@ -1,5 +1,6 @@
module Data.Pretty
( Pretty(..)
, rpretty
, ttext
-- * Pretty-printing lens combinators
, hsepOf, vsepOf
@@ -12,6 +13,7 @@ module Data.Pretty
----------------------------------------------------------------------------------
import Text.PrettyPrint hiding ((<>))
import Text.PrettyPrint.HughesPJ hiding ((<>))
import Text.Printf
import Data.String (IsString(..))
import Data.Text.Lens
import Data.Monoid
@@ -27,6 +29,9 @@ class Pretty a where
pretty = prettyPrec 0
prettyPrec a _ = pretty a
rpretty :: (IsString s, Pretty a) => a -> s
rpretty = fromString . render . pretty
instance Pretty String where
pretty = Text.PrettyPrint.text