[Haskell-beginners] general structuring of "foreach" logic in IO

David Thomas davidleothomas at gmail.com
Mon Apr 14 19:30:40 UTC 2014


getArgs is not pure in the presence of withArgs.

This is actually what we want; testing/exercising code that uses
getArgs would be a pain otherwise.

On Mon, Apr 14, 2014 at 11:42 AM, Brandon Allbery <allbery.b at gmail.com> wrote:
> On Mon, Apr 14, 2014 at 2:37 PM, John M. Dlugosz <ngnr63q02 at sneakemail.com>
> wrote:
>>
>> On 4/14/2014 10:47 AM, Brandon Allbery wrote:
>>>
>>> But it is the *compiler's* problem. "Constant" means "known at compile
>>> time" to the compiler.
>>
>>
>> Pure means pure at run-time over the life of the executable.  Just because
>> the compiler doesn't
>
>
> To you. To the compiler, and to me actually, if it is not known at compile
> time then it cannot be pure; it may not vary over an individual run of the
> program but it can vary over the lifetime of the program itself. If I cannot
> know it *statically* --- at compile time, since it is the compiler that
> needs to know that it is static --- then it is not pure.
>
> --
> brandon s allbery kf8nh                               sine nomine associates
> allbery.b at gmail.com                                  ballbery at sinenomine.net
> unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>


More information about the Beginners mailing list