title: How to declare traits as taking implicit "constructor parameters"?
body: <p>I'm designing a class hierarchy, which consists of a base class along with several traits.  The base class provides default implementations of several methods, and the traits selectively override certain methods via <code>abstract override</code>, so as to acts as stackable traits/mixins.</p>
  
  <p>From a design perspective this works well, and maps to the domain so that I can add a filtering function from here (one trait) with a predicate from here (another trait) etc.</p>
  
  <p>However, now I'd like some of my traits to take implicit parameters.  I'm happy that this still makes sense from a design perspective, and wouldn't prove confusing in practice.  However, I cannot convince the compiler to run with it.</p>
  
  <p>The core of the problem seems to be that I cannot provide constructor arguments for a trait, such that they could be marked implicit.  Referencing the implicit parameter within a method implementation fails to compile with the expected "could not find implicit value" message; I tried to "propagate" the implicit from construction stage (where, in practice, it's always in scope) to being available within the method via</p>
  
  <pre><code>implicit val e = implicitly[ClassName]
  </code></pre>
  
  <p>but (as no doubt many of you expect) <em>that</em> definition failed with the same message.</p>
  
  <p>It seems that the problem here is that I can't convince the compiler to tag the signature of the trait itself with an <code>implicit ClassName</code> flag, and force callers (i.e. those who mix the trait into an object) to provide the implicit.  Currently my callers <em>are</em> doing so, but the compiler isn't checking at this level.</p>
  
  <hr>
  
  <p><strong>Is there any way to mark a trait as requiring certain implicits be available at construction time?</strong></p>
  
  <p>(And if not, is this simply not implemented yet or is there a deeper reason why this is impractical?)</p>