add comments to the source
[ri1617.git] / architecture / mtasks.tex
index be43d3c..34a1615 100644 (file)
@@ -14,8 +14,8 @@ managing tasks.
 
 \subsection{Classes}
 To make the DSL easily extendable with functionality without losing
-extendability of views it as a set of classes that can be implemented by any
-data type. 
+extendability of views it is defined as a set of classes that can be
+implemented by any data type. 
 
 Arithmetic operations and boolean operators are defined respectively in the
 \CI{arith} and \CI{boolExpr} class. Note that the functions defined by the
@@ -47,6 +47,12 @@ In the future a state will probably need to be added to the \CI{Bytecode}
 type to keep track of some information during bytecode compilation.
 
 \begin{lstlisting}[language=Clean,label={lst:bytecode}]
-       :: ByteCode a p = BC [BC]
-       class toByteCode a :: a -> [Char]
+:: BC
+       = BCNop
+       | BCPush Int
+       | BCPop
+       ...
+
+:: ByteCode a p = BC [BC]
+class toByteCode a :: a -> [Char]
 \end{lstlisting}