As the previous answers show, hooking dynamic evaluation, or a subset
thereof, into Haskell is not a particularly easy task. If this is
just a program to get up-and-running with understanding Haskell,
probably best not to delve into this sorts of stuff? A simpler
solution, albeit one which requires some boilerplate, would be to
ensure that either all the functions you dispatch to call getArgs
themselves (i.e. are of type IO ()) or simply take a list of
remaining parameters (i.e. are of type [String] ->IO ()) and then
pull them out of either a list or a map. Something resembling this
approach is, for example, here: http://haskell.org/haskellwiki/
Simple_unix_tools
--S
P.S. using Template Haskell to solve this would be a fairly
interesting exercise as well, I suspect.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe