[Haskell] Re: Why is getArgs in the IO monad?
k.schupke at imperial.ac.uk
Tue Jan 18 04:19:27 EST 2005
Surely both requirements can be satisfied if the programs arguments are made
parameters of main:
main :: [String] -> IO ()
Ben Rudiak-Gould wrote:
> Conal Elliott wrote:
> >The meaning of
> >"length getArgs" would then have to be a value whose type is the meaning
> >of Haskell's "Int", i.e. either bottom or a 32-bit integer. I'm
> >guessing that none of those 2^32+1 values is what you'd mean by "length
> >getArgs". On the other hand, the IO monad is a much roomier type.
More information about the Haskell