On Tue, Feb 22, 2005 at 04:17:53PM +0100, Rafael Garcia-Suarez wrote:
> Here's a patch to add this. It's heavily cargo-culted, I need to read
> some docs about haskell some day. As I wasn't able to get FiniteMaps to
> work I implemented my own kludgy function to flatten pairs for the hash.
> Also I suspect that the type of the internal thingy in %*ENV might not
> be right, so you may want to turn it in a VHash instead (I haven't found
> any difference).

Thanks, indeed a list of pairs may be casted, in Pugs internal, as a
hash at any time.  To cast into VHash, use listToFM:

    VHash . MkHash . listToFM $ [ (VStr k, VStr v) | (k, v) <- environ ]

But otherwise, the patch is clean.  Applied, thanks!

/Autrijus/

Attachment: pgpKLovpKs18u.pgp
Description: PGP signature

Reply via email to