aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjohnvg2012-05-01 10:14:09 +0000
committerjohnvg2012-05-01 10:14:09 +0000
commit972f5cf3c7d370ce774a4b5e51e16e74790fd247 (patch)
tree0ca914a8fb39645b3dffe3aef7af1f443cfc6e82
parentfix aliases in sub patterns of # or let, for example: (diff)
don't print unnecessary brackets inside tuple and list types
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2061 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
-rw-r--r--frontend/typesupport.icl12
1 files changed, 9 insertions, 3 deletions
diff --git a/frontend/typesupport.icl b/frontend/typesupport.icl
index 08a9686..ddd39dd 100644
--- a/frontend/typesupport.icl
+++ b/frontend/typesupport.icl
@@ -1064,7 +1064,13 @@ where
# (file, opt_beautifulizer)
= show_marked_attribute file opt_beautifulizer (form, TA_Multi)
= writeType file opt_beautifulizer (form, type)
- = writeType file opt_beautifulizer (form, type)
+ = writeType file opt_beautifulizer (form, type)
+ show_attributed_type file opt_beautifulizer form TA_None type
+ | checkProperty form cMarkAttribute
+ # (file, opt_beautifulizer)
+ = show_marked_attribute file opt_beautifulizer (form, TA_None)
+ = writeType file opt_beautifulizer (form, type)
+ = writeType file opt_beautifulizer (form, type)
show_attributed_type file opt_beautifulizer form attr type
| checkProperty form cAttributed
# (file, opt_beautifulizer)
@@ -1123,7 +1129,7 @@ where
writeType file opt_beautifulizer (form, arg_type --> res_type)
| checkProperty form cBrackets
= writeWithinBrackets "(" ")" file opt_beautifulizer
- (clearProperty (setProperty form cArrowSeparator) cBrackets, [arg_type, res_type])
+ (setProperty form cArrowSeparator, [arg_type, res_type])
= writeType file opt_beautifulizer (setProperty form (cBrackets bitor cArrowSeparator), [arg_type, res_type])
writeType file opt_beautifulizer (form, type :@: types)
| checkProperty form cBrackets
@@ -1222,7 +1228,7 @@ where
writeWithinBrackets br_open br_close file opt_beautifulizer (form, types)
# (file, opt_beautifulizer)
- = writeType (file <<< br_open) opt_beautifulizer (form, types)
+ = writeType (file <<< br_open) opt_beautifulizer (clearProperty form cBrackets, types)
= (file <<< br_close, opt_beautifulizer)
writeBeautifulTypeVar file beautifulizer=:{tvb_visited_type_vars, tvb_fresh_type_vars} type