Commit 98334e7b authored by Romain Reuillon's avatar Romain Reuillon
Browse files

[Core] fix: reserve hook keyword

parent d74b4b8f
......@@ -531,7 +531,7 @@ package composition {
implicit def on[T, C](implicit toDSLContainer: ExplorationMethod[T, C]): ExplorationMethod[On[T, EnvironmentProvider], C] = t toDSLContainer(t.value).copy(environment = Some(t.on))
implicit def hooked[T, C](implicit toDSLContainer: ExplorationMethod[T, C]): ExplorationMethod[Hooked[T], C] = t {
val container = toDSLContainer(t.value)
container.copy(hooks = container.hooks ++ Seq(t.hook))
container.copy(hooks = container.hooks ++ Seq(t.h))
}
}
......@@ -567,7 +567,7 @@ package composition {
def apply(t: T, h: P): T
}
case class Hooked[+T](value: T, hook: Hook)
case class Hooked[+T](value: T, h: Hook)
trait CompositionPackage {
......
......@@ -253,10 +253,14 @@ class DirectSamplingSpec extends FlatSpec with Matchers {
val model = EmptyTask() set (inputs += l)
DirectSampling(
model,
ExplicitSampling(l, Seq(1.0, 2.0))
) hook display
val ds =
DirectSampling(
model,
ExplicitSampling(l, Seq(1.0, 2.0))
)
(ds hook display): DSL
(ds hook display hook "/tmp/test.csv"): DSL
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment