jaspervdj / blaze-html

A blazingly fast HTML combinator library for Haskell.
http://jaspervdj.be/blaze
Other
240 stars 48 forks source link

Instance Show Html ? #87

Open johannesgerer opened 10 years ago

johannesgerer commented 10 years ago

Just wanted to start a discussion about a possible show instance for Html. I think it would be nice for debugging and interactive programming in ghci...

jaspervdj commented 10 years ago

Right. The problem is that the straightforward instance (dumping the tree with the constructors) would not be very readable at all (but perhaps useful for debugging).

I usually just use Text.Blaze.Html.Renderer.Pretty.renderHtml in GHCi. I would reckon that would also make a better Show instance... this requires moving a lot of code around to avoid orphans though.

ghost commented 7 years ago

Eq would help for tests also