{"action":"closed","issue":{"url":"https://api.github.com/repos/milessabin/shapeless/issues/48","labels_url":"https://api.github.com/repos/milessabin/shapeless/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/milessabin/shapeless/issues/48/comments","events_url":"https://api.github.com/repos/milessabin/shapeless/issues/48/events","html_url":"https://github.com/milessabin/shapeless/issues/48","id":19502339,"number":48,"title":"No implicit Generic[A] available if A is defined in an expression","user":{"login":"mpilquist","id":118078,"avatar_url":"https://avatars.githubusercontent.com/u/118078?v=3","gravatar_id":"","url":"https://api.github.com/users/mpilquist","html_url":"https://github.com/mpilquist","followers_url":"https://api.github.com/users/mpilquist/followers","following_url":"https://api.github.com/users/mpilquist/following{/other_user}","gists_url":"https://api.github.com/users/mpilquist/gists{/gist_id}","starred_url":"https://api.github.com/users/mpilquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpilquist/subscriptions","organizations_url":"https://api.github.com/users/mpilquist/orgs","repos_url":"https://api.github.com/users/mpilquist/repos","events_url":"https://api.github.com/users/mpilquist/events{/privacy}","received_events_url":"https://api.github.com/users/mpilquist/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/milessabin/shapeless/labels/Bug","name":"Bug","color":"eb6420"},{"url":"https://api.github.com/repos/milessabin/shapeless/labels/Ready","name":"Ready","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/milessabin/shapeless/milestones/5","html_url":"https://github.com/milessabin/shapeless/milestones/shapeless-2.3.0","labels_url":"https://api.github.com/repos/milessabin/shapeless/milestones/5/labels","id":1020558,"number":5,"title":"shapeless-2.3.0","description":"","creator":{"login":"milessabin","id":131183,"avatar_url":"https://avatars.githubusercontent.com/u/131183?v=3","gravatar_id":"","url":"https://api.github.com/users/milessabin","html_url":"https://github.com/milessabin","followers_url":"https://api.github.com/users/milessabin/followers","following_url":"https://api.github.com/users/milessabin/following{/other_user}","gists_url":"https://api.github.com/users/milessabin/gists{/gist_id}","starred_url":"https://api.github.com/users/milessabin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milessabin/subscriptions","organizations_url":"https://api.github.com/users/milessabin/orgs","repos_url":"https://api.github.com/users/milessabin/repos","events_url":"https://api.github.com/users/milessabin/events{/privacy}","received_events_url":"https://api.github.com/users/milessabin/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":11,"state":"open","created_at":"2015-03-13T15:53:17Z","updated_at":"2015-09-13T13:37:34Z","due_on":"2015-09-17T23:00:00Z","closed_at":null},"comments":3,"created_at":"2013-09-14T13:43:21Z","updated_at":"2015-09-13T13:37:34Z","closed_at":"2015-09-13T13:37:34Z","body":"    Welcome to Scala version 2.10.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_51).\r\n    Type in expressions to have them evaluated.\r\n    Type :help for more information.\r\n\r\n    scala> import shapeless._\r\n    import shapeless._\r\n\r\n    scala> { case class Foo(x: Int, y: String); implicitly[Generic[Foo]] }\r\n    <console>:11: error: could not find implicit value for parameter e: shapeless.Generic[Foo]\r\n                  { case class Foo(x: Int, y: String); implicitly[Generic[Foo]] }\r\n                                                                 ^\r\n\r\n    scala> def foo = { case class Foo(x: Int, y: String); implicitly[Generic[Foo]] }\r\n    <console>:10: error: could not find implicit value for parameter e: shapeless.Generic[Foo]\r\n           def foo = { case class Foo(x: Int, y: String); implicitly[Generic[Foo]] }\r\n                                                                    ^\r\n\r\n    scala> case class Foo(x: Int, y: String); implicitly[Generic[Foo]]\r\n    defined class Foo\r\n    res1: shapeless.Generic[Foo] = $1$$1@7b63a14\r\n\r\nOne common use case for this is writing tests with ScalaTest or Spec2. Something like:\r\n\r\n    class MyTest extends WordSpec {\r\n      \"my code\" should {\r\n        case class Foo(x: Int, y: String)\r\n        \"do something interesting\" in {\r\n          ...\r\n        }\r\n      }\r\n    }"}}