Skip to content

Commit

Permalink
Rename singular .from/.add,.addSet parameter from instance to…
Browse files Browse the repository at this point in the history
… `function` to reflect that it's suspended
  • Loading branch information
neko-kai committed Feb 17, 2020
1 parent bcb9704 commit 19fe058
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ object ModuleDefDSL {
final def from[I <: T: Tag: AnyConstructor]: AfterBind =
from(AnyConstructor[I].provider)

final def from[I <: T: Tag](instance: => I): AfterBind =
from(ProviderMagnet.lift(instance))
final def from[I <: T: Tag](function: => I): AfterBind =
from(ProviderMagnet.lift(function))

final def fromValue[I <: T: Tag](instance: I): AfterBind =
bind(ImplDef.InstanceImpl(SafeType.get[I], instance))
Expand Down Expand Up @@ -320,8 +320,8 @@ object ModuleDefDSL {
final def add[I <: T: Tag: AnyConstructor](implicit pos: CodePositionMaterializer): AfterAdd =
add[I](AnyConstructor[I].provider)

final def add[I <: T: Tag](instance: => I)(implicit pos: CodePositionMaterializer): AfterAdd =
add(ProviderMagnet.lift(instance))
final def add[I <: T: Tag](function: => I)(implicit pos: CodePositionMaterializer): AfterAdd =
add(ProviderMagnet.lift(function))

final def addValue[I <: T: Tag](instance: I)(implicit pos: CodePositionMaterializer): AfterAdd =
appendElement(ImplDef.InstanceImpl(SafeType.get[I], instance), pos)
Expand Down Expand Up @@ -367,8 +367,8 @@ object ModuleDefDSL {
* many[T].addSet(Set(new T, new T, new T))
* }}}
**/
final def addSet[I <: Set[_ <: T]: Tag](instance: => I)(implicit pos: CodePositionMaterializer): AfterMultiAdd =
addSet(ProviderMagnet.lift(instance))
final def addSet[I <: Set[_ <: T]: Tag](function: => I)(implicit pos: CodePositionMaterializer): AfterMultiAdd =
addSet(ProviderMagnet.lift(function))

final def addSetValue[I <: Set[_ <: T]: Tag](instance: I)(implicit pos: CodePositionMaterializer): AfterMultiAdd =
multiSetAdd(ImplDef.InstanceImpl(SafeType.get[I], instance), pos)
Expand Down

0 comments on commit 19fe058

Please sign in to comment.