This repository was archived by the owner on Jul 25, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed
Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 1+ ## 0.5.0
2+
3+ The behavior of ` (<>) ` for the ` Ini ` type has changed.
4+
5+ - ` <> ` previously discarded all ` iniGlobals ` . Now it concatenates
6+ the globals from the two ` Ini ` values.
7+
8+ - When two ` Ini ` values contained ` iniSections ` with the same name,
9+ ` <> ` previously returned the section from the left value and
10+ discarded the section of the same name from the right value.
11+ Now it concatenates the sections of the same name.
12+
113## 0.4.2
214
315_ 2022-07-26, Andreas Abel_
Original file line number Diff line number Diff line change 11cabal-version : >= 1.10
22name : ini
3- version : 0.4.2
3+ version : 0.5.0
44synopsis : Configuration files in the INI format.
55description : Quick and easy configuration files in the INI format.
66license : BSD3
Original file line number Diff line number Diff line change @@ -89,8 +89,13 @@ data Ini =
8989 }
9090 deriving (Show , Eq )
9191
92+ -- | '<>' concatenates the lists of entries within each section (since @ini-0.5.0@)
9293instance Semigroup Ini where
93- x <> y = Ini {iniGlobals = mempty , iniSections = iniSections x <> iniSections y}
94+ x <> y =
95+ Ini
96+ { iniGlobals = iniGlobals x ++ iniGlobals y
97+ , iniSections = M. unionWith (++) (iniSections x) (iniSections y)
98+ }
9499
95100instance Monoid Ini where
96101 mempty = Ini {iniGlobals = mempty , iniSections = mempty }
You can’t perform that action at this time.
0 commit comments