On Fri, May 26, 2006 at 19:39:00 +0200, Juliusz Chroboczek wrote:
>   hasSSHControlMaster :: Bool
>   hasSSHControlMaster = unsafePerformIO hasSSHControlMasterIO
> 
> and use the latter in the low-level function that uses ssh.  Since
> Darcs is lazy, it will be evaluated just once.

Ok, Haskell has just become disturbingly cool in my eyes :-).

My hestitation was not so much an objection to the idea, but me not
knowing how to execute it, that is, me not grasping the interesting
consequences of lazy+unsafe.

Now that I understand how that works, I'll give it a shot.  

If only there was some way to know how to kill off all the control
masters at the end, (i.e. knowing which control masters we ran)
we could even completely get rid of the code in DarcsCommands has
make it completely transparent.  Any ideas?

-- 
Eric Kow                     http://www.loria.fr/~kow
PGP Key ID: 08AC04F9         Merci de corriger mon français.

Attachment: pgpI9koqoIgns.pgp
Description: PGP signature

_______________________________________________
darcs-devel mailing list
[email protected]
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel

Reply via email to