[Haskell] Re: Why is getArgs in the IO monad?

Jim Apple japple at freeshell.org
Tue Jan 18 01:28:08 EST 2005


Conal Elliott wrote:

> If getArgs had type [String], then its denotation must be a (lazy) list
> of (lazy) sequences of characters (extended by bottom).  For instance,
> the expression (words "hello world") denotes the list ["hello","world"].
> What list would "getArgs" denote?

I don't think I understand your (rhetorical) question.

It seems that, looking out at the world from main, the args passed to 
main and the compilation happen at the same time (before, long long 
ago). What motivation would we have for treating them differently?

Jim



More information about the Haskell mailing list