diff options
author | Camil Staps | 2017-11-14 10:57:45 +0100 |
---|---|---|
committer | Camil Staps | 2017-11-14 10:59:11 +0100 |
commit | 3da4e59084be26b8a63e91d570622ff3430d66c0 (patch) | |
tree | 376d7d5db13d17773a8dabe1d8cd551353409556 /assignment-8/skeleton8.icl | |
parent | Finish assignment 7 (diff) |
Add skeleton 8
Diffstat (limited to 'assignment-8/skeleton8.icl')
-rw-r--r-- | assignment-8/skeleton8.icl | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/assignment-8/skeleton8.icl b/assignment-8/skeleton8.icl new file mode 100644 index 0000000..0c68ac9 --- /dev/null +++ b/assignment-8/skeleton8.icl @@ -0,0 +1,67 @@ +module skeleton8
+
+/**
+ * Advanved Progrmming 2017, Assignment 8
+ * Pieter Koopman, pieter@cs.ru.nl
+ */
+
+from iTasks import class iTask, class toPrompt, class Publishable, instance Publishable Task,
+ instance toPrompt String, instance Functor Task,
+ class TApplicative, instance TApplicative Task,
+ generic gEq, generic gDefault, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor,
+ :: JSONNode, :: TextFormat, :: Editor, :: TaskValue(..), :: Stability, :: Task, :: Action,
+ :: TaskCont(..), :: ViewOption(..), :: UpdateOption(..),
+ -||-, -||, ||-, >>*, always, hasValue, updateInformation, viewInformation, startEngine
+import qualified iTasks
+import qualified iTasks.WF.Combinators.Overloaded as WF
+import Data.Functor, Control.Applicative, Control.Monad
+import Data.Tuple, StdClass, StdList, StdMaybe, StdString
+import StdGeneric, StdBool
+from StdFunc import o
+import qualified Data.List as List
+import qualified Data.Map as Map
+
+:: Expression
+ = New [Int]
+ | Elem Int
+ | Variable Ident
+ | Size Set
+ | (+.) infixl 6 Expression Expression
+ | (-.) infixl 6 Expression Expression
+ | (*.) infixl 7 Expression Expression
+ | (=.) infixl 2 Ident Expression
+
+:: Logical
+ = TRUE | FALSE
+ | (In) infix 4 Elem Set
+ | (==.) infix 4 Expression Expression
+ | (<=.) infix 4 Expression Expression
+ | Not Logical
+ | (||.) infixr 2 Logical Logical
+ | (&&.) infixr 3 Logical Logical
+
+:: Stmt
+ = If Logical Stmt Stmt
+ | For Ident Set Stmt
+ | Expression Expression
+ | Logical Logical
+
+:: Set :== Expression
+:: Elem :== Expression
+:: Ident :== String
+
+// === State
+
+
+// === semantics
+
+
+// === simulation
+(>>>=) :== 'iTasks'.tbind
+(>>>|) a b :== 'iTasks'.tbind a (\_ -> b)
+treturn :== 'iTasks'.return
+ActionOk :== 'iTasks'.ActionOk
+ActionQuit :== 'iTasks'.ActionQuit
+ActionNew :== 'iTasks'.ActionNew
+
+Start = ()
|