[Haskell] Why is getArgs in the IO monad?
Conal Elliott
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?
- Conal
-----Original Message-----
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
(http://www.haskell.org/ghc/docs/latest/html/libraries/base/System.Envir
onment.html#v%3AwithArgs).
Abe
On Mon, 17 Jan 2005 16:23:17 -0500, Jim Apple <japple at freeshell.org>
wrote:
> See subject. It seems that it would be constant through execution, and
> so could be just [String].
>
> Jim
>
> _______________________________________________
> Haskell mailing list
> Haskell at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell
>
_______________________________________________
Haskell mailing list
Haskell at haskell.org
http://www.haskell.org/mailman/listinfo/haskell
More information about the Haskell
mailing list