X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=AST.icl;h=90d1e53870967dedafb737a435ddae8f3477d668;hb=13a108705dbabbc75711ce9b3b29fe508262919f;hp=43c46f7052cedda36a1467f773eb480d85d3c6a7;hpb=e34b5f088ff9a86da61afbbe91c2c88f895673c7;p=cc1516.git diff --git a/AST.icl b/AST.icl index 43c46f7..90d1e53 100644 --- a/AST.icl +++ b/AST.icl @@ -63,7 +63,7 @@ instance print Type where print BoolType = print "Bool" print CharType = print "Char" print VoidType = print "Void" - print (t1 ->> t2) = print t1 ++ [" -> ":print t2] + print (t1 ->> t2) = ["(":print t1 ++ [" -> ":print t2]] ++ [")"] instance print String where print s = [s] @@ -75,7 +75,7 @@ instance print FieldSelector where print FieldFst = print "fst" instance print VarDef where - print (VarDef i fs) = printersperse "." [i:flatten $ map print fs] + print (VarDef i fs) = printersperse "." [i:printersperse "" fs] instance toString Op2 where toString o = case o of