On 27.04 12:32, Mirko Rahn wrote: > So it would be much better to define the options in the library and to > provide this definitions to the user program somehow. I tought about > this topic several times and came up with a solution that works for me > but is far from being perfect. It uses existentials and a main > disadvantage is the need of explicit traversing. Moreover some new > boilerplate code is necessary.
HAppS has a typeclass for this kind of thing also: http://test.happs.org/auto/apidoc/HAppS-Util-StdMain-Config.html http://test.happs.org/HAppS/src/HAppS/Util/StdMain/Config.hs and for an example instance see: http://test.happs.org/HAppS/src/HAppS/Protocols/SimpleHTTP.hs - Einar Karttunen _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe