Skip to content

Commit

Permalink
Make sure the given Substitution is defined somewhere it will be found
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Oct 10, 2024
1 parent 1b3aa82 commit d8bb3ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/core/contextual.Insertion.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,9 @@ package contextual

import language.experimental.captureChecking

object Insertion:
given [ValueType: Embeddable] => Substitution[ValueType.Operand, ValueType, "x"] =
ValueType.embed(_)

trait Insertion[InputType, -ValueType]:
def embed(value: ValueType): InputType
4 changes: 0 additions & 4 deletions src/core/contextual.Substitution.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,5 @@ import language.experimental.captureChecking

import rudiments.*

object Substitution:
given [ValueType: Embeddable] => Substitution[ValueType.Operand, ValueType, "x"] =
ValueType.embed(_)

trait Substitution[InputType, -ValueType, SubstitutionType <: Label]
extends Insertion[InputType, ValueType]

0 comments on commit d8bb3ae

Please sign in to comment.