--- a/src/Tools/Haskell/Haskell.thy Fri Dec 14 11:47:53 2018 +0100
+++ b/src/Tools/Haskell/Haskell.thy Fri Dec 14 14:07:51 2018 +0100
@@ -1633,6 +1633,7 @@
import Network.Socket (Socket)
import qualified Network.Socket as Socket
import qualified Control.Concurrent as Concurrent
+import qualified System.IO as IO
import Isabelle.Library
import qualified Isabelle.UUID as UUID
@@ -1681,7 +1682,11 @@
(do
line <- Byte_Message.read_line connection
when (line == Just password) $ handle connection)
- (\_ -> Socket.close connection)
+ (\final -> do
+ Socket.close connection
+ case final of
+ Left exn -> IO.hPutStrLn IO.stderr $ Exception.displayException exn
+ Right () -> return ())
return ()
\<close>