Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
openmole
openmole
Commits
98334e7b
Commit
98334e7b
authored
Jul 07, 2021
by
Romain Reuillon
Browse files
[Core] fix: reserve hook keyword
parent
d74b4b8f
Changes
2
Hide whitespace changes
Inline
Side-by-side
openmole/core/org.openmole.core.workflow/src/main/scala/org/openmole/core/workflow/composition/package.scala
View file @
98334e7b
...
...
@@ -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
.
h
ook
))
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
,
h
ook
:
Hook
)
case
class
Hooked
[
+T
](
value
:
T
,
h
:
Hook
)
trait
CompositionPackage
{
...
...
openmole/plugins/org.openmole.plugin.method.directsampling/src/test/scala/org/openmole/plugin/method/directsampling/DirectSamplingSpec.scala
View file @
98334e7b
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment