[Haskell] Why is getArgs in the IO monad?
conal at conal.net
Mon Jan 17 22:07:16 EST 2005
How about a semantic answer instead of an operational one?
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?
From: haskell-bounces at haskell.org [mailto:haskell-bounces at haskell.org]
On Behalf Of Abraham Egnor
Sent: Monday, January 17, 2005 1:31 PM
To: Jim Apple
Cc: haskell at haskell.org
Subject: Re: [Haskell] Why is getArgs in the IO monad?
It's not a constant; see, for example, System.Environment.withArgs
On Mon, 17 Jan 2005 16:23:17 -0500, Jim Apple <japple at freeshell.org>
> See subject. It seems that it would be constant through execution, and
> so could be just [String].
> Haskell mailing list
> Haskell at haskell.org
Haskell mailing list
Haskell at haskell.org
More information about the Haskell