Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
iTasks-SDK
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
73
Issues
73
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
clean-and-itasks
iTasks-SDK
Commits
4ef80491
Commit
4ef80491
authored
Jun 14, 2019
by
Tim Steenvoorden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make update take a function
parent
7b807176
Pipeline
#25345
passed with stage
in 6 minutes and 42 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
Examples/DynamicEditor/DynEditorExample.icl
Examples/DynamicEditor/DynEditorExample.icl
+8
-8
No files found.
Examples/DynamicEditor/DynEditorExample.icl
View file @
4ef80491
...
...
@@ -60,7 +60,7 @@ where
::
TaskFunc
=
ThenF
TaskFunc
TaskFunc
|
ViewF
String
Func
|
UpdateF
String
|
UpdateF
String
Func
::
Expr
=
Int
Int
...
...
@@ -207,10 +207,11 @@ taskEditor = DynamicEditor
<<@@@
applyHorizontalBoxedLayout
<<@@@
AddLabels
[
Just
"message"
]
,
functionConsDyn
"UpdateF"
"update"
(
dynamic
\
s
->
Typed
(
UpdateF
s
)
::
A
.
a
:
(
dynamic
\
s
(
Typed
func
)
->
Typed
(
UpdateF
s
func
)
::
A
.
a
b
:
String
->
Typed
TaskFunc
(
a
->
Task
a
)
(
Typed
Func
(
a
->
b
))
->
Typed
TaskFunc
(
a
->
Task
b
)
)
<<@@@
applyHorizontalBoxedLayout
<<@@@
AddLabels
[
Just
"message"
]
...
...
@@ -393,19 +394,18 @@ evalTaskFunc (ViewF msg func) val = case evalFunc val func of
(
VString
s
)
->
(
viewInformation
msg
[]
s
@
VString
)
<<@
ApplyLayout
arrangeHorizontal
(
VTuple
a
b
)
->
(
viewInformation
msg
[]
()
||-
evalTaskFunc
(
ViewF
""
Identity
)
a
-&&-
evalTaskFunc
(
ViewF
""
Identity
)
b
||-
(
evalTaskFunc
(
ViewF
""
Identity
)
a
-&&-
evalTaskFunc
(
ViewF
""
Identity
)
b
)
@
\(
a
,
b
)
->
VTuple
a
b
)
<<@
ApplyLayout
arrangeHorizontal
evalTaskFunc
(
UpdateF
msg
)
val
=
case
val
of
evalTaskFunc
(
UpdateF
msg
func
)
val
=
case
evalFunc
val
func
of
(
VInt
i
)
->
(
updateInformation
msg
[]
i
@
VInt
)
<<@
ApplyLayout
arrangeHorizontal
(
VBool
b
)
->
(
updateInformation
msg
[]
b
@
VBool
)
<<@
ApplyLayout
arrangeHorizontal
(
VString
s
)
->
(
updateInformation
msg
[]
s
@
VString
)
<<@
ApplyLayout
arrangeHorizontal
(
VTuple
a
b
)
->
(
viewInformation
msg
[]
()
||-
evalTaskFunc
(
UpdateF
""
)
a
-&&-
evalTaskFunc
(
UpdateF
""
)
b
||-
(
evalTaskFunc
(
UpdateF
""
Identity
)
a
-&&-
evalTaskFunc
(
UpdateF
""
Identity
)
b
)
@
\(
a
,
b
)
->
VTuple
a
b
)
<<@
ApplyLayout
arrangeHorizontal
...
...
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