Re: [Haskell-cafe] Typed Configuration Files

2010-01-15 Thread Ketil Malde
Neil Mitchell ndmitch...@gmail.com writes: The CmdArgs manual might help: http://community.haskell.org/~ndm/darcs/cmdargs/cmdargs.htm Yes, this is what I used :-) Presenting examples is great, but gives me the hubris to rip off the example that seems to fit most closely, and modify it. This

Re: [Haskell-cafe] Typed Configuration Files

2010-01-14 Thread Ketil Malde
Magnus Therning mag...@therning.org writes: Seriously, cmdargs is *brilliant*. It's also magic (to me). On this list, I'm uncertain whether brilliant is a warning or a recommendation, but magic is clearly irresistible, so I had a go at using cmdargs. And I agree, it is really nice in quickly

Re: [Haskell-cafe] Typed Configuration Files

2010-01-14 Thread Ketil Malde
Ketil Malde ke...@malde.org writes: - CmdArgs helpfully provides default --help, --version as well as --quite and --verbose. For the two former, there's also a nice default implementation, but presumably the latter two are for use in the program proper. Unfortunately, I don't know how

Re: [Haskell-cafe] Typed Configuration Files

2010-01-14 Thread Matthias Görgens
Hi Sebastian, You might also want to look at how xmonad handles it's configuration. Basically the configuration file is the main-file that produces the executable and takes in the rest of xmonad as a library. This works out quite well, but you need a compiler to update the configuration.

Re: [Haskell-cafe] Typed Configuration Files

2010-01-14 Thread Neil Mitchell
Hi The CmdArgs manual might help: http://community.haskell.org/~ndm/darcs/cmdargs/cmdargs.htm Seriously, cmdargs is *brilliant*.  It's also magic (to me). On this list, I'm uncertain whether brilliant is a warning or a recommendation, but magic is clearly irresistible, so I had a go at

Re: [Haskell-cafe] Typed Configuration Files

2010-01-10 Thread Sebastian Fischer
Is there something similar for parsing config files? If you write one I most certainly will use it! ;) You (we) can already start using the cmdargs package to parse config files. Upon my feature request to add a function to the cmdargs package that allows to add default arguments, Neil

[Haskell-cafe] Typed Configuration Files

2010-01-08 Thread Sebastian Fischer
Dear Café, Neil Mitchell's cmdargs package [1] is pretty neat. It can be used to parse command-line arguments into a user-defined data structure. Is there something similar for parsing config files? There are a number of config file parsers on Hackage. But even the most sophisticated one

Re: [Haskell-cafe] Typed Configuration Files

2010-01-08 Thread Magnus Therning
On Fri, Jan 8, 2010 at 12:53 PM, Sebastian Fischer s...@informatik.uni-kiel.de wrote: Dear Café, Neil Mitchell's cmdargs package [1] is pretty neat. It can be used to parse command-line arguments into a user-defined data structure. Is there something similar for parsing config files? If you

Re: [Haskell-cafe] Typed Configuration Files

2010-01-08 Thread Nicolas Pouillard
Excerpts from Magnus Therning's message of Fri Jan 08 16:25:31 +0100 2010: On Fri, Jan 8, 2010 at 12:53 PM, Sebastian Fischer s...@informatik.uni-kiel.de wrote: Dear Café, Neil Mitchell's cmdargs package [1] is pretty neat. It can be used to parse command-line arguments into a

Re: [Haskell-cafe] Typed Configuration Files

2010-01-08 Thread Neil Mitchell
Hi, Seriously, cmdargs is *brilliant*.  It's also magic (to me). Not only to you in fact it is black magic since it uses unsafePerformIO :( The problem isn't that it's black magic or that it uses unsafePerformIO - the problem is that it's horribly impure, so doesn't obey referential

Re: [Haskell-cafe] Typed Configuration Files

2010-01-08 Thread Bulat Ziganshin
Hello Sebastian, Friday, January 8, 2010, 3:53:53 PM, you wrote: Neil Mitchell's cmdargs package [1] is pretty neat. It can be used to parse command-line arguments into a user-defined data structure. Is there something similar for parsing config files? Lua language may be used to describe