Chaitin's (try)

Carl McTague writes:
| Does anybody have an interest in something like Gregory Chaitin's
| function (try) from his custom lisp in Haskell?
:
Have a look at the timeout function in Tackling The Awkward Squad, in
the section on asynchronous exceptions (6.5.1 in the version I'm
looking at).
http://research.microsoft.com/Users/simonpj/papers/marktoberdorf.htm
The impurity is captured by function's result being an IO action.
timeout :: Int -> IO a -> IO (Maybe a)