X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=GHC%2FConsoleHandler.hs;fp=GHC%2FConsoleHandler.hs;h=cabaa53c497a162ae593b2e7107c1b5aebf3a3e8;hb=9a101ce92ae850645471b8b5221215cdc5f916de;hp=aaf01c33e4ba5ab25ce22ab660aaf025c454df17;hpb=fb52d2e61d4596588653d60c202c77768140cf81;p=ghc-base.git diff --git a/GHC/ConsoleHandler.hs b/GHC/ConsoleHandler.hs index aaf01c3..cabaa53 100644 --- a/GHC/ConsoleHandler.hs +++ b/GHC/ConsoleHandler.hs @@ -37,7 +37,6 @@ import Foreign.C import GHC.IOBase import GHC.Conc import GHC.Handle -import Data.Typeable import Control.Concurrent.MVar data Handler @@ -84,6 +83,7 @@ installHandler handler STG_SIG_DFL -> return Default STG_SIG_IGN -> return Ignore STG_SIG_HAN -> return (Catch old_h) + _ -> error "installHandler: Bad threaded rc value" return (new_h, prev_handler) | otherwise = @@ -105,6 +105,7 @@ installHandler handler -- stable pointer is no longer in use, free it. freeStablePtr osptr return (Catch (\ ev -> oldh (fromConsoleEvent ev))) + _ -> error "installHandler: Bad non-threaded rc value" where fromConsoleEvent ev = case ev of