From: pimjager Date: Fri, 20 May 2016 11:18:56 +0000 (+0200) Subject: Stomme puntjes X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=9b58e55e2be665d4e2274ea5af8b734e556d35a0;p=cc1516.git Stomme puntjes --- diff --git a/AST.icl b/AST.icl index 305e8f3..24d2af1 100644 --- a/AST.icl +++ b/AST.icl @@ -113,7 +113,7 @@ instance toString Expr where toString e = concat $ print e printSelectors :: [FieldSelector] -> [String] -printSelectors x = case x of [] = [""]; _ = [".":printersperse "." x] +printSelectors fs = printersperse "." fs printFunCall :: String [Expr] [FieldSelector] -> [String] printFunCall s args fs = [s, "(":printersperse "," args] ++ [")"] ++ diff --git a/examples/codeGen.spl b/examples/codeGen.spl index 59e6b3c..4062fb6 100644 --- a/examples/codeGen.spl +++ b/examples/codeGen.spl @@ -18,13 +18,13 @@ // return x3 + x1; //} -//isE(x) :: [a] -> Bool { -// if (x == []) { -// return True; -// } else { -// return False; -// } -//} +isE(x) :: [a] -> Bool { + if (x == []) { + return True; + } else { + return False; + } +} main() { // [Int] x2 = 0 : x1;