[Haskell-cafe] Process properties as global values

Volker Wysk post at volker-wysk.de
Tue Jul 6 09:49:32 EDT 2004


On Sun, 4 Jul 2004, Georg Martius wrote:
> On Sun, 4 Jul 2004 19:17:53 +0100, Alastair Reid <alastair at reid-consulting-uk.ltd.uk> wrote:
> >> I'm just wondering, why haven't process properties (such as the command
> >> line arguments, or the parent process id), which are inherently global,
> >> been made global values in the Haskell standard? You could avoid
> >> needlessly carrying around these values, you wouldn't need to lift some
> >> functions into the IO monad...
>
> Why do you need to lift function into IO monad? You just let you give the parameters in the main, which is IO () anyway, and then you can pass the ordinary values to the functions that depend on them.

Er, I meant, you need an IO action to get the value, thus a function needs
to be monadic to get that value. Of course you can also pass it as an
argument instead.

Cheers,
V.W.

--
Volker Wysk <post at volker-wysk.de>
http://www.volker-wysk.de



More information about the Haskell-Cafe mailing list