
Of course both suggestions don't really change anything as: _main = do args <- getArgs main args (or the equivalent for implicit parameters) is all that is required... In a way the implicit parameter approach makes it seem like a normal function... Do you think implicit parameters could replace top-level-things-with-identity? I hadn't really thought of it before (and I don't use implicit parameters much). Keean. Ashley Yakeley wrote:
In article <41ECD49F.9020601@imperial.ac.uk>, Keean Schupke
wrote: Surely both requirements can be satisfied if the programs arguments are made parameters of main:
main :: [String] -> IO ()
Keean.
Better yet, it should be an implicit parameter so as not to break existing programs.
main :: (?args :: [String]) => IO ()
You could do the same with standard input and output.