On 2008 Sep 6, at 7:30, David F. Place wrote:
Say I have a function solve which is a constraint solver. It
reconfigures its input to be a solution. If there is no solution,
it returns the input.
solve :: a -> Either a a
solve input output = maybe (Left input) Right $ solve' input
If there is a solution, it finds it in a few seconds. If there is
no solution, it goes away for days proving that. So, I'd like to
give up on it if it doesn't return in a few seconds.
http://www.haskell.org/haskellwiki/Timing_out_computations
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon university KF8NH
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe