Eric Kow wrote:
> On Thu, Jul 22, 2010 at 20:38:35 -0500, Adolfo Builes wrote:
>>> Is it really necessary for this to be String -> Bool?
>>> Why not String -> IO Bool?
>>> 
>>> Alternatively, why not IO (String -> Bool)?
>>> 
>> I used  (String -> Bool) basically to escape the IO so that I could
>> use it easily in the guards.
> 
> ...
> 
>> I totally agree that I abused of unsafePerformIO, in this case I used
>> for the same reason I gave before.
> 
> I think an IO (String -> Bool) approach could maybe still work
> because you can grab the (String -> Bool) function within IO, and
> then use it within a guard.  
> 
> You'll have to decide if minimising the unsafePerformIO is worth the
> extra code complexity or not.  I tend to say it is, but others may
> disagree with me.  

I'm totally against use of unsafePerformIO simply to reduce local code 
complexity. Where we use it, it's to deal with _global_ issues like needing to 
thread state or log messages everywhere.

Ganesh

=============================================================================== 
Please access the attached hyperlink for an important electronic communications 
disclaimer: 
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html 
=============================================================================== 

_______________________________________________
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to