Commit eb362145 authored by Bas Lijnse's avatar Bas Lijnse

Added separate main modules for all basic api examples

parent 912060f5
Pipeline #13987 passed with stage
in 11 minutes and 52 seconds
definition module BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.EnterDateAndTime
import iTasks
from iTasks.Extensions.Admin.WorkflowAdmin import :: Workflow
wf :: String -> Workflow
main :: Task ()
......@@ -8,9 +8,8 @@ import iTasks.Extensions.DateTime
wf :: String -> Workflow
wf a = workflow a "Enter a date and a time" enterDateTime
Start :: *World -> *World
Start world
= doTasks enterDateTime world
main :: Task ()
main = enterDateTime @! ()
enterDateTime :: Task [(Date, Time)]
enterDateTime
......
......@@ -45,7 +45,7 @@ Global
Precompile:
Postlink:
MainModule
Name: BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.EnterDateAndTime
Name: BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.EnterDateAndTimeMain
Dir: {Project}
Compiler
NeverMemoryProfile: False
......
module BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.EnterDateAndTimeMain
import BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.EnterDateAndTime
Start :: *World -> *World
Start world = doTasks main world
definition module BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.EnterInteger
import iTasks
from iTasks.Extensions.Admin.WorkflowAdmin import :: Workflow
wf :: String -> Workflow
main :: Task ()
......@@ -7,9 +7,8 @@ import iTasks
wf :: String -> Workflow
wf a = workflow a "Enter an Integer" enterInt
Start :: *World -> *World
Start world
= doTasks enterInt world
main :: Task ()
main = enterInt @! ()
enterInt :: Task Int
enterInt
......
......@@ -45,7 +45,7 @@ Global
Precompile:
Postlink:
MainModule
Name: BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.EnterInteger
Name: BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.EnterIntegerMain
Dir: {Project}
Compiler
NeverMemoryProfile: False
......
module BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.EnterIntegerMain
import BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.EnterInteger
Start :: *World -> *World
Start world = doTasks main world
definition module BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.EnterListOfInt
import iTasks
from iTasks.Extensions.Admin.WorkflowAdmin import :: Workflow
wf :: String -> Workflow
main :: Task ()
......@@ -7,9 +7,8 @@ import iTasks
wf :: String -> Workflow
wf a = workflow a "Enter a list of Integer numbers" enterListOfInt
Start :: *World -> *World
Start world
= doTasks enterListOfInt world
main :: Task ()
main = enterListOfInt @! ()
enterListOfInt :: Task [Int]
enterListOfInt
......
......@@ -45,7 +45,7 @@ Global
Precompile:
Postlink:
MainModule
Name: BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.EnterListOfInt
Name: BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.EnterListOfIntMain
Dir: {Project}
Compiler
NeverMemoryProfile: False
......
module BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.EnterListOfIntMain
import BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.EnterListOfInt
Start :: *World -> *World
Start world = doTasks main world
definition module BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.EnterText
import iTasks
from iTasks.Extensions.Admin.WorkflowAdmin import :: Workflow
wf :: String -> Workflow
main :: Task ()
......@@ -7,9 +7,8 @@ import iTasks
wf :: String -> Workflow
wf a = workflow a "Enter text" enterText
Start :: *World -> *World
Start world
= doTasks enterText world
main :: Task ()
main = enterText @! ()
enterText :: Task String
enterText
......
......@@ -45,7 +45,7 @@ Global
Precompile:
Postlink:
MainModule
Name: BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.EnterText
Name: BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.EnterTextMain
Dir: {Project}
Compiler
NeverMemoryProfile: False
......
module BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.EnterTextMain
import BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.EnterText
Start :: *World -> *World
Start world = doTasks main world
definition module BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.HelloWorld
import iTasks
from iTasks.Extensions.Admin.WorkflowAdmin import :: Workflow
wf :: String -> Workflow
main :: Task ()
......@@ -7,9 +7,8 @@ import iTasks
wf :: String -> Workflow
wf a = workflow a "Hello, World!" helloWorld
Start :: *World -> *World
Start world
= doTasks helloWorld world
main :: Task ()
main = helloWorld @! ()
helloWorld :: Task String
helloWorld
......
......@@ -45,7 +45,7 @@ Global
Precompile:
Postlink:
MainModule
Name: BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.HelloWorld
Name: BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.HelloWorldMain
Dir: {Project}
Compiler
NeverMemoryProfile: False
......
module BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.HelloWorldMain
import BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.HelloWorld
Start :: *World -> *World
Start world = doTasks main world
definition module BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.Leaflet
import iTasks
from iTasks.Extensions.Admin.WorkflowAdmin import :: Workflow
wf :: String -> Workflow
main :: Task ()
......@@ -8,9 +8,8 @@ import iTasks.Extensions.GIS.Leaflet
wf :: String -> Workflow
wf a = workflow a "Enter a Leaflet map" leafletMap
Start :: *World -> *World
Start world
= doTasks leafletMap world
main :: Task ()
main = leafletMap @! ()
leafletMap :: Task LeafletMap
leafletMap
......
......@@ -45,7 +45,7 @@ Global
Precompile:
Postlink:
MainModule
Name: BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.Leaflet
Name: BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.LeafletMain
Dir: {Project}
Compiler
NeverMemoryProfile: False
......
module BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.LeafletMain
import BasicAPIExamples.EditorsOnBasicAndPredefinedTypes.Leaflet
Start :: *World -> *World
Start world = doTasks main world
definition module BasicAPIExamples.EditorsOnCustomTypes.EnterFamilyTree
import iTasks
from iTasks.Extensions.Admin.WorkflowAdmin import :: Workflow
wf :: String -> Workflow
main :: Task ()
......@@ -8,6 +8,9 @@ import iTasks.Extensions.DateTime
wf :: String -> Workflow
wf a = workflow a "Enter a family tree" enterFamily
main :: Task ()
main = enterFamily @! ()
:: Family = { person :: Person
, married :: Maybe Person
, children :: [Family]
......@@ -22,10 +25,6 @@ wf a = workflow a "Enter a family tree" enterFamily
derive class iTask Family, Person, Gender
Start :: *World -> *World
Start world
= doTasks enterFamily world
enterFamily :: Task Family
enterFamily
= enterInformation "Enter a family tree:" []
......
......@@ -45,7 +45,7 @@ Global
Precompile:
Postlink:
MainModule
Name: BasicAPIExamples.EditorsOnCustomTypes.EnterFamilyTree
Name: BasicAPIExamples.EditorsOnCustomTypes.EnterFamilyTreeMain
Dir: {Project}
Compiler
NeverMemoryProfile: False
......
module BasicAPIExamples.EditorsOnCustomTypes.EnterFamilyTreeMain
import BasicAPIExamples.EditorsOnCustomTypes.EnterFamilyTree
Start :: *World -> *World
Start world = doTasks main world
definition module BasicAPIExamples.EditorsOnCustomTypes.EnterPerson
import iTasks
from iTasks.Extensions.Admin.WorkflowAdmin import :: Workflow
wf :: String -> Workflow
main :: Task ()
......@@ -8,6 +8,9 @@ import iTasks.Extensions.DateTime
wf :: String -> Workflow
wf a = workflow a "Enter a person" enterPerson
main :: Task ()
main = enterPerson @! ()
:: Person = { name :: String
, gender :: Gender
, dateOfBirth :: Date
......@@ -17,10 +20,6 @@ wf a = workflow a "Enter a person" enterPerson
derive class iTask Person, Gender
Start :: *World -> *World
Start world
= doTasks enterPerson world
enterPerson :: Task Person
enterPerson
= enterInformation "Enter a person:" []
......
......@@ -45,7 +45,7 @@ Global
Precompile:
Postlink:
MainModule
Name: BasicAPIExamples.EditorsOnCustomTypes.EnterPerson
Name: BasicAPIExamples.EditorsOnCustomTypes.EnterPersonMain
Dir: {Project}
Compiler
NeverMemoryProfile: False
......
module BasicAPIExamples.EditorsOnCustomTypes.EnterPersonMain
import BasicAPIExamples.EditorsOnCustomTypes.EnterPerson
Start :: *World -> *World
Start world = doTasks main world
definition module BasicAPIExamples.InteractionUsingShares.BrowseAndViewLeafletMap
import iTasks
from iTasks.Extensions.Admin.WorkflowAdmin import :: Workflow
wf :: String -> Workflow
main :: Task ()
......@@ -8,9 +8,8 @@ import iTasks.Extensions.GIS.Leaflet
wf :: String -> Workflow
wf a = workflow a "Browse a shared LeafletMap" browseAndViewLeafletMap
Start :: *World -> *World
Start world
= doTasks browseAndViewLeafletMap world
main :: Task ()
main = browseAndViewLeafletMap @! ()
browseAndViewLeafletMap :: Task LeafletMap
browseAndViewLeafletMap
......
......@@ -45,7 +45,7 @@ Global
Precompile:
Postlink:
MainModule
Name: BasicAPIExamples.InteractionUsingShares.BrowseAndViewLeafletMap
Name: BasicAPIExamples.InteractionUsingShares.BrowseAndViewLeafletMapMain
Dir: {Project}
Compiler
NeverMemoryProfile: False
......
module BasicAPIExamples.InteractionUsingShares.BrowseAndViewLeafletMapMain
import BasicAPIExamples.InteractionUsingShares.BrowseAndViewLeafletMap
Start :: *World -> *World
Start world = doTasks main world
definition module BasicAPIExamples.InteractionUsingShares.CurrentDateAndTime
import iTasks
from iTasks.Extensions.Admin.WorkflowAdmin import :: Workflow
wf :: String -> Workflow
main :: Task ()
......@@ -10,9 +10,8 @@ import iTasks.Extensions.Clock
wf :: String -> Workflow
wf a = workflow a "View the current Date and Time" showDateAndTime
Start :: *World -> *World
Start world
= doTasks showDateAndTime world
main :: Task ()
main = showDateAndTime @! ()
showDateAndTime :: Task Time
showDateAndTime
......
......@@ -45,7 +45,7 @@ Global
Precompile:
Postlink:
MainModule
Name: BasicAPIExamples.InteractionUsingShares.CurrentDateAndTime
Name: BasicAPIExamples.InteractionUsingShares.CurrentDateAndTimeMain
Dir: {Project}
Compiler
NeverMemoryProfile: False
......
module BasicAPIExamples.InteractionUsingShares.CurrentDateAndTimeMain
import BasicAPIExamples.InteractionUsingShares.CurrentDateAndTime
Start :: *World -> *World
Start world = doTasks main world
definition module BasicAPIExamples.InteractionUsingShares.SharedNoteAsList
import iTasks
from iTasks.Extensions.Admin.WorkflowAdmin import :: Workflow
wf :: String -> Workflow
main :: Task ()
......@@ -8,10 +8,8 @@ import Text
wf :: String -> Workflow
wf a = workflow a "Edit a shared note as a list" sharedNoteAsList
Start :: *World -> *World
Start world
= doTasks sharedNoteAsList world
main :: Task ()
main = sharedNoteAsList @! ()
sharedNoteAsList :: Task String
sharedNoteAsList
......
......@@ -45,7 +45,7 @@ Global
Precompile:
Postlink:
MainModule
Name: BasicAPIExamples.InteractionUsingShares.SharedNoteAsList
Name: BasicAPIExamples.InteractionUsingShares.SharedNoteAsListMain
Dir: {Project}
Compiler
NeverMemoryProfile: False
......
module BasicAPIExamples.InteractionUsingShares.SharedNoteAsListMain
import BasicAPIExamples.InteractionUsingShares.SharedNoteAsList
Start :: *World -> *World
Start world = doTasks main world
definition module BasicAPIExamples.InteractionUsingShares.SharedNotes
import iTasks
from iTasks.Extensions.Admin.WorkflowAdmin import :: Workflow
wf :: String -> Workflow
main :: Task ()
......@@ -7,9 +7,8 @@ import iTasks
wf :: String -> Workflow
wf a = workflow a "Edit a shared note" sharedNotes
Start :: *World -> *World
Start world
= doTasks sharedNotes world
main :: Task ()
main = sharedNotes @! ()
// Update and view shared notifications
......
......@@ -45,7 +45,7 @@ Global
Precompile:
Postlink:
MainModule
Name: BasicAPIExamples.InteractionUsingShares.SharedNotes
Name: BasicAPIExamples.InteractionUsingShares.SharedNotesMain
Dir: {Project}
Compiler
NeverMemoryProfile: False
......
module BasicAPIExamples.InteractionUsingShares.SharedNotesMain
import BasicAPIExamples.InteractionUsingShares.SharedNotes
Start :: *World -> *World
Start world = doTasks main world
definition module BasicAPIExamples.InteractionUsingShares.UpdateSharedPersonsAndView
import iTasks
from iTasks.Extensions.Admin.WorkflowAdmin import :: Workflow
wf :: String -> Workflow
main :: Task ()
......@@ -7,9 +7,8 @@ import iTasks
wf :: String -> Workflow
wf a = workflow a "Edit a shared list of persons" enterSharedPersons
Start :: *World -> *World
Start world
= doTasks enterSharedPersons world
main :: Task ()
main = enterSharedPersons @! ()
:: Person =
{ name :: String
......
......@@ -45,7 +45,7 @@ Global
Precompile:
Postlink:
MainModule
Name: BasicAPIExamples.InteractionUsingShares.UpdateSharedPersonsAndView
Name: BasicAPIExamples.InteractionUsingShares.UpdateSharedPersonsAndViewMain
Dir: {Project}
Compiler
NeverMemoryProfile: False
......
module BasicAPIExamples.InteractionUsingShares.UpdateSharedPersonsAndViewMain
import BasicAPIExamples.InteractionUsingShares.UpdateSharedPersonsAndView
Start :: *World -> *World
Start world = doTasks main world
definition module BasicAPIExamples.InteractionWithTheSystem.RunProcess
import iTasks
from iTasks.Extensions.Admin.WorkflowAdmin import :: Workflow
wf :: String -> Workflow
main :: Task ()
......@@ -7,8 +7,8 @@ import Text.Terminal.VT100
wf :: String -> Workflow
wf a = workflow a "Run a process, e.g. /bin/bash" runProcess
Start :: *World -> *World
Start w = doTasks runProcess w
main :: Task ()
main = runProcess @! ()
runProcess :: Task Int
runProcess = enterInformation "Command" [] -&&- enterInformation "Arguments" []
......
......@@ -45,7 +45,7 @@ Global
Precompile:
Postlink:
MainModule
Name: BasicAPIExamples.InteractionWithTheSystem.RunProcess
Name: BasicAPIExamples.InteractionWithTheSystem.RunProcessMain
Dir: {Project}
Compiler
NeverMemoryProfile: False
......
module BasicAPIExamples.InteractionWithTheSystem.RunProcessMain
import BasicAPIExamples.InteractionWithTheSystem.RunProcess
Start :: *World -> *World
Start w = doTasks main w
definition module BasicAPIExamples.MultiUserExamples.Chat
import iTasks
from iTasks.Extensions.Admin.WorkflowAdmin import :: Workflow
wf :: String -> Workflow
main :: Task ()
......@@ -8,9 +8,8 @@ import iTasks.Extensions.Admin.WorkflowAdmin
wf :: String -> Workflow
wf a = workflow a "Chat with other users" myExample
Start :: *World -> *World
Start world
= doTasks multiUserExample world
main :: Task ()
main = myExample @! ()
multiUserExample
= set (map mkUserAccount players) userAccounts
......