95 |
95 |
96 in |
96 in |
97 |
97 |
98 fun pretty_mixfix NoSyn = Pretty.str "" |
98 fun pretty_mixfix NoSyn = Pretty.str "" |
99 | pretty_mixfix (Mixfix (s, ps, p, _)) = |
99 | pretty_mixfix (Mixfix (s, ps, p, _)) = |
100 parens (Pretty.breaks [quoted s, brackets (Pretty.commas (map int ps)), int p]) |
100 parens |
|
101 (Pretty.breaks |
|
102 (quoted s :: |
|
103 (if null ps then [] else [brackets (Pretty.commas (map int ps))]) @ |
|
104 (if p = 1000 then [] else [int p]))) |
101 | pretty_mixfix (Infix (s, p, _)) = parens (Pretty.breaks [keyword "infix", quoted s, int p]) |
105 | pretty_mixfix (Infix (s, p, _)) = parens (Pretty.breaks [keyword "infix", quoted s, int p]) |
102 | pretty_mixfix (Infixl (s, p, _)) = parens (Pretty.breaks [keyword "infixl", quoted s, int p]) |
106 | pretty_mixfix (Infixl (s, p, _)) = parens (Pretty.breaks [keyword "infixl", quoted s, int p]) |
103 | pretty_mixfix (Infixr (s, p, _)) = parens (Pretty.breaks [keyword "infixr", quoted s, int p]) |
107 | pretty_mixfix (Infixr (s, p, _)) = parens (Pretty.breaks [keyword "infixr", quoted s, int p]) |
104 | pretty_mixfix (Binder (s, p1, p2, _)) = |
108 | pretty_mixfix (Binder (s, p1, p2, _)) = |
105 parens (Pretty.breaks [keyword "binder", quoted s, brackets [int p1], int p2]) |
109 parens |
|
110 (Pretty.breaks |
|
111 ([keyword "binder", quoted s] @ (if p1 = p2 then [] else [brackets [int p1]]) @ [int p2])) |
106 | pretty_mixfix (Structure _) = parens [keyword "structure"]; |
112 | pretty_mixfix (Structure _) = parens [keyword "structure"]; |
107 |
113 |
108 end; |
114 end; |
109 |
115 |
110 |
116 |