{"action":"created","issue":{"url":"https://api.github.com/repos/lihaoyi/Ammonite/issues/37","labels_url":"https://api.github.com/repos/lihaoyi/Ammonite/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/lihaoyi/Ammonite/issues/37/comments","events_url":"https://api.github.com/repos/lihaoyi/Ammonite/issues/37/events","html_url":"https://github.com/lihaoyi/Ammonite/issues/37","id":60584310,"number":37,"title":"Printing results","user":{"login":"paulp","id":9135,"avatar_url":"https://avatars.githubusercontent.com/u/9135?v=3","gravatar_id":"","url":"https://api.github.com/users/paulp","html_url":"https://github.com/paulp","followers_url":"https://api.github.com/users/paulp/followers","following_url":"https://api.github.com/users/paulp/following{/other_user}","gists_url":"https://api.github.com/users/paulp/gists{/gist_id}","starred_url":"https://api.github.com/users/paulp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulp/subscriptions","organizations_url":"https://api.github.com/users/paulp/orgs","repos_url":"https://api.github.com/users/paulp/repos","events_url":"https://api.github.com/users/paulp/events{/privacy}","received_events_url":"https://api.github.com/users/paulp/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2015-03-10T23:04:53Z","updated_at":"2015-03-11T02:19:53Z","closed_at":"2015-03-11T02:19:53Z","body":"Can you please provide a hook for how to print repl results? **Pretty-printing is by default defined for most standard library types,  as well as case classes and case objects. For other types not supported, it falls back to using toString** says the doc. That's all undesirable for me.\r\n\r\nI've gone to great lengths not to let toString infect everything in my library. It's essentially impossible to get out in front of scala's call to scala.runtime.ScalaRunTime.replStringOf because sbt is proguarded and bundled with a stripped down version. But Ammonite doesn't have to be as hostile to decent printing. I have a method like\r\n```\r\nobject psp { def show[A: Show](x: A): String = implicitly[Show[A]] show x }\r\n```\r\nIf there were some way to get the ammonite repl to use it on all results it would be hugely helpful.\r\n"},"comment":{"url":"https://api.github.com/repos/lihaoyi/Ammonite/issues/comments/78188342","html_url":"https://github.com/lihaoyi/Ammonite/issues/37#issuecomment-78188342","issue_url":"https://api.github.com/repos/lihaoyi/Ammonite/issues/37","id":78188342,"user":{"login":"lihaoyi","id":934140,"avatar_url":"https://avatars.githubusercontent.com/u/934140?v=3","gravatar_id":"","url":"https://api.github.com/users/lihaoyi","html_url":"https://github.com/lihaoyi","followers_url":"https://api.github.com/users/lihaoyi/followers","following_url":"https://api.github.com/users/lihaoyi/following{/other_user}","gists_url":"https://api.github.com/users/lihaoyi/gists{/gist_id}","starred_url":"https://api.github.com/users/lihaoyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lihaoyi/subscriptions","organizations_url":"https://api.github.com/users/lihaoyi/orgs","repos_url":"https://api.github.com/users/lihaoyi/repos","events_url":"https://api.github.com/users/lihaoyi/events{/privacy}","received_events_url":"https://api.github.com/users/lihaoyi/received_events","type":"User","site_admin":false},"created_at":"2015-03-11T02:19:53Z","updated_at":"2015-03-11T02:19:53Z","body":"This works now\r\n\r\n```scala\r\n@ class C\r\ndefined class C\r\n@ implicit def pprint = ammonite.pprint.PPrinter[C]((t, c) => Iterator(\"INSTANCE OF CLASS C\"))\r\ndefined function pprint\r\n@ new C\r\nres2: cmd0.C = INSTANCE OF CLASS C\r\n```\r\n\r\nhttps://github.com/lihaoyi/Ammonite/blob/master/repl/src/test/scala/ammonite/repl/AdvancedTests.scala#L171-L182"}}