<div dir="ltr">Done. See <a href="https://github.com/magthe/hsini/issues/16">https://github.com/magthe/hsini/issues/16</a> for the issue about duplicate names, including a sample ini file. I've also opened <a href="https://github.com/magthe/hsini/issues/17">https://github.com/magthe/hsini/issues/17</a> about spaces in option names. I didn't try section names, but I've seen them with spaces in them as well, where they were used for creating GUI elements.<br><div><br></div><div>The wiki entry does mention the use of duplicate names for creating multi-valued options. It also mentioned duplicate section names, but not the specific use I'm dealing with.</div><div><br></div><div>I suspect fixing this in any of the current packages would require a fundamental rewrite of the packages I've looked at, as they all store options as Maps to string values, and sections as Maps to option value maps. They either need to store lists instead of maps, or use maps to polymorphic values.</div><div><span style="font-size:13.1999998092651px;line-height:1.5"> </span><br></div><div>For the record, I also created an issue for the in package <a href="https://github.com/chrisdone/ini/issues/6">https://github.com/chrisdone/ini/issues/6</a>, as it just hands back an empty config structure for the example file. Values outside of sections aren't handled.</div></div><br><div class="gmail_quote"><div dir="ltr">On Sat, Jul 4, 2015 at 11:33 AM Magnus Therning <<a href="mailto:magnus@therning.org">magnus@therning.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Jul 03, 2015 at 11:26:03PM +0000, Mike Meyer wrote:<br>
> Ok,I've looked at the packages google and hackage found (ini, hsini &<br>
> ConfigFile), and can't use any of them for dealing with the ini files I'm<br>
> being handed.<br>
><br>
> The problem is they all parse the config file into Maps, and that doesn't<br>
> seem to be an option. I need lists, because I have multiple sections with<br>
> the same name that turn into a list of objects, as well as sections that<br>
> can have multiple options with the same name that turn into multiple<br>
> objects.<br>
><br>
> Any chance I overlooked a parser? Or maybe some parsing options in<br>
> ConfigFile?<br>
><br>
> Any other advice on a library to do this?<br>
<br>
As the author of `hsini` I wouldn't mind if you created a bug report,<br>
explain the format you have (ideally you attach an example).<br>
<br>
Of course I can't promise any ETA, or even that it'll ever be done<br>
(you know how it's with FLOSS).<br>
<br>
I've pretty much used the "standard" described in the [INI article on<br>
Wikpedia](<a href="https://en.wikipedia.org/wiki/INI_file" rel="noreferrer" target="_blank">https://en.wikipedia.org/wiki/INI_file</a>) and then picked the<br>
pieces I think make sense and have use for myself.<br>
<br>
/M<br>
<br>
--<br>
Magnus Therning OpenPGP: 0xAB4DFBA4<br>
email: <a href="mailto:magnus@therning.org" target="_blank">magnus@therning.org</a> jabber: <a href="mailto:magnus@therning.org" target="_blank">magnus@therning.org</a><br>
twitter: magthe <a href="http://therning.org/magnus" rel="noreferrer" target="_blank">http://therning.org/magnus</a><br>
<br>
Finagle's Fourth Law:<br>
Once a job is fouled up, anything done to improve it only makes it<br>
worse.<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div>