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
e6cac8bd
Commit
e6cac8bd
authored
Jun 14, 2019
by
Steffen Michels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve layout
parent
6e237a99
Pipeline
#25313
passed with stage
in 6 minutes and 35 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
13 deletions
+16
-13
Examples/DynamicEditor/DynEditorExample.icl
Examples/DynamicEditor/DynEditorExample.icl
+16
-13
No files found.
Examples/DynamicEditor/DynEditorExample.icl
View file @
e6cac8bd
...
...
@@ -125,6 +125,7 @@ taskEditor = DynamicEditor
(
Typed
TaskExpr
(
Task
a
))
(
Typed
TaskFunc
(
a
->
Task
b
))
->
Typed
TaskExpr
(
Task
b
)
)
<<@@@
applyVerticalClasses
,
functionConsDyn
"ThenF"
"sequence"
(
dynamic
\(
Typed
taskFunc1
)
(
Typed
taskFunc2
)
->
Typed
(
ThenF
taskFunc1
taskFunc2
)
::
A
.
a
b
c
:
...
...
@@ -139,7 +140,7 @@ taskEditor = DynamicEditor
(
Typed
TaskExpr
(
Task
b
))
->
Typed
TaskExpr
(
Task
(
a
,
b
))
)
<<@@@
apply
Horizont
alClasses
<<@@@
apply
Vertic
alClasses
,
functionConsDyn
"Any"
"any of"
(
dynamic
\(
Typed
task1
)
(
Typed
task2
)
->
Typed
(
Any
task1
task2
)
::
A
.
a
b
:
...
...
@@ -147,7 +148,7 @@ taskEditor = DynamicEditor
(
Typed
TaskExpr
(
Task
a
))
->
Typed
TaskExpr
(
Task
a
)
)
<<@@@
apply
Horizont
alClasses
<<@@@
apply
Vertic
alClasses
,
functionConsDyn
"One"
"one of"
(
dynamic
\(
Typed
task1
)
(
Typed
task2
)
->
Typed
(
One
task1
task2
)
::
A
.
a
b
:
...
...
@@ -155,7 +156,7 @@ taskEditor = DynamicEditor
(
Typed
TaskExpr
(
Task
a
))
->
Typed
TaskExpr
(
Task
a
)
)
<<@@@
apply
Horizont
alClasses
<<@@@
apply
Vertic
alClasses
// , functionConsDyn "When" "guarded sequence"
// ( dynamic \(Typed task1) (Typed steps) -> Typed (When task1 steps) ::
// // Typed (When task1 [(expr, pred, tfExpr) \\ (Typed expr, pred, Typed tfExpr) <- steps]) ::
...
...
@@ -223,6 +224,7 @@ taskEditor = DynamicEditor
,
DynamicConsGroup
"Basics"
[
functionConsDyn
"Identity"
"this value"
(
dynamic
Typed
Identity
::
A
.
a
:
Typed
Func
(
a
->
a
))
<<@@@
applyHorizontalClassesNoBorder
,
functionConsDyn
"Apply"
"apply"
(
dynamic
\(
Typed
func
)
(
Typed
expr
)
->
Typed
(
Apply
func
expr
)
::
...
...
@@ -234,10 +236,10 @@ taskEditor = DynamicEditor
<<@@@
applyHorizontalClasses
,
functionConsDyn
"Fst"
"fst"
(
dynamic
Typed
Fst
::
A
.
a
b
:
Typed
Func
((
a
,
b
)
->
a
))
<<@@@
applyHorizontalClasses
<<@@@
applyHorizontalClasses
NoBorder
,
functionConsDyn
"Snd"
"snd"
(
dynamic
Typed
Snd
::
A
.
a
b
:
Typed
Func
((
a
,
b
)
->
b
))
<<@@@
applyHorizontalClasses
<<@@@
applyHorizontalClasses
NoBorder
]
,
DynamicConsGroup
"Arithmetic"
[
functionConsDyn
"Add"
"add"
...
...
@@ -285,13 +287,13 @@ taskEditor = DynamicEditor
,
DynamicConsGroup
"Values"
[
functionConsDyn
"Int"
"the integer"
(
dynamic
\
i
->
Typed
(
Int
i
)
::
Int
->
Typed
Expr
Int
)
<<@@@
applyHorizontalClasses
<<@@@
applyHorizontalClasses
NoBorder
,
functionConsDyn
"Bool"
"the boolean"
(
dynamic
\
b
->
Typed
(
Bool
b
)
::
Bool
->
Typed
Expr
Bool
)
<<@@@
applyHorizontalClasses
<<@@@
applyHorizontalClasses
NoBorder
,
functionConsDyn
"String"
"the string"
(
dynamic
\
s
->
Typed
(
String
s
)
::
String
->
Typed
Expr
String
)
<<@@@
applyHorizontalClasses
<<@@@
applyHorizontalClasses
NoBorder
,
functionConsDyn
"Tuple"
"the tuple"
(
dynamic
\(
Typed
a
)
(
Typed
b
)
->
Typed
(
Tuple
a
b
)
::
...
...
@@ -304,13 +306,13 @@ taskEditor = DynamicEditor
,
DynamicConsGroup
"Types"
[
functionConsDyn
"Ty.Int"
"Int"
(
dynamic
Typed
(
Ty
VInt
)
::
Typed
Ty
Int
)
<<@@@
applyHorizontalClasses
<<@@@
applyHorizontalClasses
NoBorder
,
functionConsDyn
"Ty.Bool"
"Bool"
(
dynamic
Typed
(
Ty
VBool
)
::
Typed
Ty
Bool
)
<<@@@
applyHorizontalClasses
<<@@@
applyHorizontalClasses
NoBorder
,
functionConsDyn
"Ty.String"
"String"
(
dynamic
Typed
(
Ty
VString
)
::
Typed
Ty
String
)
<<@@@
applyHorizontalClasses
<<@@@
applyHorizontalClasses
NoBorder
,
functionConsDyn
"Ty.Tuple"
"Tuple"
(
dynamic
\(
Typed
(
Ty
toValue1
))
(
Typed
(
Ty
toValue2
))
->
Typed
(
Ty
\(
x
,
y
)
->
VTuple
(
toValue1
x
)
(
toValue2
y
))
::
A
.
a
b
:
...
...
@@ -335,8 +337,9 @@ where
stringEditor
::
Editor
String
stringEditor
=
gEditor
{|*|}
applyHorizontalClasses
=
ApplyCssClasses
[
"itasks-horizontal"
,
"itasks-wrap-width"
,
"itasks-panel"
]
applyVerticalClasses
=
ApplyCssClasses
[
"itasks-vertical"
,
"itasks-wrap-width"
,
"itasks-panel"
]
applyHorizontalClasses
=
ApplyCssClasses
[
"typedTaskEditor"
,
"itasks-horizontal"
,
"itasks-wrap-width"
,
"itasks-wrap-height"
,
"typedTaskEditorWithBorder"
]
applyHorizontalClassesNoBorder
=
ApplyCssClasses
[
"typedTaskEditor"
,
"itasks-horizontal"
,
"itasks-wrap-width"
,
"itasks-wrap-height"
]
applyVerticalClasses
=
ApplyCssClasses
[
"typedTaskEditor"
,
"itasks-vertical"
,
"itasks-wrap-width"
,
"itasks-wrap-height"
,
"typedTaskEditorWithBorder"
]
// Evaluation //////////////////////////////////////////////////////////////////
...
...
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