merge master
authorpimjager <pim@pimjager.nl>
Thu, 26 May 2016 14:50:44 +0000 (16:50 +0200)
committerpimjager <pim@pimjager.nl>
Thu, 26 May 2016 14:50:44 +0000 (16:50 +0200)
examples/tempTest.spl
examples/test.spl
gen.icl
sem.dcl
sem.icl
spl.icl
test.bak [new file with mode: 0644]

index 21545ae..e8be43b 100644 (file)
@@ -1,18 +1,28 @@
-Let Int a = 4;
+plus(x,y){
+    return x+y;
+}
 
-mapP1(xs) {
-    if(isEmpty(xs)) {
+map(f, xs) {
+    if (isEmpty(xs)) {
         return [];
     } else {
-        return (xs.hd + 1) : mapP1(xs.tl);
+        return f(xs.hd) : map(f, xs.tl);
+    }
+}
+
+foldr(f, acc, xs) {
+    if(isEmpty(xs)) {
+        return acc;
+    } else {
+        return foldr(f, f(xs.hd, acc), xs.tl);
     }
 }
+
 main() {
-    [Int] x = [];
-    [Int] y = [];
-    Int z = a();
-    var f = \x -> x+1;
-    x = mapP1(x);
-    y = mapP1(x);
-    return a() + 5;
+    var f = plus(1);
+    var z = map(f, 1:2:[]);
+    var x = foldr(plus, 0, 1:2:[]);
+    print(x);
+    return;
+>>>>>>> master
 }
\ No newline at end of file
index 2428d67..f2b86b8 100644 (file)
@@ -1,4 +1,30 @@
+map(f, l){
+       if(isEmpty(l)){
+               return [];
+       } else {
+               return f(l.hd) : map(f, l.tl);
+       }
+}
+
+plus(x, y){
+       return x + y;
+}
+
+foldr(f, acc, l){
+       if(isEmpty(l)){
+               return acc;
+       } else {
+               return foldr(f, f(acc, l.hd), l.tl);
+       }
+}
+
+times(x, y){
+       return x * y;
+}
+
 main(){
-       var b = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
-       return;
+       [Int] l1 = 1 : 2 : 3 : 4 : 5 : [];
+       foldr(times, 1, l1);
+       print("faculty of 5 is: ");
+       print(foldr(times, 1, l1));
 }
diff --git a/gen.icl b/gen.icl
index c85643e..ebc4754 100644 (file)
--- a/gen.icl
+++ b/gen.icl
@@ -174,137 +174,144 @@ instance g Expr where
                Just (ADDR t arity) = tell [Instr "ldl" [Lit t] ""] >>| mapM_ g fs >>| pure ()
                Just (LAB l _ fn) = tell 
                        [Instr "ldc" [Lit fn] ""
+                       ,Instr "sth" [] ""
                        ,Instr "ldc" [Lit 0] ""
-                       ,Instr "stmh" [Lit 2] ""]
-    g (LambdaExpr _ _ _) = liftT $ Left $ Error "PANIC: Lambdas should be Unfolded"
-    g (FunExpr _ k es fs) = getAdressbook >>= \ab->case 'Map'.get k ab of
-               //Identifier points to function
-               Just (LAB l arity fn) = if (arity <> (length es))
-                       //Function is not complete
-                       (       tell
-                                       [Instr "ldc" [Lit fn] "Store function number"
-                                       ,Instr "sth" [] ""
-                                       ,Instr "ldc" [Lit $ length es] "Store arity"
-                                       ,Instr "sth" [] ""
-                                       ,Instr "ajs" [Lit -1] ""]
-                               >>| mapM_ g es
-                               >>| if (isEmpty es) (pure ()) (tell 
-                                       [Instr "stmh" [Lit $ length es] "Store arguments"
-                                       ,Instr "ajs" [Lit -1] ""]))
-                       //Function is complete
-                       (       mapM_ g es
-                               >>| jump "bsr" k
-                       >>| tell 
-                                       [Instr "ajs" [Lit $ ~(length es)] "Clean arguments"
-                                       ,Instr "ldr" [Raw "RR"] ""])
-               //Identifier points to variable, thus higher order function
-               Just (ADDR t arity) = if (arity <> (length es))
-                       //Function is still  not complete
-                       ( fresh >>= \finish->fresh >>= \start->tell [
-                               //Store function number
-                                Instr "ldl" [Lit t] "STARTING HIGHER ORDER UPDATE"
-                               ,Instr "ldh" [Lit 0] "get function number"
-                               ,Instr "sth" [] "Store"
-                               //Store function arity
-                               ,Instr "ldl" [Lit t] "get pointer again"
-                               ,Instr "ldh" [Lit 1] "get function arity"
-                               ,Instr "ldc" [Lit $ length es] "add argument number"
-                               ,Instr "add" [] "add"
-                               ,Instr "sth" [] "Store"
-                               ,Instr "ajs" [Lit -1] "Adjust pointer"
-                               //load the arguments
-                               ,Instr "ldl" [Lit t] ""
-                               ,Instr "ldh" [Lit 1] "Load available arguments"
-                               ,Instr "str" [Raw "R5"] "Store available args in register"
-                               ,Instr "ldc" [Lit 0] "Store offset"
-                               ,Instr "str" [Raw "R6"] "Store offset in register"
-                               ,Lab start
-                               ,Instr "ldr" [Raw "R5"] ""
-                               ,Instr "ldc" [Lit 0] ""
-                               ,Instr "eq" [] ""
-                               ,Instr "brt" [L finish] "Done pushing arg, bye"
-                               //Load heapadress
-                               ,Instr "ldl" [Lit t] ""
-                               ,Instr "ldr" [Raw "R6"] ""
-                               ,Instr "add" [] "Corrected heapaddress"
-                               ,Instr "ldh" [Lit 2] "Load argument"
-                               ,Instr "sth" [] "And store it immediatly after"
-                               //Decrease available arguments
-                               ,Instr "ldr" [Raw "R5"] ""
-                               ,Instr "ldc" [Lit 1] ""
-                               ,Instr "sub" [] ""
-                               ,Instr "str" [Raw "R5"] ""
-                               //Increase available arguments
-                               ,Instr "ldr" [Raw "R6"] ""
-                               ,Instr "ldc" [Lit 1] ""
-                               ,Instr "add" [] ""
-                               ,Instr "str" [Raw "R6"] ""
-                               ,Instr "bra" [L start] ""
-                               ,Lab finish
-                               ]
-                         >>| mapM_ g es
-                         >>| tell 
-                                       [Instr "stmh" [Lit $ length es] "Store extra args"
-                                       ,Instr "ajs" [Lit -1] ""]
-                       )
-                       //Function is complete
-                       ( fresh >>= \finish->fresh >>= \start->tell [
-                                Instr "ldl" [Lit t] "STARTING HIGHER ORDER CALL"
-                               ,Instr "ldh" [Lit 1] "Load available arguments"
-                               ,Instr "str" [Raw "R5"] "Store available args in register"
-                               ,Instr "ldc" [Lit 0] "Store offset"
-                               ,Instr "str" [Raw "R6"] "Store offset in register"
-                       
-                               ,Lab start
-                               ,Instr "ldr" [Raw "R5"] ""
-                               ,Instr "ldc" [Lit 0] ""
-                               ,Instr "eq" [] ""
-                               ,Instr "brt" [L finish] "Done pushing arg, bye"
-                               //Load heapadress
-                               ,Instr "ldl" [Lit t] ""
-                               ,Instr "ldr" [Raw "R6"] ""
-                               ,Instr "add" [] "Corrected heapaddress"
-                               ,Instr "ldh" [Lit 2] "Load argument"
-                               //Decrease available arguments
-                               ,Instr "ldr" [Raw "R5"] ""
-                               ,Instr "ldc" [Lit 1] ""
-                               ,Instr "sub" [] ""
-                               ,Instr "str" [Raw "R5"] ""
-                               //Increase available arguments
-                               ,Instr "ldr" [Raw "R6"] ""
-                               ,Instr "ldc" [Lit 1] ""
-                               ,Instr "add" [] ""
-                               ,Instr "str" [Raw "R6"] ""
-                               ,Instr "bra" [L start] ""
-                               ,Lab finish
-                               ]
-                         >>| mapM_ g es
-                         >>| tell
-                               [Instr "ldl" [Lit t] ""
-                               ,Instr "ldh" [Lit 0] "Get function number"
-                               ,Instr "str" [Raw "R5"] ""
-                               ,Instr "bsr" [L "1func"] ""
-                               ,Instr "ldr" [Raw "MP"] ""
-                               ,Instr "ldc" [Lit t] ""
-                               ,Instr "add" [] ""
-                               ,Instr "str" [Raw "SP"] ""
-                               ,Instr "ldr" [Raw "RR"] ""
-                               ]
-                       )
-               Nothing = liftT (Left $ Error "Undefined function!!!")
+                       ,Instr "sth" [] ""
+                       ,Instr "ajs" [Lit -1] ""]
+    g (LambdaExpr _ _ _) = liftT $ Left $ Error "PANIC: Lambdas should be unfolded"
+    g (FunExpr _ k es fs) = funnyStuff k es fs
 
-jump :: String String -> Gen ()
-jump instr k = getAdressbook >>= \ab->case 'Map'.get k ab of
-       Nothing = liftT (Left $ Error $ concat ["PANIC: ", k, " not found as function"])
-       Just (LAB t _ _) = tell [Instr instr [L t] (k +++"()")]
-       Just (ADDR t arity) = abort "NO ADDRESS JUMPING FFS"
+funnyStuff :: String [Expr] [FieldSelector] -> Gen ()
+funnyStuff k es fs = getAdressbook >>= \ab->case 'Map'.get k ab of
+       //Identifier points to function
+       Just (LAB l arity fn) = if (arity <> (length es))
+               //Function is not complete
+               (       tell
+                               [Instr "ldc" [Lit fn] "Store function number"
+                               ,Instr "sth" [] ""
+                               ,Instr "ldc" [Lit $ length es] "Store arity"
+                               ,Instr "sth" [] ""
+                               ,Instr "ajs" [Lit -1] ""]
+                       >>| mapM_ g es
+                       >>| if (isEmpty es) (pure ()) (tell 
+                               [Instr "stmh" [Lit $ length es] "Store arguments"
+                               ,Instr "ajs" [Lit -1] ""]))
+               //Function is complete
+               (       mapM_ g es
+                       >>| getAdressbook >>= \ab->(case 'Map'.get k ab of
+                               Nothing = liftT (Left $ Error $ concat ["PANIC: ", k, " not found as function"])
+                               Just (LAB t _ _) = tell [Instr "bsr" [L t] (k +++"()")]
+                               Just (ADDR t arity) = liftT (Left $ Error "NO ADDRESS JUMPING FFS")
+                       )
+               >>| tell 
+                               [Instr "ajs" [Lit $ ~(length es)] "Clean arguments"
+                               ,Instr "ldr" [Raw "RR"] ""])
+       //Identifier points to variable, thus higher order function
+       Just (ADDR t arity) = if (arity <> (length es))
+               //Function is still  not complete
+               ( fresh >>= \finish->fresh >>= \start->tell [
+                       //Store function number
+                        Instr "ldl" [Lit t] "STARTING HIGHER ORDER UPDATE"
+                       ,Instr "ldh" [Lit 0] "get function number"
+                       ,Instr "sth" [] "Store"
+                       //Store function arity
+                       ,Instr "ldl" [Lit t] "get pointer again"
+                       ,Instr "ldh" [Lit 1] "get function arity"
+                       ,Instr "ldc" [Lit $ length es] "add argument number"
+                       ,Instr "add" [] "add"
+                       ,Instr "sth" [] "Store"
+                       ,Instr "ajs" [Lit -1] "Adjust pointer"
+                       //load the arguments
+                       ,Instr "ldl" [Lit t] ""
+                       ,Instr "ldh" [Lit 1] "Load available arguments"
+                       ,Instr "str" [Raw "R5"] "Store available args in register"
+                       ,Instr "ldc" [Lit 0] "Store offset"
+                       ,Instr "str" [Raw "R6"] "Store offset in register"
+                       ,Lab start
+                       ,Instr "ldr" [Raw "R5"] ""
+                       ,Instr "ldc" [Lit 0] ""
+                       ,Instr "eq" [] ""
+                       ,Instr "brt" [L finish] "Done pushing arg, bye"
+                       //Load heapadress
+                       ,Instr "ldl" [Lit t] ""
+                       ,Instr "ldr" [Raw "R6"] ""
+                       ,Instr "add" [] "Corrected heapaddress"
+                       ,Instr "ldh" [Lit 2] "Load argument"
+                       ,Instr "sth" [] "And store it immediatly after"
+                       //Decrease available arguments
+                       ,Instr "ldr" [Raw "R5"] ""
+                       ,Instr "ldc" [Lit 1] ""
+                       ,Instr "sub" [] ""
+                       ,Instr "str" [Raw "R5"] ""
+                       //Increase available arguments
+                       ,Instr "ldr" [Raw "R6"] ""
+                       ,Instr "ldc" [Lit 1] ""
+                       ,Instr "add" [] ""
+                       ,Instr "str" [Raw "R6"] ""
+                       ,Instr "bra" [L start] ""
+                       ,Lab finish
+                       ]
+                 >>| mapM_ g es
+                 >>| tell 
+                               [Instr "stmh" [Lit $ length es] "Store extra args"
+                               ,Instr "ajs" [Lit -1] ""]
+               )
+               //Function is complete
+               ( fresh >>= \finish->fresh >>= \start->tell [
+                        Instr "ldl" [Lit t] "STARTING HIGHER ORDER CALL"
+                       ,Instr "ldh" [Lit 1] "Load available arguments"
+                       ,Instr "str" [Raw "R5"] "Store available args in register"
+                       ,Instr "ldc" [Lit 0] "Store offset"
+                       ,Instr "str" [Raw "R6"] "Store offset in register"
+               
+                       ,Lab start
+                       ,Instr "ldr" [Raw "R5"] ""
+                       ,Instr "ldc" [Lit 0] ""
+                       ,Instr "eq" [] ""
+                       ,Instr "brt" [L finish] "Done pushing arg, bye"
+                       //Load heapadress
+                       ,Instr "ldl" [Lit t] ""
+                       ,Instr "ldr" [Raw "R6"] ""
+                       ,Instr "add" [] "Corrected heapaddress"
+                       ,Instr "ldh" [Lit 2] "Load argument"
+                       //Decrease available arguments
+                       ,Instr "ldr" [Raw "R5"] ""
+                       ,Instr "ldc" [Lit 1] ""
+                       ,Instr "sub" [] ""
+                       ,Instr "str" [Raw "R5"] ""
+                       //Increase available arguments
+                       ,Instr "ldr" [Raw "R6"] ""
+                       ,Instr "ldc" [Lit 1] ""
+                       ,Instr "add" [] ""
+                       ,Instr "str" [Raw "R6"] ""
+                       ,Instr "bra" [L start] ""
+                       ,Lab finish
+                       ]
+                 >>| mapM_ g es
+                 >>| tell
+                       [Instr "ldl" [Lit t] ""
+                       ,Instr "ldh" [Lit 0] "Get function number"
+                       ,Instr "str" [Raw "R5"] ""
+                       ,Instr "bsr" [L "1func"] "HIGHER ORDER END"
+                       ,Instr "ldl" [Lit t] ""
+                       ,Instr "ldh" [Lit 1] ""
+                       ,Instr "neg" [] ""
+                       ,Instr "ldr" [Raw "SP"] ""
+                       ,Instr "add" [] ""
+                       ,Instr "ldc" [Lit $ length es + 1] ""
+                       ,Instr "sub" [] ""
+                       ,Instr "str" [Raw "SP"] ""
+                       ,Instr "ldr" [Raw "RR"] ""
+                       ]
+               )
+       Nothing = liftT (Left $ Error "Undefined function!!!")
 
 instance g Stmt where
     g (IfStmt cond th el) = 
         fresh >>= \elseLabel->
         fresh >>= \endLabel->
         g cond >>|
-        tell [Instr "brf" [L elseLabel] "branch else"] >>|
+       tell [Instr "brf" [L elseLabel] "branch else"] >>|
         mapM_ g th >>|
         tell [Instr "bra" [L endLabel] "branch end if"] >>|
         tell [Lab elseLabel] >>|
@@ -324,11 +331,7 @@ instance g Stmt where
             Nothing = liftT (Left $ Error $ concat ["PANIC: ", k, " not found as var"])
             Just (LAB t _ _) = liftT (Left $ Error $ "PANIC: cannot assign to function")
             Just (ADDR t ar) = tell [Instr "stl" [Lit t] ""]
-    g (FunStmt k es fs) = mapM_ g es 
-        >>| jump "bsr" k
-        >>| tell [Instr "ajs" [Lit (~(length es))] ""] //clean up args
-        >>| mapM_ g fs
-               >>| pure ()
+    g (FunStmt k es fs) = funnyStuff k es fs
     g (ReturnStmt Nothing) = tell [Instr "unlink" [] ""]
                >>| tell [Instr "ret" [] ""]
     g (ReturnStmt (Just e)) = g e
@@ -369,7 +372,7 @@ instance g FunDecl where
 
 annote :: Int String -> Gen ()
 annote pos key = 
-    tell [Instr "annote" [Raw "MP", Lit pos, Lit pos, Raw "green", Raw key] ""]
+    tell [Instr "annote" [Raw "MP", Lit pos, Lit pos, Raw "black", Raw key] ""]
 
 class print a :: a -> [String]
 
diff --git a/sem.dcl b/sem.dcl
index 2b13436..a570597 100644 (file)
--- a/sem.dcl
+++ b/sem.dcl
@@ -13,4 +13,4 @@ from StdOverloaded import class toString
 instance toString SemError
 instance toString Gamma
 
-sem :: AST -> Either [SemError] AST
+sem :: AST -> Either [SemError] (AST, Gamma)
diff --git a/sem.icl b/sem.icl
index 9d9b5fe..364eac4 100644 (file)
--- a/sem.icl
+++ b/sem.icl
@@ -5,6 +5,7 @@ import qualified Data.Map as Map
 from Data.Func import $
 from StdFunc import o, flip, const, id
 
+import Control.Applicative
 import Control.Monad
 import Control.Monad.Trans
 import Control.Monad.State
@@ -57,13 +58,13 @@ defaultGamma = extend "print" (Forall ["a"] ((IdType "a") ->> VoidType))
                 $ extend "1printbool" (Forall [] (BoolType ->> VoidType))
                 zero
 
-sem :: AST -> Either [SemError] AST
+sem :: AST -> Either [SemError] (AST, Gamma)
 sem (AST fd) = case foldM (const $ hasNoDups fd) () fd 
                        >>| foldM (const isNiceMain) () fd
                        >>| hasMain fd
-                    >>| evalStateT (type fd) (defaultGamma, variableStream) of
+                    >>| runStateT (type fd) (defaultGamma, variableStream) of
        Left e = Left [e]
-    Right (_,fds) = Right (AST fds)
+    Right ((_,fds),(gam,_)) = Right (AST fds, gam)
 where
                hasNoDups :: [FunDecl] FunDecl -> Either SemError ()
                hasNoDups fds (FunDecl p n _ _ _ _)
@@ -90,16 +91,18 @@ where
 
 unfoldLambda :: [FunDecl] -> Typing [FunDecl]
 unfoldLambda [fd:fds] = unf_ fd >>= \fds1-> 
-                        unfoldLambda fds2 >>= \fds2->
+                        unfoldLambda fds >>= \fds2->
                         pure $ fds1 ++ fds2
 where
+    unf_ :: FunDecl -> Typing [FunDecl]
     unf_ fd=:(FunDecl _ _ _ _ vds stmts) = 
-        mapM_ unfv_ vds >>= \fds1->
-        mapM_ unfs_ stmts >>= \fds2->
-        pure [fd:fds] ++ fds2
-    unfv_ :: Typing [FunDecl]
-    unfv_ (VarDecl _ _ _ e) = abort ""
-    unfs_ _ = abort ""
+        flatten <$> mapM unfv_ vds >>= \fds1->
+        flatten <$> mapM unfs_ stmts >>= \fds2->
+        pure $ [fd:fds1] ++ fds2
+    unfv_ :: VarDecl -> Typing [FunDecl]
+    unfv_ (VarDecl _ _ _ e) = pure []
+    unfs_ :: Stmt -> Typing [FunDecl]
+    unfs_ _ = pure []
 
 class Typeable a where
     ftv :: a -> [TVar]
diff --git a/spl.icl b/spl.icl
index bdfccc8..4305f8d 100644 (file)
--- a/spl.icl
+++ b/spl.icl
@@ -88,9 +88,10 @@ Start w
                                stdin <<<  "//PARSER\n" <<< toString parseOut <<< "//PARSER\n")
                        = case sem (preamble parseOut) of
                                (Left e) = snd $ fclose (stdin <<< join "\n" (map toString e) <<< "\n") w
-                               (Right ast)
+                               (Right (ast, gam))
                                # stdin = if (not args.sem) stdin (stdin
-                                       <<< "//SEM G\n" <<< toString ast <<< "//SEMA\n")
+                                       <<< "//SEM AST\n" <<< toString ast <<< "//SEM AST\n"
+                    <<< "//SEM GAMMA\n" <<< toString gam <<< "//SEM GAMMA\n")
                                = case gen ast of
                                        (Left e) = snd $ fclose (stdin <<< e) w
                                        (Right asm)
diff --git a/test.bak b/test.bak
new file mode 100644 (file)
index 0000000..5b35be9
--- /dev/null
+++ b/test.bak
@@ -0,0 +1,134 @@
+digitToChar(x){
+       x = x % 10;
+       if(x == 0){ return '0'; }
+       else { if(x == 1){ return '1'; }
+       else { if(x == 2){ return '2'; }
+       else { if(x == 3){ return '3'; }
+       else { if(x == 4){ return '4'; }
+       else { if(x == 5){ return '5'; }
+       else { if(x == 6){ return '6'; }
+       else { if(x == 7){ return '7'; }
+       else { if(x == 8){ return '8'; }
+       else { return '9'; }}}}}}}}}
+}
+
+printInt (i){
+       if(i > 0){
+               print(digitToChar(i));
+               printInt(i/10);
+       }
+}
+
+printIntList (l){
+       print('[');
+       if(!isEmpty(l)){
+               printInt(l.hd);
+               l = l.tl;
+       }
+       while(!isEmpty(l)){
+               print(',');
+               printInt(l.hd);
+               l = l.tl;
+       }
+       print(']');
+}
+
+printIntListRP(l){
+       if(!isEmpty(l)){
+               print(',');
+               printInt(l.hd);
+               printIntListRP(l.tl);
+       }
+}
+
+printIntListR(l){
+       print('[');
+       if(!isEmpty(l)){
+               printInt(l.hd);
+               l = l.tl;
+       }
+       printIntListRP(l);
+       print(']');
+}
+
+map(f, l){
+       if(isEmpty(l)){
+               return [];
+       } else {
+               return f(l.hd) : map(f, l.tl);
+       }
+}
+
+plus(x, y){
+       return x + y;
+}
+
+main(){
+       //Int
+       Int i1 = 0;
+       Int i2 = 125123;
+       Int i3 = -1;
+
+       //Int expressions
+       Int i4 = i1 + i2 - i3 * i3 / i3;
+
+       //Char
+       Char c1 = ' ';
+       Char c2 = 'a';
+       Char c3 = '\'';
+
+       //Lijsten
+       [Int] l1 = 1 : 2 : 3 : 4 : [];
+       [Int] l2 = 5 : l1;
+
+       printIntList(map(plus(1), l2));
+//     print(i1);
+//     print("should give: 0\n");
+//     print(i2);
+//     print("should give: 125123\n");
+//     print(i3);
+//     print("should give: -1\n");
+//     print(i4);
+//     print("should give: 125124\n");
+//
+//     print(c2);
+//     print(" should be a\n");
+//     print(c1);
+//     print(" should be literal space\n");
+//     print(c3);
+//     print(" should be '\n");
+//     printIntList(l1);
+//     print("\n");
+//     printIntListR(l2);
+
+//     printIntList(add1List(l2));
+}
+       
+//     
+//     
+//     //Bool
+//     Bool b1 = True;
+//     Bool b2 = False;
+//
+//     //Simple lists
+//     [Int] sl1 = [];
+//     [Int] sl2 = 1 : sl1;
+//     [Int] sl3 = 1 : sl2;
+//
+//     //Strings
+//     [Char] s1 = "hallo";
+//     [Char] s2 = "ha\tllo";
+//     [Char] s3 = "";
+//     
+//     //Tuples
+//     (Int, Int) t1 = (42, 0);
+//     (Int, Char) t2 = (42, ' ');
+//     (Bool, Char) t3 = (True, ' ');
+//     ([Char], Char) t4 = ("hi", ' ');
+//     ([Char], (Int, Int)) t5 = ("hi", (42, 0));
+//     
+//     //Lists
+//     [[Char]] l1 = ("hallo") : ("ik") : ("ben") : ("pim") : [];
+//     [Int] l2 = 1 : 2 : 3 : 4 : 5 : [];
+//     [(Int, Int)] l3 = (1, 2) : (2, 3) : (3, 4) : [];
+//}