[Haskell-beginners] Why getArgs is in the IO monad

Mike Meyer mike at fpcomplete.com
Mon Apr 14 19:20:27 UTC 2014


>
>
> From: "John M. Dlugosz" <ngnr63q02 at sneakemail.com>
> (And that begs the question of why getArgs needs to be monadic in the
> first place.  It
> doesn't change its value; it's a strict constant at run-time, and not
> knowing it at
> compile time is my problem how?)
>

Actually, the value of the arguments can be changed - at least on some
platforms. They are writable from C, if nothing else. What should getArgs
do if some ffi changes the arguments before it's called?

Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20140414/f97e34f3/attachment.html>


More information about the Beginners mailing list