mirror of
https://github.com/chrisdone/ini.git
synced 2024-09-11 07:05:32 +03:00
parent
092dd89d38
commit
21ed4e6246
17
CHANGELOG.md
17
CHANGELOG.md
@ -1,3 +1,20 @@
|
||||
## 0.5.0
|
||||
|
||||
_2023-02-08, Chris Martin_
|
||||
|
||||
The behavior of `(<>)` for the `Ini` type has changed
|
||||
[#2](https://github.com/andreasabel/ini/issues/2)
|
||||
|
||||
- `<>` previously discarded all `iniGlobals`. Now it concatenates
|
||||
the globals from the two `Ini` values.
|
||||
|
||||
- When two `Ini` values contained `iniSections` with the same name,
|
||||
`<>` previously returned the section from the left value and
|
||||
discarded the section of the same name from the right value.
|
||||
Now it concatenates the sections of the same name.
|
||||
|
||||
Tested with GHC 7.0 - ghc-9.6.0.20230128.
|
||||
|
||||
## 0.4.2
|
||||
|
||||
_2022-07-26, Andreas Abel_
|
||||
|
@ -1,6 +1,6 @@
|
||||
cabal-version: >= 1.10
|
||||
name: ini
|
||||
version: 0.4.2
|
||||
version: 0.5.0
|
||||
synopsis: Configuration files in the INI format.
|
||||
description: Quick and easy configuration files in the INI format.
|
||||
license: BSD3
|
||||
|
@ -89,8 +89,13 @@ data Ini =
|
||||
}
|
||||
deriving (Show, Eq)
|
||||
|
||||
-- | '<>' concatenates the lists of entries within each section (since @ini-0.5.0@)
|
||||
instance Semigroup Ini where
|
||||
x <> y = Ini {iniGlobals = mempty, iniSections = iniSections x <> iniSections y}
|
||||
x <> y =
|
||||
Ini
|
||||
{ iniGlobals = iniGlobals x ++ iniGlobals y
|
||||
, iniSections = M.unionWith (++) (iniSections x) (iniSections y)
|
||||
}
|
||||
|
||||
instance Monoid Ini where
|
||||
mempty = Ini {iniGlobals = mempty, iniSections = mempty}
|
||||
|
Loading…
Reference in New Issue
Block a user