3 May 2012 17:10
Weird behavior of the NonTermination exception
Bas van Dijk <v.dijk.bas <at> gmail.com>
2012-05-03 15:10:38 GMT
2012-05-03 15:10:38 GMT
Hello,
Before I turn the following into a ticket I want to ask if I miss
something obvious:
When I run the following program:
-------------------------------------------------
import Prelude hiding (catch)
import Control.Exception
import Control.Concurrent
main :: IO ()
main = do
mv <- newEmptyMVar
_ <- forkIO $ do
catch action
(\e -> putStrLn $ "I solved the Halting Problem: " ++
show (e :: SomeException))
putStrLn "putting MVar..."
putMVar mv ()
putStrLn "putted MVar"
takeMVar mv
action :: IO ()
action = let x = x in x
-------------------------------------------------
I get the output:
(Continue reading)
)
Jens
RSS Feed