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 +24
-2
lines changed
Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 1+ ## 0.5.0
2+
3+ _ 2023-02-08, Chris Martin_
4+
5+ The behavior of ` (<>) ` for the ` Ini ` type has changed
6+ [ #2 ] ( https://github.com/andreasabel/ini/issues/2 )
7+
8+ - ` <> ` previously discarded all ` iniGlobals ` . Now it concatenates
9+ the globals from the two ` Ini ` values.
10+
11+ - When two ` Ini ` values contained ` iniSections ` with the same name,
12+ ` <> ` previously returned the section from the left value and
13+ discarded the section of the same name from the right value.
14+ Now it concatenates the sections of the same name.
15+
16+ Tested with GHC 7.0 - ghc-9.6.0.20230128.
17+
118## 0.4.2
219
320_ 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