Suppose I have a scope A
in which some implicit values are defined, and a code block c
that uses those implicit values. I also have scope B
which has implicits of compatible type, so that if I copy the code block c
into B
, it would compile and run without problem. This is ugly, of course, since I'm duplicating c
in two places, so I would like to move c
into its own function. Now, the function signature of c
has to look like:
def c(args...)(implicit implicitArgs...) = ...
where implicitArgs
are the implicit values used in c
. Given that some frameworks (Scalding, in my case) defines many implicits, the signature here can quickly get out-of-hand. Is there any syntax to say "carry all implicit values in the calling scope"? Or is there a clever way around this?
cheers, Geoff