Given the following code:
module Main where
import Control.Concurrent
main :: IO ()
main = forkIO errorPrinter >> threadDelay 1000000 >> print "Finished"
errorPrinter = error "You can't see me!"
I would expect that after running this code, I would see the following:
"You can't see me"
"Finished!"
Printed on the console. However, "You Can't See Me" is never printed.
I understand that using an error is not a good idea in production code, but I use it in development, and I find that errors are not printed to the console - even those related to dependencies.
I am sure this problem has a simple solution. I cannot be the first person to have this problem, but I cannot find the answer anywhere.
Any help would be greatly appreciated!
source
share