milessabin / shapeless

Generic programming for Scala
Apache License 2.0
3.39k stars 534 forks source link

Add missing implicit annotations. #123

Open milessabin opened 10 years ago

milessabin commented 10 years ago

There are very many implicit arguments in shapeless without @implicitNotFound annotations. Adding them would make compiler errors more readable.

ceedubs commented 10 years ago

@milessabin does this issue refer to explicitly annotating the return types of implicit vals and defs or to adding @implicitNotFound annotations to type classes?

milessabin commented 10 years ago

@ceedubs description updated.

milessabin commented 10 years ago

Partially addressed in #239 ... lots more to do.

joroKr21 commented 7 years ago

What would be a good template for the error messages? I'm thinking something like this:

Implicit not found: TypeClass[A, B, C]. Could not prove / compute / infer whatever type lever operation with A, B and C.

Then the question is whether to keep it short (a 2-lliner) or try to elaborate possible causes / solutions e.g: "Try to use the Aux pattern", "Make sure your Poly has the right arity", etc.

milessabin commented 7 years ago

I think the messages should be specific to the particular type class in question ... I'm not sure that replacing the existing default message with a similarly non-specific template would be all that much of an improvement.