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
74
Issues
74
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
34deb068
Commit
34deb068
authored
Jun 11, 2019
by
Tim Steenvoorden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
parent
4925437e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
Examples/DynamicEditor/DynEditorExample.icl
Examples/DynamicEditor/DynEditorExample.icl
+13
-13
No files found.
Examples/DynamicEditor/DynEditorExample.icl
View file @
34deb068
...
...
@@ -56,7 +56,6 @@ where
|
Both
TaskExpr
TaskExpr
|
Any
TaskExpr
TaskExpr
|
One
TaskExpr
TaskExpr
// | Apply TaskFunc Expr
::
TaskFunc
=
ViewF
String
Func
...
...
@@ -345,26 +344,26 @@ evalTaskExpr :: TaskExpr -> Task Value
evalTaskExpr
(
Done
expr
)
=
return
$
evalExpr
expr
evalTaskExpr
(
EnterInfo
msg
(
Ty
toValue
))
=
enterInformation
msg
[]
@
toValue
evalTaskExpr
(
Then
task
taskFunc
)
=
evalTaskExpr
task
>>=
evalTaskFunc
taskFunc
evalTaskExpr
(
Any
task1
task2
)
=
(
evalTaskExpr
task1
-||-
evalTaskExpr
task2
<<@
ApplyLayout
arrangeHorizontal
)
evalTaskExpr
(
Both
task1
task2
)
=
(
evalTaskExpr
task1
-&&-
evalTaskExpr
task2
<<@
ApplyLayout
arrangeHorizontal
)
@
\(
a
,
b
)
->
VTuple
a
b
// evalTaskExpr (Apply taskFunc expr) = evalTaskFunc taskFunc $ evalExpr expr
evalTaskExpr
(
Any
task1
task2
)
=
(
evalTaskExpr
task1
-||-
evalTaskExpr
task2
)
<<@
ApplyLayout
arrangeHorizontal
evalTaskExpr
(
Both
task1
task2
)
=
(
evalTaskExpr
task1
-&&-
evalTaskExpr
task2
)
<<@
ApplyLayout
arrangeHorizontal
@
\(
a
,
b
)
->
VTuple
a
b
// evalTaskExpr (When task1 options) = evalTaskExpr task1
// >>* [ OnAction (Action name) (ifValue (test pred) (evalTaskFunc cont))
// \\ {name, pred, cont} <- options
// ]
where
test
pred
(
VInt
i
)
=
case
pred
of
Lt
(
VInt
j
)
->
i
<
j
Gt
(
VInt
j
)
->
i
>
j
Eq
(
VInt
j
)
->
i
==
j
test
pred
(
VBool
i
)
=
case
pred
of
Eq
(
VBool
j
)
->
i
==
j
Lt
(
VBool
j
)
->
False
Gt
(
VBool
j
)
->
False
//
where
//
test pred (VInt i) = case pred of
//
Lt (VInt j) -> i < j
//
Gt (VInt j) -> i > j
//
Eq (VInt j) -> i == j
//
test pred (VBool i) = case pred of
//
Eq (VBool j) -> i == j
//
Lt (VBool j) -> False
//
Gt (VBool j) -> False
evalTaskFunc
::
TaskFunc
Value
->
Task
Value
evalTaskFunc
(
ThenF
this
next
)
val
=
evalTaskFunc
this
val
>>=
evalTaskFunc
next
evalTaskFunc
(
ViewF
msg
func
)
val
=
case
evalFunc
val
func
of
(
VInt
i
)
->
(
viewInformation
msg
[]
i
@
VInt
)
<<@
ApplyLayout
arrangeHorizontal
(
VBool
b
)
->
(
viewInformation
msg
[]
b
@
VBool
)
<<@
ApplyLayout
arrangeHorizontal
...
...
@@ -375,6 +374,7 @@ evalTaskFunc (ViewF msg func) val = case evalFunc val func of
@
\(
a
,
b
)
->
VTuple
a
b
)
<<@
ApplyLayout
arrangeHorizontal
evalTaskFunc
(
UpdateF
msg
)
val
=
case
val
of
(
VInt
i
)
->
(
updateInformation
msg
[]
i
@
VInt
)
<<@
ApplyLayout
arrangeHorizontal
(
VBool
b
)
->
(
updateInformation
msg
[]
b
@
VBool
)
<<@
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