yav / pretty-show

Tools for working with derived Show instances in Haskell.
MIT License
57 stars 15 forks source link

Generic and Data instances for Value #49

Open mniip opened 1 year ago

mniip commented 1 year ago

Would be pretty useful for writing custom PreProc functions. These enable you to do generic tree traversals a-la gplate or uniplate.

Or even more simply, make use of any other typeclasses that have generic deriving. For example, I have a PreProc function that omits some elements in particularly long lists, and instead inserts a hash of the omitted contents. To have Hashable Value would require either an orphan or an additional dependency for pretty-show. If I had Generic I could at least use GHashable (Rep Value).