greglook / puget

Canonical Colorizing Clojure Printer
The Unlicense
251 stars 27 forks source link

Refactor polymorphism #14

Closed greglook closed 9 years ago

greglook commented 9 years ago

cc @gfredericks fixes #13

This has a couple of changes around the polymorphism used in Puget:

This last means you can provide arbitrary print rendering for types which don't use a tagged-value representation in EDN. I originally tried making the ->edn conversion function a multimethod instead, but it didn't really work out cleanly.

gfredericks commented 9 years ago

This sounds promising; will try it out sometime soon.

Thanks!

coveralls commented 9 years ago

Coverage Status

Coverage remained the same when pulling 878ca11098728a1ac3ff5cf391bc2f9b77ef0f9e on refactor-multimethods into 4f9c88773b162f5015d3b8df34b5e87eabb645da on develop.

coveralls commented 9 years ago

Coverage Status

Coverage remained the same when pulling c6f277f1464887e31ef285cc3bf058e7e7292919 on refactor-multimethods into 4f9c88773b162f5015d3b8df34b5e87eabb645da on develop.

coveralls commented 9 years ago

Coverage Status

Coverage remained the same when pulling be5bfef2814d1930cb02311cf9a30409c2719ac6 on refactor-multimethods into d20e034a7b9f5c9199880fa269136ba2dfc0cc2c on develop.

gfredericks commented 9 years ago

I've started using this for normal stuff; just in case it's useful feedback, here's my method of customization:

https://github.com/gfredericks/dotfiles/blob/a9e3221cb48ce7cd75a534782c229c3699ad673b/.lein/profiles.clj.symlink#L21-26