You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.
When semigroupally combining Ini values that both define the same section, I was surprised to find that one of the sections is discarded. The monoid instance currently looks like this:
mappend x y =Ini {iniGlobals =mempty, iniSections = iniSections x <> iniSections y}
I was expecting sections of the same name to be merged.
Also, why discard all the globals?
Proposed change to the monoid instance:
mappend x y =Ini {
iniGlobals =Map.unionWith (<>) (iniGlobals x) (iniGlobals y),
iniSections =Map.unionWith (<>) (iniSections x) (iniSections y) }
Either way, whether you are interested in changing the instance or not, I'd be happy to send a PR with some documentation to mention how the instance behaves.
The text was updated successfully, but these errors were encountered:
When semigroupally combining
Ini
values that both define the same section, I was surprised to find that one of the sections is discarded. The monoid instance currently looks like this:I was expecting sections of the same name to be merged.
Also, why discard all the globals?
Proposed change to the monoid instance:
Either way, whether you are interested in changing the instance or not, I'd be happy to send a PR with some documentation to mention how the instance behaves.
The text was updated successfully, but these errors were encountered: