generic-pretty alternatives and similar packages
Based on the "Text" category.
Alternatively, view generic-pretty alternatives based on common mentions on social networks and blogs.
-
skylighting
A Haskell syntax highlighting library with tokenizers derived from KDE syntax highlighting descriptions -
double-conversion
A fast Haskell library for converting between double precision floating point numbers and text strings. It is implemented as a binding to the V8-derived C++ double-conversion library.
SaaSHub - Software Alternatives and Reviews
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of generic-pretty or a related project?
README
generic-pretty
Pretty printing for Generic data
Usage
Define your data types and derives Generic
.
Then you can make instances for pretty printing automatically.
data Foo = Foo { fooA :: Int, fooB :: String } deriving Generic
instance Pretty Foo
data Bar a = Bar { barA :: Foo, barB :: a } deriving Generic
instance Pretty a => Pretty (Bar a)
Now, you can pretty print your value.
> prettyPrint $ Foo 123 "foo"
Foo { fooA = 123, fooB = "foo" }
> prettyPrint $ Bar (Foo 123 "foo") (Just True)
Bar { barA = Foo { fooA = 123
, fooB = "foo" }
, barB = Just True }
By default, generic-pretty
prints highlighted values.
If you do not want this behavior, you can use plain version of pretty printer.