File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 8
8
9
9
* Rationalise the choice operators. Drop (//) and provide detailed comments
10
10
explaining the use of (/).
11
+
12
+ ## 0.3.0.1 -- 2024-07-31
13
+
14
+ * Improvements in the pretty printer - various groups should be formatted more
15
+ cleanly
Original file line number Diff line number Diff line change 1
1
cabal-version : 3.4
2
2
name : cuddle
3
- version : 0.3.0.0
3
+ version : 0.3.0.1
4
4
synopsis : CDDL Generator and test utilities
5
5
6
6
-- description:
Original file line number Diff line number Diff line change @@ -67,9 +67,9 @@ instance Pretty Type1 where
67
67
instance Pretty Type2 where
68
68
pretty (T2Value v) = pretty v
69
69
pretty (T2Name n mg) = pretty n <> pretty mg
70
- pretty (T2Group g) = enclose " (" " )" $ pretty g
71
- pretty (T2Map g) = enclose " {" " }" $ pretty g
72
- pretty (T2Array g) = enclose " [ " " ] " $ pretty g
70
+ pretty (T2Group g) = align $ enclose " (" " )" $ pretty g
71
+ pretty (T2Map g) = align $ enclose " {" " }" $ pretty g
72
+ pretty (T2Array g) = brackets $ pretty g
73
73
pretty (T2Unwrapped n mg) = " ~" <+> pretty n <> pretty mg
74
74
pretty (T2Enum g) = " &" <+> enclose " (" " )" (pretty g)
75
75
pretty (T2EnumRef g mg) = " &" <+> pretty g <> pretty mg
@@ -92,9 +92,9 @@ instance Pretty OccurrenceIndicator where
92
92
93
93
instance Pretty Group where
94
94
pretty (Group (NE. toList -> xs)) =
95
- align . encloseSep mempty mempty " // " $ fmap prettyGrpChoice xs
95
+ align . vsep . punctuate " // " $ fmap prettyGrpChoice xs
96
96
where
97
- prettyGrpChoice = align . encloseSep mempty mempty " , " . fmap pretty
97
+ prettyGrpChoice = sep . punctuate " , " . fmap pretty
98
98
99
99
instance Pretty GroupEntry where
100
100
pretty (GEType moi mmk t) =
You can’t perform that action at this time.
0 commit comments