[Haskell-cafe] Re: Why is getArgs in the IO monad?
k.schupke at imperial.ac.uk
Wed Jan 19 04:05:02 EST 2005
Of course both suggestions don't really change anything as:
_main = do
args <- getArgs
(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
I hadn't really thought of it before (and I don't use implicit
Ashley Yakeley wrote:
>In article <41ECD49F.9020601 at imperial.ac.uk>,
> Keean Schupke <k.schupke at imperial.ac.uk> wrote:
>>Surely both requirements can be satisfied if the programs arguments are made
>>parameters of main:
>>main :: [String] -> IO ()
>Better yet, it should be an implicit parameter so as not to break
> main :: (?args :: [String]) => IO ()
>You could do the same with standard input and output.
More information about the Haskell-Cafe